I am unable to get the traffic routed through the VPN tunnel, when using OpenVPN on OpenWRT firmware.
The router is a WRT3200ACM, connecting to OpenVPN server on Ubuntu.
OpenVPN client is connecting and I am able to ping ip's on the the remote network from SSH console on the router. However, all my connectet clients on the network are disconnected from the internet, when the OpenVPN connection is established.
The OpenVPN client configuration currently looks like this:
dev tun
proto udp
remote x.x.x.x 1194
cipher AES-256-CBC
auth SHA1
resolv-retry infinite
nobind
persist-key
persist-tun
client
redirect-gateway def1
verb 3
<ca>
-----BEGIN CERTIFICATE-----
REMOVED
-----END CERTIFICATE-----
</ca>
key-direction 1
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
REMOVED
-----END OpenVPN Static key V1-----
</tls-auth>
<cert>
-----BEGIN CERTIFICATE-----
REMOVED
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
REMOVED
-----END PRIVATE KEY-----
</key>
This configuration works perfectly on the Windows and MacOS clients, and traffic is being routed correctly, but as soon as I connect this on the Linksys WRT3200ACM router, things go wrong.
I have also tested using dd-wrt firmware on the router, but the problem was the same, however it was not possible to ping remote ip's when using dd-wrt, so the OpenWRT solution works slightly better.
The local network configuration is:
Network: 192.168.237.0
Subnet: 255.255.255.0
GW: 192.168.237.1
The remote network configuration is:
Network: 192.168.37.0
Subnet: 255.255.255.0
GW: 192.168.37.1
and the OpenVPN virtual network configuration is:
Network: 10.8.0.0
Subnet: 255.255.255.0
GW: 10.8.0.1
IP-range: 10.8.0.6-10
OpenVPN server: 10.8.0.5