No more Cloudflare Tunnels for me...
Summary
This video discusses an alternative to Cloudflare Tunnels for hosting services behind CGNAT or firewalls. It explains how to set up your own tunnel using Tailscale on a cloud VPS or a public IP machine to bypass Cloudflare's limitations on high-bandwidth services. The guide involves installing Tailscale on a cloud VPS and within your home network, along with Nginx Proxy Manager (NPM) for managing domain routing and SSL certificates. The setup enables you to use the cloud VPS to expose internal home network services securely to the internet, avoiding issues like CGNAT while allowing full control over the network.
Chapter Breakdown
Introduction and Overview (00:00 - 02:10):
- The video introduces Cloudflare Tunnels and highlights their limitations, especially for high-bandwidth services like file hosting and streaming.
- The solution presented involves creating your own tunnel using a cloud VPS or a machine with a public IP and Tailscale to tunnel into your home network.
Understanding Network Tunnels (02:11 - 05:10):
- Explanation of network tunnels and how they allow external access to services on networks behind CGNAT and firewalls.
- The limitations of using Cloudflare tunnels and CGNAT are discussed, with a segue into the alternative: using Tailscale for tunneling.
Cloud VPS Setup and Tailscale Installation (05:11 - 10:30):
- Detailed instructions on setting up a Linux server on a cloud VPS and installing Tailscale.
- Walkthrough of installing Tailscale using a one-line install script on Linux and authenticating the machine.
- Subnet routing is introduced, with the cloud VPS acting as a contact point between the internet and the home network.
Nginx Proxy Manager Setup (10:31 - 15:55):
- Instructions on installing Nginx Proxy Manager using Docker Compose.
- Explanation of setting up Let's Encrypt SSL certificates and configuring the domain for public access.
- Demonstration of creating a proxy host record in NPM to forward traffic to home network services.
Tailscale Setup on the Home Network (15:56 - 22:35):
- Setting up Tailscale on a Raspberry Pi to expose local services from the home network.
- The key difference here is advertising the home network subnets with the
advertise-routes
flag to make them accessible via the cloud VPS. - Final steps include approving the routes in the Tailscale admin interface and testing the setup with a domain hosted on Cloudflare.
Bandwidth Testing and Performance (22:36 - 26:30):
- A performance test using iPerf between the cloud VPS and Raspberry Pi shows how much bandwidth can be pushed through Tailscale.
- Improved performance is demonstrated with Tailscale running on an LXC container with more resources.
Conclusion and Recommendations (26:31 - 29:55):
- The video wraps up with recommendations for different setups depending on your resources and needs (e.g., using a low-power device at a friend’s house).
- A mention of American Cloud as the cloud provider, which does not charge for network egress fees, is included, followed by a call to action to subscribe and like the video.
Suggested Changes for Your Ubuntu Server on the Samsung NC110 (Atom CPU, 2GB RAM, 250GB SSD):
-
Tailscale Compatibility: Your server can handle Tailscale, as it is lightweight and runs on almost any system, including devices with limited resources like your NC110. However, be cautious of potential performance bottlenecks due to the limited RAM and CPU.
-
Nginx Proxy Manager: Running Nginx Proxy Manager (NPM) may be more resource-intensive due to Docker. With 2GB of RAM, it might be challenging to run Docker efficiently. Consider either reducing the number of running containers or using a non-Docker Nginx setup to save resources.
-
Bandwidth Limitations: Given the Atom CPU and 2GB RAM of your NC110, hosting high-bandwidth services or handling many concurrent connections may lead to performance issues. For simple, lightweight services, your setup should work fine, but for more demanding services, performance might degrade.
-
Consider Using a Minimal OS: If possible, run the lightest services needed and consider using a minimal version of Ubuntu to optimize resource usage. Tailoring the server to only the essential services will help manage its limited hardware capabilities.