View previous topic :: View next topic |
Author |
Message |
MAGI n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 24 Sep 2005 Posts: 30
|
Posted: Tue Nov 01, 2005 12:11 am Post subject: ez-ipupdate update the wrong IP address |
|
|
My Gentoo Linux is running behind a router. When ez-ipupdate try to update the IP address, it sends the LAN IP address rather than the WAN IP address, how can I do with this issue ? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jsfan Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 28 Dec 2004 Posts: 204 Location: Melbourne, Australia
|
Posted: Wed Nov 02, 2005 2:13 pm Post subject: |
|
|
I don't think ez-ipupdate can deal with NAT-ted networks. You'd need a server outside that determines you public ip address. Dyndns.org even does so for you if you access it manually, but I don't think that you can use that info with ez-ipupdate.
Is your router unable to do the dynDNS updates? Some hw routers can do that for you, too. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
langthang Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
Joined: 27 Nov 2003 Posts: 620
|
Posted: Wed Nov 02, 2005 4:01 pm Post subject: |
|
|
If you search the forum, there are many srcipts for ez-ipupdate. I run this one (don't remember where I got it from) with cron.
Code: | #!/usr/bin/python
#
# Finds the external ip address of the gateway using a web checker
# then calls ez-ipupdate with the ip.
# Set up a cron job to call this every few minutes.
import urllib
import re
import os
page = urllib.urlopen("http://checkip.dyndns.org")
html = page.read()
ip = re.search(r"[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+", html)
if ip:
os.execl('/usr/sbin/ez-ipupdate','ez-ipupdate','-c','/path/to/myhost.dyndns.org.ipupdate.conf','-a', ip.group(0)) |
myhost.dyndns.org.ipupdate.conf is a config file for dyndns, read "/usr/share/doc/ez-ipupdate-*/examples/example-dyndns.conf.gz" for example. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|