Unexpected routing with client specific overrides
-
I have an OpenVPN site-to-site tunnel configured with "subnet" topology. I am using 10.0.21.0/24 as my tunnel network. I have two other pfsense boxes connecting as clients.
Client #1: Has local networks of 192.168.10.0/24 and 192.168.20.0/24. I have defined a client specific override assigning this client 10.0.21.2/24, and defining the remote networks of 192.168.10.0/24 and 192.168.20.0/24.
Client #2: Has local network 192.168.55.0/24. I have defined a client specific override assigning this client 10.0.21.10/24, and defining the remote network of 192.168.55.0/24.
In the main server config I have defined all three networks (192.168.10.0/24, 192.168.20.0/24 and 192.168.55.0/24) as remote networks.
Both remote clients connect and get the correct tunnel IPs. Both can access the main LAN network correctly, and if I look at the routing list under Status -> OpenVPN it has the correct remote networks assigned to the correct clients.
However, in the system routing table all three remote subnets have the gateway of 10.0.21.2. I would expect that 192.168.55.0/24 should have a gateway of 10.0.21.10. This means I can access 192.168.10.0/24 and 192.168.20.0/24, but not 192.168.55.0/24. I have tried restarting the server and connecting clients in a different order but it doesn't seem to make any difference. What am I missing in my setup?
I know I could configure separate VPN server instances for each but I was thinking that this should work.
-
UPDATE: Got this fixed. Turned out I had a space after a comma in the remote networks line, so it ignored everything after it. Works as expected now!