normal default gateway reapperas with openvpn redirect-gateway
Hi folks,
I'm using OpenWRT on a WRT54GS.
I'm using wifidog in combination with openvpn. For those of you familiar with wifidog, my auth server is located at the other end of an openvpn tunnel and the "wifi dog gateway" is running on the WRT itself.
I'm don't really think that wifi dog is the issue. Basically, I'm using openvpn with the "redirect-gateway" option which works well. In this mode, openvpn removes my current default gateway setting and adds the remote openvpn server as the default gateway (as it should). However, overnight, my default gateway on the local network keeps reapperaing (along with the openvpn one as well). This causes confusion and i don't want any packets (But ovbiously the connection to the actual openvpn server) to go down this local gateway.
Why do you think it reappears? Do you reckon openvpn is dropping connection and somehow the normal gateway is being added back?
I *could* run a cron script which runs every minute or so with something like "route del default gw xx.xx.xx.xx" (where xx.xx.xx.xx is the default gateway which I don't want to be there) but that is quite messy and means that if I were to ever move the router I would need to reconfigure this and considering that I would like in the future to have many of these wifi dog gateways, this really isn't an ideal option (as every network will have a different default gateway).
Thanks for the help
Cheers
|