Add some more routes to OpenVPN exported profiles for Mac and Win
-
Hi there,
please excuse my total lack of knowledge for OpenVPN, I just started playing with it.
I have a pfsense 2.0.2 firewall with 3 subnets and one openVPN subnet:
LAN: 172.16.1.0/24
Opt1: 192.168.190.0/24
Opt2: 10.0.0.1/24
VPN Network: 10.13.37.0/24What I would like is to include some additional OpenVPN parameters into the export wizard field so I can reach all these 4 subnets via VPN (thus adding routes to every subnet).
I would like this to work for the exported viscosity bundle as well as the windows OpenVPN installers.
When I click "route all traffic through this VPN" in Viscosity I can reach all networks, but I don't want all traffic through vpn, just routes for these networks.
I played round with Viscosity and got this from the config:
route 192.168.190.0 24 vpn_gateway default
route 172.16.1.0 24 vpn_gateway default
route 10.0.0.0 24 vpn_gateway defaultDoes not work for the windows client.
I googled some and adapted my settings for the Windows OpenVPN client:
route add 172.16.1.0 mask 255.255.255.0 10.13.37.1 metric 1 -p
route add 192.168.190.0 mask 255.255.255.0 10.13.37.1 metric 1 -p
route add 10.0.0.0 mask 255.255.255.0 10.13.37.1 metric 1 -pThis does not work on the Mac (also doesn't work on Windows).
Could you please advise me on how to add these routes to the Additional configuration options? Thank you!
-
example:
push "route 192.168.0.0 255.255.255.0" ;
-
You're overcomplicating things quite a bit.
You can push from the server config as heper mentioned, or in the client config:
route x.x.x.x y.y.y.y
Where x.x.x.x is the IP/subnet, and y.y.y.y is the subnet mask.
-
Thank you so much! :)