I have setup a openvpn server on a remote server configured to allow clients to access each other's subnet.
Basic scenario like this:
Server: 192.168.120.0/24
Client1: 192.168.0.0/24
Client2: 10.78.20.0/24
I want client2 connect to the server and be able to access 192.168.0.0/24. I have added the following to server.conf:
Code: Select all
dev tun
push "route 192.168.0.0 255.255.255.0"
route 192.168.0.0 255.255.255.0 default 30 # I have to lower the metric because client1 is the LAN gateway and this route will override the LAN route on client1 and cause the LAN to break
Code: Select all
iroute 192.168.0.0 255.255.255.0
Then I wanted to configure static IP addresses for the clients. So I added ifconfig-push to the ccds. From that point client2 can't reach client1's subnet anymore, nor the server can.
I noticed that the samples in server.conf had the IP addresses swapped for ifconfig-push but it doesn't matter which way I put it they simply don't work. Remove ifconfig-push and everything worked as expected.
Can anyone think of any explanations?