ipchanger-daemon
ipchanger-daemon is a small Java service that keeps remote‑access firewalls in sync with your current, dynamic WAN IP address.
Originally written for AWS Security Groups, it now also supports the OVHcloud Edge Network Firewall—so you can protect EC2 instances and OVH VPS/dedicated servers from the same daemon.
Features
- Multiple providers:
aws
– updates one or more security‑groups.ovh
– updates one or more edge‑firewall rules (per‑IP firewall).
- Polymorphic JSON config – extend with new providers without touching the core daemon.
- Runs as a foreground process, systemd service, or Apache ``** daemon**.
- Java 11+
Build
Java 11+, Maven and Git are required:
git clone https://github.com/aprilsoftware/ipchanger-daemon.git
cd ipchanger-daemon
mvn package
target/
will now contain the runnable ipchanger-daemon.jar
.
Credentials
AWS
The AWS SDK looks for credentials in ~/.aws/credentials
. The simplest setup is the default profile:
[default]
aws_access_key_id = XXX
aws_secret_access_key = YYY
OVHcloud
Create an API Key:
Rights:
GET: /ip/*/firewall/*/rule/*
POST: /ip/*/firewall/*/rule
DELETE: /ip/*/firewall/*/rule/*
Configuration
Create ipchanger.json
in the working directory. Below is a minimal dual‑provider example:
{
"delay": 0,
"frequency": 5000,
"url": "https://api.ipify.org",
"verbose": false,
"providers": [
{
"type": "aws",
"securityGroups": [
{
"groupId": "sg-xxxxxxxxxxxx",
"region": "eu-central-1",
"permissions": [
{ "ipProtocol": "tcp", "fromPort": 22, "toPort": 22 }
]
}
],
"postIpChangeCommand": "" // optional
},
{
"type": "ovh",
"endpoint": "eu",
"ip": "100.0.0.1",
"firewallRules": [
{
"sequence": 0, // 0‑19
"action": "permit",
"protocol": "tcp",
"sourcePort": 0, // optional
"destinationPort": 22
}
],
"postIpChangeCommand": "" // optional
}
]
}
Running
java -jar target/ipchanger-daemon.jar ipchanger.json
Run it as a daemon on Linux
You can run ipchanger-changer as a daemon using jsvc.
Debian package
Download the latest Debian package from the release page.