It seems that if a request originates from the client LAN, it is fine. But if it originates from the Server LAN, it has issues.
Client config
client
dev tun
proto udp
remote <serverIP> 1194
resolv-retry infinite
nobind
persist-key
persist-tun
tun-mtu 1418
tun-mtu-extra 32
fragment 1368
mssfix
ca ca.crt
cert client.crt
key client.key
verb 3
comp-lzo
keepalive 30 120
daemon
pull
Server Config. Its in the Vyatta format.....It doesn't let you directly get an openvpn config file out. Though I will keep looking.
openvpn vtun0 {
encryption bf128
mode server
openvpn-option "--comp-lzo --tun-mtu 1418 --tun-mtu-extra 32 --fragment 1368 --mssfix "
protocol udp
server {
client ddwrtclient {
ip 10.x.y.x
push-route 10.0.0.0/8
push-route 192.168.0.0/16
subnet 10.x.q.0/24
}
name-server x.x.x.x
name-server y.y.y.y
push-route 192.168.0.0/16
push-route 10.0.0.0/8
subnet 10.x.y.0/24
topology point-to-point
}
tls {
ca-cert-file /root/OpenVPN_CA.crt
cert-file /root/openvpnsrv.crt
dh-file /root/dh2048.pem
key-file /root/openvpnsrv_key2.pem
}
}
I have a feeling It may be DDWRT IP tables related. (vyatta has no firewalls between lan/vtun0 yet). DDWRT comes with a lot of default rules.
Custom DDWRT rules (create a vanilla DDWRT chain, run all vtun0 traffic through it and pop a few ports
iptables -N VPN
iptables -F VPN
iptables -I INPUT -i tun0 -j VPN
iptables -I FORWARD -i tun0 -j VPN
iptables -A VPN -i tun0 -o br0 -j ACCEPT
iptables -I POSTROUTING -t nat -o tun0 -j RETURN
iptables -I VPN 1 -i tun0 -p tcp --dport 53 -j ACCEPT
iptables -I VPN 2 -i tun0 -p udp --dport 53 -j ACCEPT
iptables -I VPN 3 -i tun0 -p icmp -j ACCEPT
iptables -I VPN 4 -i tun0 -p tcp --dport 80 -j ACCEPT
iptables -I VPN 5 -i tun0 -p tcp --dport 22 -j ACCEPT
iptables -I VPN 6 -i tun0 -p tcp --dport 443 -j ACCEPT
The full ddrwt VPN firewall
Client Firewall
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
20 2796 VPN 0 -- tun0 * 0.0.0.0/0 0.0.0.0/0
346 92439 ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 DROP udp -- eth1 * 0.0.0.0/0 0.0.0.0/0 udp dpt:520
0 0 DROP udp -- br0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:520
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:520
0 0 DROP icmp -- eth1 * 0.0.0.0/0 0.0.0.0/0
0 0 DROP 2 -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT udp -- eth1 * 0.0.0.0/0 0.0.0.0/0 udp dpt:5060
1 74 ACCEPT 0 -- lo * 0.0.0.0/0 0.0.0.0/0 state NEW
248 21631 logaccept 0 -- br0 * 0.0.0.0/0 0.0.0.0/0 state NEW
49 6897 DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
183 58894 VPN 0 -- tun0 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 47 -- * eth1 10.1.200.0/24 0.0.0.0/0
0 0 ACCEPT tcp -- * eth1 10.1.200.0/24 0.0.0.0/0 tcp dpt:1723
0 0 ACCEPT 0 -- br0 br0 0.0.0.0/0 0.0.0.0/0
54 2800 TCPMSS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU
935 288K lan2wan 0 -- * * 0.0.0.0/0 0.0.0.0/0
867 282K ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 TRIGGER 0 -- eth1 br0 0.0.0.0/0 0.0.0.0/0 TRIGGER type:in match:0 relate:0
68 5698 trigger_out 0 -- br0 * 0.0.0.0/0 0.0.0.0/0
68 5698 ACCEPT 0 -- br0 * 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 513 packets, 101K bytes)
pkts bytes target prot opt in out source destination
Chain VPN (2 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- tun0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53
0 0 ACCEPT udp -- tun0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:53
2 120 ACCEPT icmp -- tun0 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT tcp -- tun0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
0 0 ACCEPT tcp -- tun0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
0 0 ACCEPT tcp -- tun0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
181 58774 ACCEPT 0 -- tun0 br0 0.0.0.0/0 0.0.0.0/0
Chain advgrp_1 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_10 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_2 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_3 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_4 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_5 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_6 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_7 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_8 (0 references)
pkts bytes target prot opt in out source destination
Chain advgrp_9 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_1 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_10 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_2 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_3 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_4 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_5 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_6 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_7 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_8 (0 references)
pkts bytes target prot opt in out source destination
Chain grp_9 (0 references)
pkts bytes target prot opt in out source destination
Chain lan2wan (1 references)
pkts bytes target prot opt in out source destination
Chain logaccept (1 references)
pkts bytes target prot opt in out source destination
248 21631 ACCEPT 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain logdrop (0 references)
pkts bytes target prot opt in out source destination
0 0 DROP 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain logreject (0 references)
pkts bytes target prot opt in out source destination
0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp reject-with tcp-reset
Chain trigger_out (1 references)
pkts bytes target prot opt in out source destination
Here is an example of what ICMP does when "Roaming Printers" is enabled.
64 bytes from 10.1.1.1: seq=16 ttl=64 time=40.862 ms
64 bytes from 10.1.1.1: seq=17 ttl=64 time=39.092 ms
64 bytes from 10.1.1.1: seq=18 ttl=64 time=40.135 ms
64 bytes from 10.1.1.1: seq=19 ttl=64 time=62.107 ms
64 bytes from 10.1.1.1: seq=20 ttl=64 time=41.330 ms
64 bytes from 10.1.1.1: seq=21 ttl=64 time=41.533 ms
64 bytes from 10.1.1.1: seq=22 ttl=64 time=38.375 ms
64 bytes from 10.1.1.1: seq=23 ttl=64 time=46.089 ms
64 bytes from 10.1.1.1: seq=24 ttl=64 time=41.163 ms
64 bytes from 10.1.1.1: seq=25 ttl=64 time=38.488 ms
64 bytes from 10.1.1.1: seq=26 ttl=64 time=49.573 ms
64 bytes from 10.1.1.1: seq=31 ttl=64 time=43.499 ms
64 bytes from 10.1.1.1: seq=32 ttl=64 time=35417.249 ms
64 bytes from 10.1.1.1: seq=33 ttl=64 time=34431.188 ms
64 bytes from 10.1.1.1: seq=34 ttl=64 time=33431.231 ms
64 bytes from 10.1.1.1: seq=35 ttl=64 time=32422.653 ms
64 bytes from 10.1.1.1: seq=36 ttl=64 time=31430.424 ms
64 bytes from 10.1.1.1: seq=37 ttl=64 time=30422.234 ms
64 bytes from 10.1.1.1: seq=38 ttl=64 time=29412.690 ms
64 bytes from 10.1.1.1: seq=39 ttl=64 time=28405.486 ms
64 bytes from 10.1.1.1: seq=40 ttl=64 time=27395.776 ms
64 bytes from 10.1.1.1: seq=41 ttl=64 time=26404.658 ms
64 bytes from 10.1.1.1: seq=67 ttl=64 time=147.224 ms
64 bytes from 10.1.1.1: seq=68 ttl=64 time=40.070 ms
64 bytes from 10.1.1.1: seq=69 ttl=64 time=41.228 ms
64 bytes from 10.1.1.1: seq=70 ttl=64 time=42.467 ms