I just had a thought what might be the problem.
I remember some versions back john added a feature to prevent ipv6 dns leakage when using VPN, those rules may have been created then.
Also notice I got duplicates of the rules, so I now have an idea whats going on, because whenever I shutdown my VPN the exit script crashes which I assume has not been able to run all of its commands. I did report the crash several months back but both merlin and john said it was something I could ignore.
So I believe when I start my VPN the rules get created, and they are supposed to be removed on VPN shutdown but are not because the exist script crashes.
here is extract of openvpn shutdown error
Code:
Oct 5 00:21:42 openvpn[24919]: event_wait : Interrupted system call (code=4)
Oct 5 00:21:42 openvpn[24919]: vpnrouting.sh tun11 1500 1562 192.168.0.2 255.255.255.0 init
Oct 5 00:21:42 openvpn[24919]: WARNING: Failed running command (--up/--down): could not execute external program
Oct 5 00:21:42 openvpn[24919]: Exiting due to fatal error
confirmed its openvpn, this is in the updown.sh script, there is also other stuff in the up code which adds the rules.
Code:
/usr/sbin/ip6tables -D INPUT -i $lan_if -p tcp -m tcp --dport 53 -j REJECT
/usr/sbin/ip6tables -D INPUT -i $lan_if -p udp -m udp --dport 53 -j REJECT
I am trying to look now why the script fails to run when openvpn is shutdown.
Note this is the default updown.sh script I am not using a custom one.