Question

I have a web application running on a remote server. People working with the web app can send SMTP commands from within the application to remote electronic boards at another location to switch lights on and off.

However at the location where the electronic boards are placed, we have 2 internet connections: 1 Telenet (Belgium, cable) as primary WAN and 1 Belgacom (Belgium, VDLS) as backup WAN. Our router switches automatically between the 2 WANS whenever one goes down.

In the web application I need to check on which WAN I can connect to the boards. So I need to check from withing the web application via which WAN connection the boards are connected to internet?

Was it helpful?

Solution

I found a solution. My primary WAN gives me a static IP, which I know. So I let the web application lookup the IP address associated with the hostname of my remote location (where the electronic boards are located). If this is equal to the static IP of the primary WAN, I know which provider is giving me access on the remote location.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top