IPChecker is a simple Go application that periodically checks your public IP address and can be configured to send you an email and/or update your DNS of choice when it changes. This can be useful if you need to remotely access your home network and your ISP assigns you a dynamic IP address. Used for Dynamic Domain Name Service (DDNS) purposes.
Prerequisites
Before running IPChecker, you need to have the following:
A stationary system that can run Go applications
Docker installed on the system
If you want to use SendGrid, you will also need the following
A working email account that can send and receive emails
A SendGrid account and API key
Installation
Clone this repository to your local machine
Install the dependencies using the following command:
go mod download
Set the necessary environment variables by creating a .env file at the root of the project directory. The following variables are required:
CURRENT_IP #SET THIS TO 11.111.111.111
Build the application using the following command:
make build
make run
Environment Variables
Cloudflare:
Name
Description
CLOUDFLARE_ZONE_ID
Your DNS zone ID. Can also be found by updating all env variables and running make get-dns-id