0

I have a few machines on different local networks that I need to SSH into from time to time. None of the networks have static IPs so I use a DynDNS to map each machine to a hostname, then with port forwarding I can just use the hostname as the SSH target.

When I'm connected to the same local network as one of the machines and I SSH into it using its hostname, does my connection pass through the public internet or does my router know that traffic is being routed to its own IP?

1

Many routers have DHCP servers which mirror a the machine names they receive in the DHCP query into DNS A records which they provide to their local network via their DNS repeater.

So, a connection to a machine name will be direct to the LAN address

Now if you were to use the DNS name of your LAN (as served by DynDNS) the router may map that back to the local address without sending any traffic out over the internet (other than the DNS lookup).

0

Your traffic would not leave your network. Depending inhiw sophisticated your router and DNS setup is this.may not work at all, may resolve.an internal IP and cinnect directly or my connect vi the router.using what is called hairpin NAT - where traffic enters and leaves the same interface - the latter is not common.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.