DD-WRT: How to resolve Dynamic DNS hostname for internal network users?

RaiderJ

Diamond Member
Apr 29, 2001
7,582
1
76
Not sure how to do this one, but I want to resolve a dynamic DNS name, such as myserver.dyndns.org to a local IP address when I'm on the internal network. That way when I type in "http://myserver.dyndns.org:8080/" I'll always get to my server hosted page.

Right now I just type in the IP address directly (192.168.1.xxx) when I'm on the local network that uses a DD-WRT router, and then the dynamic DNS hostname outside of that.

Is there a setting in the DD-WRT router to resolve the hostname to a local IP? Something like a hosts file?
 

Cr0nJ0b

Golden Member
Apr 13, 2004
1,141
29
91
meettomy.site
I think what you are looking for is WINS. Windows Internet Naming service. I'm sure that someone a lot smarter than me will chime in here, but you need to have an internal WINS service to link a name to an address. I use my infrant box to provide the service. I'm not sure if DD-WRT actually provides a WINS service, or just passes through WINS to clients. In the past I've looked to a physical server to provided this service (before I got infrant). Lastly, as a work around, you could always add your host name to the Hosts file on each client. It's more of a hassle, but works.
 

seepy83

Platinum Member
Nov 12, 2003
2,132
3
71
No, please do not run WINS. WINS is evil and must be turned off immediately unless you are running some old piece of software that requires it. I don't think WINS could even be used to accomplish what is being asked.

As for getting names to resolve the way you want them to... I've never used DD-WRT so I don't know if you can do it in DD-WRT or how it is done if DD-WRT supports it. I'm familiar with DNS Rewrite on Cisco ASAs, and it is used to do what you want. Someone else that's familiar with it might be able to tell you if DD-WRT can do DNS Rewrite or DNS Doctoring.

Edit: To be a little more thorough...
OP asked "Is there a setting in the DD-WRT router to resolve the hostname to a local IP?", and the answer is yes. A DNS server is specifically for resolving a hostname to an IP. But, unfortunately, you're trying to resolve a hostname on dyndns.org to a local IP, and the response that you will get from a DNS server will be for the public IP that dyndns.org has in its records. A Cisco ASA that is setup for DNS rewrite and is sitting between a host and the internet can intercept the host's DNS lookup for myserver.dyndns.org and say "here's the IP that you want: <insert local/private IP here>" instead of sending that request out to some DNS server on the internet which would normally respond with the public IP.
 
Last edited:

RaiderJ

Diamond Member
Apr 29, 2001
7,582
1
76
Maybe there's a simpler answer for what I need to - all I'd like is for a single shortcut to go to the server address, regardless of where I'm at. So, just a link to "http://myserver.dyndns.org:8080" that works everywhere. Right now I have to use the specific IP address when I'm behind the router.
 

RaiderJ

Diamond Member
Apr 29, 2001
7,582
1
76

JackMDS

Elite Member
Super Moderator
Oct 25, 1999
29,529
416
126
It depends on what you want to connect to on another computer.

Whatever is the application that suppose to be connected to, forward the application's port through the Router to the IP of the specific network computer, and use the port number with the DDNS.

Example "http://myserver.dyndns.org:portnumber"

Here you have and example with VNC (Read toward the end of the page under, Using VNC to Control a specific LAN Computer through the Internet).

http://www.ezlan.net/vnc.html

The principle can be used to other applications too.



:cool:
 
Last edited:

RaiderJ

Diamond Member
Apr 29, 2001
7,582
1
76
It depends on what you want to connect to on another computer.

Whatever is the application that suppose to be connected to, forward the application's port through the Router to the IP of the specific network computer, and use the port number with the DDNS.

Example "http://myserver.dyndns.org:portnumber"

Here you have and example with VNC (Read toward the end of the page under, Using VNC to Control a specific LAN Computer through the Internet).

http://www.ezlan.net/vnc.html

The principle can be used to other applications too.



:cool:

Yup, I've had luck with that - set up the server so I can access all the tools I need remotely. Just wasn't sure how to tell local machines to use the local address instead of the external IP when connecting. It was easy enough to just use the direct IP, but it's even easier if I just have one bookmark to save on my browser.
 

thehooride

Junior Member
Mar 31, 2013
6
0
0
It depends on what you want to connect to on another computer.

Whatever is the application that suppose to be connected to, forward the application's port through the Router to the IP of the specific network computer, and use the port number with the DDNS.

Example "http://myserver.dyndns.org:portnumber"

Here you have and example with VNC (Read toward the end of the page under, Using VNC to Control a specific LAN Computer through the Internet).

http://www.ezlan.net/vnc.html

The principle can be used to other applications too.



:cool:

Sorry to bump up such an old post but...I have this same issue but would also like to know what the work around is for having the same domain with different ports resolve to different local IPs

For example:
myname.dyndns.org:80 = 192.168.1.100
myname.dyndns.org:8080 = 192.168.1.101
 

AnonymouseUser

Diamond Member
May 14, 2003
9,943
107
106
Sorry to bump up such an old post but...I have this same issue but would also like to know what the work around is for having the same domain with different ports resolve to different local IPs

For example:
myname.dyndns.org:80 = 192.168.1.100
myname.dyndns.org:8080 = 192.168.1.101

That's what Port Forwarding is for.