Compare current public IP with a DNS IP record.
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| .gitignore | ||
| check-public-ip.py | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| requirements.txt | ||
| test_check_public_ip.py | ||
check-public-ip
Compare current public IP with a DNS IP record.
check-public-ip fetches your current public IP address and compares it with the IP address resolved from a specified domain name.
This utility was originally created to verify that a dynamic DNS is kept up-to-date for my home gateway. I run a check periodically out of cron:
*/5 * * * * nobody check-public-ip --silent gw.example.org
Usage
check-public-ip [--silent|-s] HOST
Options
- --silent or -s -- Silent mode: only print output when IPs do not match
- HOST -- Domain name to check against
Requirements
- Python 3.x
- requests library
Installation
Install the required Python dependencies:
pip install -r requirements.txt
Author
Courtney Rosenthal <cr@crosenthal.com>
License
This is free and unencumbered software released into the public domain.
See LICENSE for details.