x
all questions login
General DNS & Domains Dyn Email Update Clients Dyn Developer

I have a Mac OS X 10.5.8 system connected by an Ethernet cable to a Ruckus Modem. The LAN IP-address my Network Preferences shows is 192.168.1.100 with a Router address of 192.168.1.1. What I'd like to know is how DNSUpdate gets the WAN address, 64.9.242.49, from the Router? I'd like to be able to do that from Terminal.app, the Darwin/Unix interface. There must be some Unix command, or commands, that are able to communicate with the Router modem, but I don't know where to look for that information. Can anyone help?

more ▼

asked Jul 21 at 08:35 PM

dickguertin\'s gravatar image

dickguertin
3 2 3 5

10|600 characters needed characters left

4 answers:

You're confused about how this all works. Any time you connect to any web site the IP address you're coming from (which will either be your WAN IP address, or the IP address of any proxy you use) is automatically available to the web site (it has to be for the connection to work). Pretty much all that any of the IP checking sites does is display that IP address. At no point do you need to tell the other end what your IP address is first.

Put that URL into your web browser and compare it to the WAN IP address of your modem. If they're different it means you're using a proxy server.

more ▼

answered Jul 26 at 06:23 AM

Cry Havok\'s gravatar image

Cry Havok ♦
44.1k 12 26 213

I have a modem/router that uses "Port Triggering", and I must make a connection to GoogleWifi to get the connection to run bidirectional. I then need to run DNSUpdate to inform DynDNS of the change, IF IT CHANGED. I don't want to run DNSUpdate if there hasn't been any change, so I want to know the IP-address within a Unix script, not visually from a browser. DNSUpdate seems to be able to do it. I just want to do the same thing.

Jul 27 at 03:37 AM dickguertin
10|600 characters needed characters left

Note that comments don't have reliable communication - better to edit your question or add an answer.

Your manual process is simply duplicating what the client will do anyway. The client will retrieve the WAN IP address, compare it to what it was the last time it checked and then submit an update if it has changed. Adding your manual step gains you nothing.

This is particularly true if you use ddclient, which is the best choice of unix update client by far. With ddclient you can even configure it to retrieve the WAN IP from the modem.

Of course, if you want to do it by hand, just use that code snippet I posted earlier. Just keep in mind that when you launch the update client, it's going to do the same thing all over again.

more ▼

answered Jul 27 at 06:04 AM

Cry Havok\'s gravatar image

Cry Havok ♦
44.1k 12 26 213

But DNSUpdate isn't working properly, and it doesn't update my hostname at DynDNS. See my related thread:

http://www.dyndnscommunity.com/questions/4246/possible-problem-with-dnsupdate-on-mac

Jul 27 at 06:15 AM dickguertin
10|600 characters needed characters left

Cry, thanks for the following snippet. THIS IS THE ANSWER. I added 2>/dev/null

curl "http://checkip.dyndns.org:8245/" 2>/dev/null | awk '{ print $NF }' | sed "s/<.*//"

more ▼

answered Jul 27 at 04:09 PM

dickguertin\'s gravatar image

dickguertin
3 2 3 5

10|600 characters needed characters left

The DynDNS software update client gets the IP address from a web site, mentioned here. Other clients may use this method, or may query the modem or router (ddclient does that). The following code snippet will return your current public IP address from the web site:

curl "http://checkip.dyndns.org:8245/" | awk '{ print $NF }' | sed "s/<.*//"
more ▼

answered Jul 22 at 06:02 AM

Cry Havok\'s gravatar image

Cry Havok ♦
44.1k 12 26 213

Yes, I know about checkip. That's the cart-before-the-horse. The IP address needs to be transmitted to DynDNS for checkip to return that IP address. I need to get it from the modem or router BEFORE sending it to DynDNS. So I need the "other methods" you describe. Specifically getting the WAN IP from the modem, which in my case has 192.168.1.1 as the Router address. "dig" only gives me the Server address that supplied the IP address to the Router. That's the address I'm after, the WAN IP address connected to my modem.

Jul 26 at 04:07 AM dickguertin
10|600 characters needed characters left
Your answer
osqa.question.ask.tags.preview.show

© 1998-2011  Dynamic Network Services Inc.  -  Legal Notices  -  Privacy Policy  -  Contacts     

Powered by Qato