toadbrother
I have quite successfully been using OpenVPN for the last three or four years to connect our three locations together. The head office acts as the VPN server and the two branches are clients with routed networks. As well, we've had our road warriors connecting in through the main office VPN server. Each OpenVPN install is sitting on the gateway router at each location.
Recently one of the road warriors has been using one of the branches offices a lot, and so I decided it would be sensible for that branch's gateway to also host a VPN server. So I created a separate server config that loads along with the client config.
What is happening is that a client connected to the branch's OpenVPN server can access the branch's LAN, but cannot access the main office or other branch's LAN. No matter how I muck with the routing table, the tun0 and tun1 devices cannot seem to route to each other. These are my configs:
Main Office Server Config
===================
port 1194
proto udp
dev tun
ca server/ca.crt
cert server/server.crt
key server/server.key
dh server/dh1024.pem
server 10.0.12.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 10.0.0.0 255.255.252.0"
push "dhcp-option DNS 10.0.0.2"
client-config-dir server/ccd
route 10.0.4.0 255.255.252.0
route 10.0.8.0 255.255.252.0
client-to-client
keepalive 10 60
#ping-timer-rem
comp-lzo
persist-key
persist-tun
status /var/log/openvpn/server.log
verb 3
This is the branch office client config
===========================
client
dev tun
proto udp
remote main.office.ip 1194
resolv-retry infinite
nobind
persist-key
persist-tun
keepalive 10 60
ping-timer-rem
ca portalberni/ca.crt
cert portalberni/client1.crt
key portalberni/client1.key
comp-lzo
status /var/log/openvpn/portalberni.log
verb 3
push "route 10.0.8.0 255.255.252.0"
route 10.0.4.0 255.255.252.0
route 10.0.0.0 255.255.252.0
And finally that branch's server config
============================
port 1194
proto udp
dev tun
ca server/ca.crt
cert server/server.crt
key server/server.key
dh server/dh4096.pem
server 10.0.13.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 10.0.8.5"
push "route 10.0.0.0 255.255.252.0"
push "route 10.0.4.0 255.255.252.0"
push "route 10.0.8.0 255.255.252.0"
client-config-dir server
client-to-client
keepalive 10 60
comp-lzo
persist-key
persist-tun
status /var/log/openvpn/server.log
verb 3