My router is ClearOS 6(Centos 6). In my router, I have two external (internet) network connections from two ISP's.
The primary connection is eth2 connected to a cable modem and the second one is ppp0 connected to a dsl modem. I have assigned eth2 as the primary connection (with a high metric value). In fact this is done through clearos's multiwan web interface. I have a test in my Nagios to monitor whether the primary connection. This connection is done based on the result of
But it seems that ifconfig.me is always giving the ip address of my secondary connection. I tested it through a browser. Yes ifconfig.me gives the secondary internet's(ppp0) ip address. But whatismyipaddress.[com|org] give my primary ip address (eth2). I checked the default route on the router through
ip route list 0/0
<secondary network> dev ppp0 proto kernel scope link src <secondary ip address>
<primary network> dev eth2 proto kernel scope link src <primary ip address>
<lan> dev eth0 proto kernel scope link src <lan interface address>
default via <primary gateway address> dev eth2
which also shows the primary connection (eth2) as the default route.
both seems to trace through the primary connection (eth2).
As our secondary internet connection has only got a limited download, I don't want to end up having to pay a large sum at the end of the month.
Has somebody got an idea why the ifconfig.me shows my secondary address?
What is the best way to ensure that my router(and thus the lan) use the right internet connection.