Introducing portSSHare: a Dockerized AutoSSH Tunneling Solution for Easy Port Forwarding reddit / selfhosted ---------------------------------------------------------------------- Human_Umpire7073 · 2023-12-23 22:28 \*\*Title:\*\* Introducing portSSHare: a Dockerized AutoSSH Tunneling Solution for Easy Port Forwarding ​ \*\*Body:\*\* Hey r/selfhosted community! ​ I'm excited to share a project I've been working on that might interest those of you into self-hosting and network management. It's a Dockerized AutoSSH setup designed for easy and reliable port forwarding. ​ \*\*What It Does:\*\* The project uses AutoSSH within a Docker container to establish persistent SSH tunnels. This setup is particularly useful for forwarding ports from machines on a private network to a machine on an upstream network, effectively allowing services on a private network to be accessible from a more public-facing server. ​ \*\*Key Features:\*\* \- \*\*Simplicity:\*\* Everything is managed via a straightforward YAML config file. \- \*\*Flexibility:\*\* Supports multiple SSH tunnel configurations. \- \*\*Portability:\*\* Being Dockerized, it can run virtually anywhere Docker is supported. ​ \*\*How It Works:\*\* You specify your tunnel configurations in a \`config.yaml\` file, which includes parameters like source and target SSH users, hosts, ports, etc. The Docker container then reads this file and sets up the specified SSH tunnels using AutoSSH. ​ \*\*Example Config:\*\* Here’s a simplified version of the config structure: ​ \`\`\`yaml tunnel1\_source\_ssh\_user: user1 tunnel1\_source\_host: [source1.example.com](https://source1.example.com) tunnel1\_source\_port: 8080 tunnel1\_target\_ssh\_user: user2 tunnel1\_target\_host: [target.example.com](https://target.example.com) tunnel1\_target\_port: 9090 ​ tunnel2\_source\_ssh\_user: user3 tunnel2\_source\_host: [source2.example.com](https://source2.example.com) tunnel2\_source\_port: 8000 tunnel2\_target\_ssh\_user: user4 tunnel2\_target\_host: [target.example.com](https://target.example.com) tunnel2\_target\_port: 9000 \`\`\` ​ \*\*Why I Made This:\*\* I often found myself needing a reliable way to expose services running on various home lab servers to the internet or other networks. While there are many ways to achieve this, I wanted something simple and easily reproducible. Hence, this project! ​ \*\*Looking for Feedback:\*\* I'd love to get feedback from the community. Suggestions for improvements, feature requests, or general thoughts are all welcome. ​ \*\*GitHub Repo:\*\* I've made the project open-source, and it's available on GitHub: \[GitHub Link to Your Repo\] ​ Feel free to check it out, use it in your setups, and contribute if you find it useful! ​ \--- ​ \*\*Note:\*\* \- Ensure you have a GitHub repository link to include in the post for interested users to access your project. \- Modify any parts of the post to better fit your project details or personal style. \- Remember to engage with the community respectfully, especially when responding to questions or feedback.