Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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 255.255.255.255 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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