Hi everyone
I have a (basic) working Open VPN setup using my tp-link wr1043nd with DD-WRT firmware as server, but I also have one problem which have been bothering me since day one:
Once connected to my VPN server I cannot access local resources (for example administer my router via it's webinterface) and since my router is also my DNS server my name resolution goes right out the window.
Please find my serverconfig (from my DD WRT router) and client config (openvpn+openvpn gui) below.
Some more information / discussion:
My local LAN: 10.13.37.0 / 255.255.255.0
Remote LAN: 10.0.1.0 / 255.255.255.0
VPN server: 10.0.60.0 / 255.255.255.0
When _not_ connected to VPN:
From my local lan (with an ip of say 10.13.37.112)
- I can access my local router via ip 10.13.37.1 and I can ping it
- I can resolve names (i.e. asking the browser to open google.dk actually gives me the danish version of Google's search engine)
- I can _not_ access 10.0.1.1 (which is the remote router / vpn server) via a webbrowser (for administration purposes) and I can _not_ ping it
- I can _not_ use RDP to connect to computer 10.0.1.147 and I can _not_ ping it (ICMP enabled in firewall)
- I can (still) use RDP to connect to computer 10.13.37.139 (which is the same computer as 10.0.1.147, just using a secondary nic) but I can _not_ ping it
- I can use RDP to connect to computer 10.13.37.104 (which is a laptop, only connected to the local LAN)
When connected to VPN:
From my local lan (with an ip of say 10.13.37.112)
- I can _not_ access my local router via ip 10.13.37.1 and I can _not_ ping it
- I can _not_ resolve names (i.e. asking the browser to open google.dk fails during the look up stage), but I can still access remote services (e.g. a website) using it's ip address. So Google's search engine can now be found at 74.125.143.94.
- I can access 10.0.1.1 (which is the remote router / vpn server) via a webbrowser (for administration purposes) and I can ping it
- I can use RDP to connect to computer 10.0.1.147 but I can _not_ ping it (ICMP enabled in firewall)
- I can use RDP to connect to computer 10.13.37.139 (which is the same computer as 10.0.1.147, just using a secondary nic) but I can _not_ ping it
- I can _not_ use RDP to connect to computer 10.13.37.104 (which is a laptop, only connected to the local LAN)
I think the above experiences are do to the fact that all traffic is going through the VPN tunnel. This fits the above because:
1) EDIT: ping (ICMP) works on layer 3, so ping should work over routed vpn. Why it does not work I do not know. See bottom of post for original 1).
2) RDP to the local-LAN-only laptop stops working because the traffic goes through the VPN to the remote lan and it does not go back again
3) RDP to 10.13.37.139 (which is also available via VPN on ip 10.0.1.147, remember it has two nics, one for each LAN) somehow still works due to the two NICs (for reasons unknown to me)
4) Name resolution (which is the same as access to my local router 10.13.37.1) stops working for the same reson as 2). The traffic goes over the VPN and does not come back.
I how ever have NO idea WHAT SO EVER as how to fix it. I read a little about split-tunneling which should allow local traffic to go out on the local network (i.e. dns, http request for browsing etc) and only traffic for remote services to go over the VPN, but I have not succeeded in configuring it.
Any advice is much appreciated!
Best regards
Wuhtzu
Server config
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
keepalive 10 120
verb 4
mute 5
log-append /var/log/openvpn
writepid /var/log/openvpnd.pid
management 127.0.0.1 5002
management-log-cache 50
mtu-disc yes
topology subnet
client-config-dir /tmp/openvpn/ccd
script-security 2
port 1194
proto udp
cipher bf-cbc
auth sha256
tls-server
ifconfig-pool-persist /tmp/openvpn/ip-pool 86400
client-to-client
fast-io
tun-mtu 1500
server 10.0.60.0 255.255.255.0
dev tun0
push "route 10.0.1.0 255.255.255.0"
push "route 10.13.37.0 255.255.255.0"
push "route 192.168.1.0 255.255.255.0"
push "route 192.168.0.0 255.255.255.0"
Client config
client
dev tun
proto udp
remote xxx.yyy.dk 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert jonas.crt
key jonas.key
ns-cert-type server
cipher BF-CBC
verb 3
auth SHA256
Edit: Original 1)
ping requests (which works on layer 2) are not forwarded over routed vpn (which works on layer 3) so that's why pinging is not working