09/01/2025: Update to a more stable and performant version with the ability to exclude warnings from certain IP addresses.
I have a Synology router and 2 Internet connections (one with Starlink and the other with Proximus), thanks to the option on the Synology router I automatically balance one Internet connection to the other if either one is no longer available.
The problem is that my Proximus connection is a very small connection with a limited quota, I want to stay as much as possible on the Starlink connection which is unlimited, but how do I know that I am balancing one to the other? I find myself unknowingly on Proximus for days and nights at the risk of reaching the end of my quota.
So I created a small tool that installs on Synology (with the .Net Core 6.0 package installed) and sends me an email when it detects that I am on a different Internet IP address! So the balancing happened without my knowledge! Very handy!
Here is what it looks like:
2024-02-04 17:52:24.8188 INFO DetectChangeIp.Program Previous IP found: '0.0.0.0' loaded. 2024-02-04 17:52:26.9158 INFO DetectChangeIp.Program Detecting new change of Ip Address : 245.xxx.xxx.xxx - SPACEX-STARLINK
2024-02-04 17:55:26.9158 INFO DetectChangeIp.Program Detecting new change of Ip Address : 114.xxx.xxx.xxx - Proximus NV
There is a version for Windows if you do not have a Synology NAS and a Linux version
On Synology
You can run the LINUX version on Synology via a task to execute at startup
1) Make sure that the ".Net 8" package is installed on your Synology
2) Download the Linux version of the application and copy all the files into a directory of your choice on your Synology (for example in "/homes/[your username under synology]/DetectChangeIp")
3) You need to give execution permissions on the "DetectChangeIp" file (chmod +rwx DetectChangeIp), you can do this in "FileZilla" by right-clicking on the file, then "Properties" under the "Permission" tab, check all the boxes (or do it via ssh with the command "chmod +rwx DetectChangeIp")
4) On your Synology, open the "Control Panel" then "Task Scheduler"
5) Create a new "triggered" task, a window will open, make sure to select "Startup" next to "Event", this way it will launch the app "DetectChangeIp" as soon as the Synology starts
6) Under the "Task Settings" tab, you need to note the path where the "DetectChangeIp" file is located, for example: /volume1/homes/[your username under synology]/DetectChangeIp/DetectChangeIp
That's it! For the first time, manually execute the task with the "Execute" button, you can see the logs if the app is running well under the "Action" > "Show Result" button
As a 'Service' on Windows
1) Make sure you have the .Net Core 8.0 runtime
2) To install a console app as a service use nssm: https://nssm.cc/download
3) Copy the nssm file to C:\Windows\System32
4) Download the Windows version of DetectChangeIp and copy it to one of your directories
5) Open a command prompt and type: nssm install DetectChangeIpService "C:\path\to\DetectChangeIp.exe"
There you go, now if you want to stop your service, you can type: nssm stop DetectChangeIpService
* nssm restart DetectChangeIpService
* nssm remove DetectChangeIpService confirm
Config File "appSettings.json"
In the configuration file "appSettings.json", you must absolutely put an Email and a server for it to send emails to your inbox.
There is also the possibility to set exclusions, for example if you are using a VPN, you do not want it to notify you when you are under a certain IP address.
Download
For Windows: DetectChangeIp_Windows.zip
For Linux or Synology: DetectChangeIp_Linux-X64.zip
Note, for Windows or Linux (as well as Synology) you must have previously installed the .Net 8.0 Runtime (https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
Aucun commentaire pour le moment.