Bernhard Rosenkraenzer wrote:
> If you have any machine with a static IP, feel free to use the sources
> I've attached. (They won't work for you without some tampering; they're
> just the quick hack I'm using to get a static hostname. Make sure the
> DNS config file they're modifying has a time-to-live etc set to VERY low
> values (I'm using 1). server needs to be run from inetd.).
'Course if you have that kind of access to a DNS server, you can set up
dynamic domains. Declare the dynamic domain in /etc/named.conf as:
--
zone "dyn.bero.org"{
type master;
allow-update {
111.111.111.0/24;
};
file "db.dyn.bero";
};
--
And the following in /var/named/db.dyn.bero:
--
$ORIGIN bero.org.
dyn 300 IN NS dns.freefilm.cx. ;Cl=3
300 IN SOA dns.freefilm.cx. root.dns.freefilm.cx. (
16061 300 600 3600000 300 ) ;Cl=3
$ORIGIN dyn.bero.org.
--
And, for the client, use the following shell script:
--
#!/bin/sh
[ -x /usr/bin/nsupdate ] || {
echo "You don't have bind-utils installed. I need
/usr/bin/nsupdate"
exit
}
PUBLIC_IP=`snmpwalk 192.168.0.1 XX-XXX
ip.ipAddrTable.ipAddrEntry.ipAdEntAddr |\ grep
'12\.18\.16.' | awk '{print $4}'`
nsupdate <<EOF
update delete dragonsdawn.dyn.eburg.com A
update add dragonsdawn.dyn.eburg.com 300 A $PUBLIC_IP
EOF
--
set the PUBLIC_IP however you like, I get it from an external DSL modem.
Given this, you should be able to maintain a dynamic IP address without
any additional software : )
MSG
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.