Live data from Hacker News

Locally hosting an internet-connected server

mjg59.dreamwidth.org

11–20 of 183 posts

Re: Locally hosting an internet-connected server

#11
post #10
post #8

Earlier quoted context omitted.

That doesn't work well if you want to run the same service on multiple machines. For some you can proxy that (eg, for web you can just run nginx to proxy everything based on either the host header or SNI data), but for others you can't - you're only going to be able to have one machine accepting port 22 traffic for ssh.

Select an isp that gives you multiple ip v4 addresses. Or host on ipv6.

Yes, if I had multiple IPv4 addresses already it wouldn't be necessary to tunnel in additional IPv4 addresses, but since I don't and since there are no ISPs who will provide that to me at this physical address, tunneling is where I am.

Re: Locally hosting an internet-connected server

#14
post #10
post #8

Earlier quoted context omitted.

That doesn't work well if you want to run the same service on multiple machines. For some you can proxy that (eg, for web you can just run nginx to proxy everything based on either the host header or SNI data), but for others you can't - you're only going to be able to have one machine accepting port 22 traffic for ssh.

Select an isp that gives you multiple ip v4 addresses. Or host on ipv6.

In many countries, unless you buy a business broadband package (more expensive),residential internet does not come with such options.

Re: Locally hosting an internet-connected server

#15
post #5
post #3

This is an interesting solution and wouldn't mind using one of my existing servers as a gateway or proxy (?). Is there a way to be selective about what ports are exposed from the host to the target? The target could handle it but fine grained control is nice.

You could just set a default deny iptables policy for forwarding to that host, and then explicitly open the ports you want

[deleted]

Re: Locally hosting an internet-connected server

#16
post #8
post #7

Earlier quoted context omitted.

If they don't all need distinct external IP addresses of their own, port forwarding is a typical approach.

That doesn't work well if you want to run the same service on multiple machines. For some you can proxy that (eg, for web you can just run nginx to proxy everything based on either the host header or SNI data), but for others you can't - you're only going to be able to have one machine accepting port 22 traffic for ssh.

You can port forward SSH to other internal machines, just like nginx + web.

Re: Locally hosting an internet-connected server

#18
post #2

Why not use a dynamic DNS service instead? I’ve been using dyn.com (now oci.dyn.com) for years and it has worked great. A bonus is many home routers have support built in.

Only works if you're not behind CGNAT, which has problems in and of itself. I pay my ISP an extra 29 DKK (about 4.50 USD at the moment) for a static address; my IPv4 connections and downloads in-general became way more stable after getting out from behind CGNAT.

Re: Locally hosting an internet-connected server

#19
post #16
post #8

Earlier quoted context omitted.

That doesn't work well if you want to run the same service on multiple machines. For some you can proxy that (eg, for web you can just run nginx to proxy everything based on either the host header or SNI data), but for others you can't - you're only going to be able to have one machine accepting port 22 traffic for ssh.

You can port forward SSH to other internal machines, just like nginx + web.

I can port forward port 22 to a single machine. I can't proxy port 22 in a way that directs the incoming connection to the correct machine, at least not without client configuration.

Re: Locally hosting an internet-connected server

#20
Lovely write up! Personally, I just settled on Tailscale so I don’t have to manage WireGuard and iptables myself.

For a while I also thought that regular SSH tunnels would be enough but they kept failing occasionally even with autossh.

Oh and I got bitten by Docker default MTU settings when trying to add everything to the same Swarm cluster.

Post reply on HN