ChrisRChamberlain
Programmer
Hi all
Wish to get the public IP address of a Ubuntu server running on a LAN and either save it to a file or a system variable for use in a CRONTAB script
The command used is:-
This displays the IP address in the command window.
By saving it to either a file or variable, it would mean that a suitable script might be created to check for changes to a dynamic IP address.
If a change is detected, the DNS servers at ZoneEdit.com could be updated.
I am aware of ddclient and have been using it, but for some reason it no longer works on either main or backup server.
Any ideas would be appreciated.
TIA
![[pc2] [pc2] [pc2]](/data/assets/smilies/pc2.gif)
PDFcommander.com
motrac.co.uk
Wish to get the public IP address of a Ubuntu server running on a LAN and either save it to a file or a system variable for use in a CRONTAB script
The command used is:-
Code:
wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 'S/<.*$//'
This displays the IP address in the command window.
By saving it to either a file or variable, it would mean that a suitable script might be created to check for changes to a dynamic IP address.
If a change is detected, the DNS servers at ZoneEdit.com could be updated.
I am aware of ddclient and have been using it, but for some reason it no longer works on either main or backup server.
Any ideas would be appreciated.
TIA
FAQ184-2483
Chris ![[pc2] [pc2] [pc2]](/data/assets/smilies/pc2.gif)
PDFcommander.com
motrac.co.uk