Sends a notification via Pushover if the server's external IP address changes. Useful in case you can't use dynamic DNS.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Matthew Jorgensen 156a0e5852 Remove links to old git host 1 week ago
conf Changed file logger mode 10 months ago
docs Update documentation after writing setup.py 7 months ago
.gitignore Ignoring logfiles 10 months ago
LICENSE Update LICENSE 1 year ago
README.md Remove links to old git host 1 week ago
ip.old.example removing old master commit history to clean up personal info... 2 years ago
ippush.py Linted. 4 months ago
ipv6.old.example Added example empty IPv6.old file 10 months ago
requirements.txt Upgraded py_pushover_simple 11 months ago
settings.json.example Added an indent for prettiness 11 months ago
setup.py Added backup feature to rewriting config 7 months ago

README.md

ip_push

Sends a notification via Pushover if the server’s external IP address changes. Useful in case you can’t use dynamic DNS.

External IP address is found using WTF is my IP, which requests that you rate-limit yourself to one request per minute. Failure to do so may result in being blocked.

Settings go in the settings.json file. An example is included with the proper keys, all you have to do is copy settings.json.example to settings.json update for your specific needs.

The user_key, app_token, key-values come from your Pushover account.

The server_location key-value is used to distinguish which server sent the notification, in case you use this from multiple servers that exist behind different IP addresses.

This was written and tested under Python 3.

Installation instruction are below. Additional information, including how to obtain a pushover app token, can be found in the project wiki.

Installation

Prerequisites: pip, Pushover account

  1. Clone the repository:

    git clone https://github.com/mtthwjrgnsn/ip_push.git
    
  2. Change dirs into the repo:

    cd ip_push
    
  3. Install requirements:

    pip install -r requirements.txt
    
  4. Use setup.py to configure your secrets:

    python3 setup.py
    

Scheduling

This program doesn’t include scheduling on its own. I recommend you to set up a cron job to run as often as you’d like.

Example crontab entry:

*/5 * * * * cd /path/to/ip_push; ./ippush.py >/dev/null 2>&1

This will run ippush.py every 5 minutes.

Contributors

License

This project is licensed under the terms of the MIT license.