A lightweight Go-based utility designed for Linux servers to monitor network interface IP changes and verify internet connectivity. It provides notifications via your Terminal or Telegram.
- IP Monitoring: Detects changes in IP addresses in network interfaces.
- Connectivity Validation: Verifies internet access for each specific interface address.
- Telegram Integration: Supports remote alerts via Telegram bot (Token & Chat ID).
- Cross-Platform: Easily build for various architectures using the included Taskfile.
The program requires a configuration file located at a specific path. Create and edit the following file:
Path: /usr/local/etc/network-check.toml
Example Configuration:
interface = "eth0" # Linux network interface.
[connection]
domains = [ "google.com" ] # Domain wich will be pinged to check network connectivity.
[dns] # This will check if one of the domain ip match a interface IP.
domains = [ "mydomain.com" ]
interval = 3600 # Each run checks if this interval has passed from last check, if not, dns check will be ignored.
[log.telegram] # Telegram notification, remove to ignore
token = "token"
chatId = 0123456789This project uses Task to manage builds. You can compile the binary for your specific architecture using the following commands:
| Target Platform | Command |
|---|---|
| Linux (64-bit) | task build-linux-amd64 |
| Linux (ARM) | task build-linux-arm |
| Windows (64-bit) | task build-windows-amd64 |
Once configured and built, run the binary:
./network-checkThe application will check your interfaces. If an IP change is detected and the domain IP address is not in the interface address, an alert will be sent to your terminal output and your Telegram chat.
- Go (1.21 or higher recommended)
- Task (for running build scripts)
- Linux/Windows environment