Timeline for How to monitor two internet connections to detect outages and switch to the active one when one is down
Current License: CC BY-SA 4.0
18 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 12, 2022 at 22:34 | vote | accept | Daniel Ribeiro | ||
Aug 12, 2022 at 21:15 | comment | added | Blindspots | I modified the script to eliminate the log file location issue I noted earlier. | |
Aug 10, 2022 at 21:35 | comment | added | Blindspots | I have updated the script and you can give it a test drive. Let me know if you have any questions or issues with it. | |
Aug 10, 2022 at 20:03 | history | edited | Daniel Ribeiro | CC BY-SA 4.0 |
edited body
|
Aug 10, 2022 at 18:16 | history | edited | Daniel Ribeiro | CC BY-SA 4.0 |
added 76 characters in body
|
Aug 10, 2022 at 17:17 | comment | added | Daniel Ribeiro |
Yes @BlindSpots , I can ping both connections from my LAN. 192.168.15.1 is the IP address of my Main Modem, 192.168.0.1 is the IP address of my Backup Modem, and 192.168.5.1 is the IP address of my Multi-wan router (it's also the gateway IP and the DHCP server of the LAN).
|
|
Aug 10, 2022 at 14:46 | history | edited | Giacomo1968 | CC BY-SA 4.0 |
Clarifying title.
|
Aug 10, 2022 at 8:00 | answer | added | Blindspots | timeline score: 0 | |
Aug 9, 2022 at 23:55 | comment | added | Blindspots | quick question. Can you successfully ping 192.168.15.1 and 192.168.0.1 from the LAN when the respective WAN connection is live, but not otherwise? | |
Aug 9, 2022 at 18:58 | history | edited | Daniel Ribeiro | CC BY-SA 4.0 |
added 165 characters in body
|
Aug 9, 2022 at 18:54 | comment | added | Daniel Ribeiro | About your first comment @BlindSpots, It's a gigabit multi-wan router that works fine and I paid 50 USD. It works fine for it's price. I don't know exactly how can it determine if a connection is down or not. It has 3 settings for that: "Automatic", "Ping" and "DNS". I just leave it in "Automatic" and it works just fine. It in fact has SYSLOG functionality, but unfortunately it doesn't has any event when it switches the connections or when it detects a connection is down or up. | |
Aug 9, 2022 at 18:44 | history | edited | Daniel Ribeiro | CC BY-SA 4.0 |
Fixed to give more details on what I already tried
|
Aug 9, 2022 at 18:40 | comment | added | Daniel Ribeiro | Alright @BlindSpots, thanks for the feedback. I just edited the question. Thank you for taking the time to watch over my problem. | |
Aug 9, 2022 at 18:39 | history | edited | Daniel Ribeiro | CC BY-SA 4.0 |
Fixed to give more details on what I already tried
|
Aug 8, 2022 at 17:34 | comment | added | Blindspots | You have at least two ways already. Mine and yours. You should edit your question to focus in on the actual problem which is how to run that from a script and parse the result and send an email based on the change. Be as clear as possible and let us know what you have done and what you don't know how to do. OS involved. Your knowledge of scripting etc. | |
Aug 5, 2022 at 23:18 | comment | added | Daniel Ribeiro |
Thanks for replying @BlindSpots. A simple way I can imagine (for checking which connection is in use) is by running tracert -d -h 2 -4 8.8.8.8 (on Windows) or traceroute -4 -n -m 2 8.8.8.8 (on Linux). It'll return the IP address of the modem used to reach the internet. If it's 192.168.15.1 I know the main link is in use, but if it's 192.168.0.1, I know the main connection is down and the backup connection is in use. I just don't know how to automate this verifications and get notifications for that.
|
|
Aug 2, 2022 at 22:16 | comment | added | Blindspots | The fact that the router doesn't manage that is a big dealbreaker. You want to duplicate the router's monitoring functionality but off the router? Merely determining what constitutes up or down is complex. FYI the router supports syslog upload which you could use to create email notification locally, but from a cursory read, users report it to be GIGO. It is a more simple matter to detect the WAN IP switchover using a local script (icanhazip.com)or dyndns client. | |
Aug 2, 2022 at 20:57 | history | asked | Daniel Ribeiro | CC BY-SA 4.0 |