grogi
Occasional Visitor
There seems to be an issue with the iptables rules to force DNS traffic through the tunnel created by VPN Director. They are being lost when some of the services restart, I lack the internal knowledge to pinpoint which exactly. I originally though it was
To reproduce:
- activate a OpenVPN connection, exp. OpenVPN Client 1
- create a rule for that connection in VPNDirector, click apply the rules
- check the
- change the DNS that is broadcasted to the client devices (LAN -> DHCP Server page)
- router restarts services (a rather long cycle that goes over 3%, 7%...). Syslog says:
- check the
Those rules will not be until user manually clicks Apply in the VPN Director tab in the router UI. They don't get recreated on router restart either.
Example:
After I changed the DNS advertised by the LAN/DHCP server screen, router got a bit busy restarting some services. When it came back, the
Once I go to VPN Director page and click apply, the rules come back. Selective routing reported by
We are interested in the two PREROUTING rules disappearing (there will be more if more clients are configured), as well as the complete DNSVPNx chains.
dnsmasq
restart (trigger by exp. changing the lease time of DHCP leases), but this alone doesn't trigger the issue.To reproduce:
- activate a OpenVPN connection, exp. OpenVPN Client 1
- create a rule for that connection in VPNDirector, click apply the rules
- check the
iptables-save -t nat
table- change the DNS that is broadcasted to the client devices (LAN -> DHCP Server page)
- router restarts services (a rather long cycle that goes over 3%, 7%...). Syslog says:
rc_service: httpd 13637:notify_rc restart_net_and_phy
- check the
iptables-save -t nat
table again. DNS Intercept rules are missing.Those rules will not be until user manually clicks Apply in the VPN Director tab in the router UI. They don't get recreated on router restart either.
Example:
Code:
#:> iptables-save -t nat
# Generated by iptables-save v1.4.15 on Thu Sep 15 20:44:42 2022
....
-A PREROUTING -p tcp -m tcp --dport 53 -j DNSVPN2
-A PREROUTING -p udp -m udp --dport 53 -j DNSVPN2
-A PREROUTING -d 192.168.178.4/32 -j GAME_VSERVER
-A PREROUTING -d 192.168.178.4/32 -j VSERVER
-A PREROUTING -i br+ -p udp -m udp --dport 53 -j DNSFILTER
-A PREROUTING -i br+ -p tcp -m tcp --dport 53 -j DNSFILTER
-A POSTROUTING -o tun12 -j MASQUERADE
-A DNSFILTER -j DNAT --to-destination 192.168.178.16
-A DNSVPN2 -s 192.168.178.20/32 -j DNAT --to-destination 10.200.0.1
COMMIT
After I changed the DNS advertised by the LAN/DHCP server screen, router got a bit busy restarting some services. When it came back, the
Code:
#:> iptables-save -t nat
# Generated by iptables-save v1.4.15 on Thu Sep 15 20:50:47 2022
...
-A PREROUTING -d 192.168.178.4/32 -j GAME_VSERVER
-A PREROUTING -d 192.168.178.4/32 -j VSERVER
-A PREROUTING -i br+ -p udp -m udp --dport 53 -j DNSFILTER
-A PREROUTING -i br+ -p tcp -m tcp --dport 53 -j DNSFILTER
-A POSTROUTING -o tun12 -j MASQUERADE
-A DNSFILTER -j DNAT --to-destination 192.168.178.16
COMMIT
Once I go to VPN Director page and click apply, the rules come back. Selective routing reported by
ip rule
is not affected.We are interested in the two PREROUTING rules disappearing (there will be more if more clients are configured), as well as the complete DNSVPNx chains.
Code:
-A PREROUTING -p tcp -m tcp --dport 53 -j DNSVPN2
-A PREROUTING -p udp -m udp --dport 53 -j DNSVPN2
-A DNSVPN2 -s 192.168.178.20/32 -j DNAT --to-destination 10.200.0.1
Last edited: