Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ez-ipupdate update the wrong IP address
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
MAGI
n00b
n00b


Joined: 24 Sep 2005
Posts: 30

PostPosted: Tue Nov 01, 2005 12:11 am    Post subject: ez-ipupdate update the wrong IP address Reply with quote

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
View user's profile Send private message
jsfan
Apprentice
Apprentice


Joined: 28 Dec 2004
Posts: 204
Location: Melbourne, Australia

PostPosted: Wed Nov 02, 2005 2:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
langthang
Retired Dev
Retired Dev


Joined: 27 Nov 2003
Posts: 620

PostPosted: Wed Nov 02, 2005 4:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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