Hi all,
I'm currently configuring a site2site vpn with OpenVPN and I'm having some routing issues. Hope you can help me with some tips or tricks.
First, the network layout:
As you can see, I'm using a openwrt router with openVPN on the server side and a ddwrt router on the client side.
My server configuration:
config 'openvpn' 'lan'
option 'enable' '1'
option 'port' '1194'
option 'proto' 'udp'
option 'dev' 'tun0'
option 'ca' '/etc/openvpn/ca.crt'
option 'cert' '/etc/openvpn/server.crt'
option 'key' '/etc/openvpn/server.key'
option 'dh' '/etc/openvpn/dh1024.pem'
option 'ifconfig_pool_persist' '/tmp/ipp.txt'
option 'keepalive' '10 120'
option 'comp_lzo' '1'
option 'persist_key' '1'
option 'persist_tun' '1'
option 'status' '/tmp/openvpn-status.log'
option 'push' 'route 172.20.15.0 255.255.255.0'
option 'route' '172.20.52.0 255.255.255.0'
option 'verb' '3'
option 'server' '192.168.99.0 255.255.255.0'
option 'client-config-dir' '/etc/openvpn/client-config'
topology subnet
user nobody
group nobody
client-config for this specific client:
ifconfig-push 192.168.99.10 255.255.255.0
iroute 172.20.52.0 255.255.255.0
And the client config on the ddwrt:
After configuring all this, the VPN itself is up and active. When I enable NAT on the client router, I can access the server network from the client network. Without NAT, I cannot access the server network from the client network, and also not access the client network from the server network.
When I take a look in the ipp.txt:
myclient,192.168.99.8
Output from the openvpn-status.log:
OpenVPN CLIENT LIST
Updated,Sun Sep 1 17:39:21 2013
Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
myclient,2.2.2.2:32770,1200626,1267610,Fri Aug 30 13:51:59 2013
ROUTING TABLE
Virtual Address,Common Name,Real Address,Last Ref
192.168.99.10,myclient,2.2.2.2:32770,Fri Aug 30 13:52:00 2013
GLOBAL STATS
Max bcast/mcast queue length,0
END
And my routing table on the server router:
172.20.52.0 192.168.99.2 255.255.255.0 UG 0 0 0 tun0
192.168.99.0 192.168.99.2 255.255.255.0 UG 0 0 0 tun0
192.168.99.2 * 255.255.255.255 UH 0 0 0 tun0
The client network (172.20.52.0/24) is routed to 192.168.99.2 instead of 192.168.99.10 (client router IP). This is my problem I guess...
What did I miss?