Originally published at: http://www.howtogeek.com/194924/ask-htg-how-can-i-connect-to-a-local-internet-facing-server-without-sending-traffic-out-to-the-internet-and-back/
If you’ve configured a server on your home network (like a media streaming server) so you can access your files away from home, you may have noticed a curious conundrum: when you want to use the server at home your traffic gets routed out to your ISPs servers and then back to your house because your network hardware doesn’t recognize that the server isn’t really out there on the Internet, it’s right at home. Let’s take a look at how a fellow reader can fix this slow and bandwidth-wasting operation and keep things tight and speedy.
Most routers I've used will loop back the NAT address, but I've seen some that don't. (Sometimes that's configurable, sometimes it's not.)
I just ran a tracert to my external IP address and there were no hops: the first and only router to respond was my external IP. The ping time was also < 1 ms. The only time I've ever had problems connecting to the shared IP from inside my network was with a Linksys router a long, long time ago.
The only real issue I can see with using your external IP while at home is that all of your traffic will still go through your router, even if you're on your local network. This problem is mostly unavoidable - unless you run a local DNS server. You could configure your DNS server with static addresses for your local media server (something like media.mydomain.com), and let the outside world have a different address for the same host name via a service like DynDNS.
Here's a better (and more secure) way to do it: Create a VPN and connect to your home network through that when away from home.
Advantages: Secure (encrypted) communications between you and your home network. You get a local IP on your network when using the VPN...therefore, you can change the IP you're connecting to for your server to its LOCAL IP address.
So, basically, you now connect to the local server IP address whether you're at home or not. Nothing goes out to the Internet when at home: It all stays local.
In addition, you can use the VPN to tunnel the rest of your Internet activities when away from home. Congratulations: Secure media streaming, Internet browsing, Email, etc while using that Coffee shops notoriously insecure (but free) open WIFI!
He's using this from his mobile phone; what home VPN software out there is compatible with the VPN client in his phone?
Personally, I use an SSH tunnel. DD-WRT on my home router runs the SSH server, and SSHTunnel/ProxyDroid as the client on my Android phone. Works like a charm.
He could also run an OpenVPN server on his server, on a DD-WRT compatible router, or even a spare Windows PC. Then he could use any of the many OpenVPN clients that are available for Android on the Play Store.
Why not just use the local address of the server when you're at home? Is it really that difficult to change the address in the app on your phone? I'm assuming your phone can use wifi when you're at home; otherwise the data is going to go out through your phone provider's network to get to your server anyway.
This topic was automatically closed after 10 days. New replies are no longer allowed.