Dynamic IP address with OVH
When I was configuring my server, I realized that I only had a dynamic IP address. At the time I had two options:
- ask for a fixed IP address
- deal with my dynamic IP address to get it updated when it changes
The first option was too expensive for me. Thus, I decided to go for the second one.
Some tools exist to allow you to use a dynamic IP address with a specific domain name, such as DynDns or no.ip for example. Those tools provide scripts to update your IP address as soon as it changes. I could’t find the free option for DynDns anymore, but there is a free option for no.ip with some limitations, but it should be find for a personal use.
Before using one of the available general tools, I did some research about OVH (my registrar) and dynamic IP address. I then realized that OVH was providing some specific tools to update your IP information directly on your OVH manager. You can find more information in the DynHOST page.
I am actually using the Ipcheck.py script available from the previous link. I just had to adapt the script for my own usage. I modified the dynhost script and changed the line
IP=`/sbin/ifconfig $IFACE | fgrep "inet ad" | cut -f2 -d":" | cut -f1 -d" "`
(which was returning my local IP address)
IP=`/usr/bin/wget -qO- ipecho.net/plain`
to get the correct IP address used by OVH.
It actually works pretty well for me, Enjoy
Source: New feed