I am connected to Internet through an ADSL modem, my ISP gives me an IP address, does Ubuntu log this IP address somewhere?
How can I configure Ubuntu to log the IP address?
Or you can do it yourself, using
Some of the services:
You could create a small script to run the check and even add it as cron job to run say every time the machine reboots or at some intervals.
The simplest version could be:
Logging the address of your PC
If your modem is purely a modem and your PC connects to your ISP directly, then the IP address that it obtains will be written to the system logs in
If your ISP provides a PPP connection, then the scripts in
If your ISP provides an Ethernet connection, then the scripts in
Obtaining your Internet address
The address of your PC on the local network may not be the address that you reach the Internet with, due to NAT. NAT allows many machines on a network to make outgoing connections from a single IP address. Many ADSL modems are in fact routers and NAT appliances in addition to being a modem. If your modem offers wifi, it's almost certainly a NAT appliance. If your modem allows multiple computers to connect (without one of the computers being set up for connection sharing), it is a NAT appliance.
If your PC is behind a NAT, then the only way it can know what its Internet address is is to ask a remote machine. There are many publicly-available websites that provide this information. You can retrieve this information at any given time, but you will not know when it changes. Most ISPs will change your IP address from time to time because this facilitates load balancing in their equipment. This typically happens once a day or once every few days.
If you want to log your IP address at regular intervals, you can make a cron job. Note that if your address changes multiple times between runs of the job, you have no way to know. In your crontab:
Depending on your router model, it may be logging the IP addresses that it obtains, and there may be a way to make it send this information to your PC. This is very dependent on the router model, I can't give any general advice.