Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to be able to use the same hostname to connect to my computer from my phone whether I'm at home or away. Currently I have to maintain duplicate entries for remote desktop, for instance.

My router doesn't seem to have a NAT loopback option. I have two routers in fact, a cable modem which goes straight to my main router which does wireless. I can add to the static routing tables on each. Can I use this to loopback the public IP or do I need different routers?

EDIT: I have a Motorola Droid Razr. The modem router is a Comcast business gateway and the wireless router is a Linksys E2000 with stock firmware.

share|improve this question
It depends on the phone, What phone are you using? – Scott Chamberlain Nov 26 '11 at 1:52
Razr. Why does that make a difference? – jnm2 Nov 26 '11 at 1:54
What about the router you are using? is it a stock firmware or somthing like dd-wrt? – Scott Chamberlain Nov 26 '11 at 1:56
Do you have anything on your network other than the router that can act as a DNS server? The idea being that you have the hostname resolve to the internal address when in your network, and resolve to the external address when outside. – Paul Nov 26 '11 at 2:19
up vote 2 down vote accepted

I solved the same problem you are having by running my own local DNS server that recurses to OpenDNS for non-local domains, and creating zones with local DNS A and PTR records that resolve my external hostname to the LAN IP of that host.

You don't really want to use your "public IP" from your LAN, but rather you want to use the same DNS hostname.

I believe you could add a static route on your system to route your external IP with netmask to the IP of your local system. However, that IP is going to be your default gateway and I believe the two would conflict. In essence, it might happen that all your Internet facing traffic ends up going to the IP of that local system.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .