View previous topic :: View next topic |
Author |
Message |
RageX^NZ n00b
Joined: 26 May 2003 Posts: 58 Location: Mount Maunganui, NEW ZEALAND
|
Posted: Wed Jul 30, 2003 9:58 am Post subject: Updating DynDNS when DHCPCD gets a new IP Address (it dont) |
|
|
Hi All, my first ever post on this forum.
I have managed to set up Gentoo on my dual 550 machine and it is running beutifully. However i have encountered one snag that is holding me up.
I have a D-Link DSL-300+ Ethernet DSL Modem, this spoofs the IP address assigned by my ISP through to eth2 on the gentoo box using some DHCP/Mac trickery. This works perfectly (as it did with redhat). However on redhat I used EZIPipdate so that when the IP address changed on that interface it would connect to DynDNS and update my records.
On gentoo I am using DDCLIENT, which looks very nice, and when manually run it updates DynDNS perfectly. I read them manual which told me to copy the "dhcpcd-eth2.exe" script into "/etc/dhcpc/" which I have done. Whenever the DHCP client gets a new IP address it is meant to update DynDNS automatically, However it DOES NOT. When I run the "dhcpcd-eth2.exe" script manually it also work perfectly.
It appears that when the IP changed DHCPCD does not run the "dhcpcd-eth2.exe" script and so does not update.
I tried going into "/etc/conf.d/net" and editing the dhcpd conf line to read "dhcpcd_eth2="-c /etc/dhcpc/dhcpcd-eth2.exe", and restarted net.eth2 and it STILL doesnt work.
Anyway I am getting angry at it now so ANY help or suggestions are very appreciated. |
|
Back to top |
|
|
carbon Guru
Joined: 27 Jun 2003 Posts: 455 Location: New York
|
Posted: Wed Jul 30, 2003 2:06 pm Post subject: |
|
|
soprry i cant help you , but i have a opposite problem
dyndns deleted my hostname said my router is updating ip too much which blocks the hostname, and they have to constantly unblock it for me, so after a week, i reached the limit and they kicked me out _________________ I do what I want, and that's what I do.
GNU World Domination
Carbon |
|
Back to top |
|
|
SpinDizzy n00b
Joined: 28 May 2003 Posts: 63 Location: Moss Vale, Australia
|
Posted: Wed Jul 30, 2003 2:20 pm Post subject: |
|
|
Rage, the problem is that the behaviour of dhcpcd has changed. The script supplied with the ddclient wont work. I hacked up my script to this:
dhcpcd.exe
Code: |
#!/bin/sh
######################################################################
## $Header: /home/paul/src/ddclient/RCS/sample-etc_dhcpc_dhcpcd-eth0.exe,v 3.5 2001/08/25 14:22:00 root Exp root $
######################################################################
PATH=/usr/sbin:/root/bin:${PATH}
## update the DNS server unless the IP address is a private address
## that may be used as a internal LAN address. This may be true if
## other interfaces are assigned private addresses from internal
## DHCP server.
# Do we need to change?
if [ $2 != "new" ]; then
logger -t dhcpcd String: $2
exit 0;
fi
# Find the new address
IP_ADDR=`grep IPADDR $1 | cut -d = -f2`
case "$IP_ADDR" in
10.*) ;;
172.1[6-9].* | 172.2[0-9].* | 172.31.*) ;;
192.168.*) ;;
*)
logger -t dhcpcd IP address changed to $IP_ADDR
ddclient -daemon=0 -syslog -use=ip -ip=$IP_ADDR >/dev/null 2>&1
;;
esac
|
From memory the main difference is that dhcpcd now passes the called script with two arguments, neither of which is the newly assigned IP. Arg 1 is the name of the info file (inside of which is the assigned IP) and arg 2 is the state of the change (eg: whether the IP has changed or it is reassigned the same IP).
The first logger statement in the above script is something I put in for debugging purposes (I think).
I've yet to make a bug report to any developer/maintainer regarding this matter, so if you have the time, feel free. |
|
Back to top |
|
|
carbon Guru
Joined: 27 Jun 2003 Posts: 455 Location: New York
|
Posted: Wed Jul 30, 2003 5:01 pm Post subject: |
|
|
your hacked script is regarding can or cannot update ip with the DNS server? _________________ I do what I want, and that's what I do.
GNU World Domination
Carbon |
|
Back to top |
|
|
|