You need two things. One, a push route on the OpenVPN server to send the clients a route. push "route 192.168.0.0 255.255.255.0" Then a second phase 2 with the local being 10.1.0.0/24 and remote 192.168.0.0/24, and vice versa on the remote end.

Dec 28, 2017 · push "route 10.50.0.0 255.255.255.0"; push "route 10.254.0.0 255.255.255.0"; Redirecting the default gateway ¶ OpenVPN also allows the default gateway to be redirected across the VPN, so all non-local traffic from the client is sent through the VPN. Usage: --pull-filter accept|reject "option string" Permit a client to selectively accept or reject options pushed by the server. May be used multiple times. The filters are applied in the order specified to each pushed option received. set interfaces openvpn vtun0 server push-route 192.168.1.0/24 set interfaces openvpn vtun0 server name-server 192.168.1.1. 20. Link the server certificate/keys and DH Amigos, Abaixo minha configura=E7=E3o onde tenho uma matriz e uma filial. = Preciso agora colocar tuas filiais nesta vpn. Naturalmente alem das = questao de certificados e etc a questao das rotas como fica ?

# Push routes to the client to allow it # to reach other private subnets behind # the server. Remember that these # private subnets will also need # to know to route the OpenVPN client # address pool (10.8.0.0/255.255.255.0) # back to the OpenVPN server.;push "route 192.168.10.0 255.255.255.0" push "route 192.168.222.0 255.255.255.0 "

push "route 172.25.87.0 255.255.255.0" This will tell OpenVPN clients that when the computer tries to access any IP address in the 172.25.87.0 subnet that it should route through our OpenVPN server (as the default gateway for this network). Wed Feb 24 12:31:01 2016 OpenVPN ROUTE: OpenVPN needs a gateway parameter for a –route option and no default was specified by either --route-gateway or --ifconfig options Wed Feb 24 12:31:01 2016 OpenVPN ROUTE: failed to parse/resolve route for host/network: 10.0.0.0 Wed Feb 24 12:31:01 2016 open_tun, tt->ipv6=0

while this works it's annoying to have to do this everytime I connect, and as well sometimes my openVPN server gives me a different address instead of 10.0.8.6 (say, 10.0.8.7) First, I'm hoping there's a way to stick the route command into the config file that openVPN (or in this case, tunnelblick) uses to connect so it'll run it automatically.

port 443 <-- this port is used for https, you may use port 1194 which is IANA assigned for OpenVPN. proto udp dev tun ca ca.crt cert server.crt key server.key dh dh1024.pem server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "route 192.168.40.0 255.255.255.0" push "dhcp-option DNS 192.168.40.12" duplicate-cn client-to-client keepalive 10 120 user nobody group users persist-key Jun 22, 2019 · Most materials in web recommend to add to server config push “redirect-gateway def1” but this is not working in some cases so better add this config directly to client. Now it is almost ready, just need to start up the VPN and enjoy. Server: openvpn --config server.ovpn. Client: openvpn --config client.ovpn. Test from client machine. ping Route Push Options [IP/Subnetmask] - Beneath the default route to the green subnet, this option makes it possible to push additional routes to other subnets. Miscellaneous options Client-to-Client - This option makes it possible that the OpenVPN clients can communicate with each other. while this works it's annoying to have to do this everytime I connect, and as well sometimes my openVPN server gives me a different address instead of 10.0.8.6 (say, 10.0.8.7) First, I'm hoping there's a way to stick the route command into the config file that openVPN (or in this case, tunnelblick) uses to connect so it'll run it automatically. Oh, and if server doesn't push anything (or client doesn't use client directive but merely tls-client; or has route-nopull, which this question doesn't) then desired line for OpenVPN client config is route 0.0.0.0 0.0.0.0. That would add a default route through the VPN. Jul 23, 2015 · I checked the original tutorial which I followed, and I looked at my config, I think you set the correct command. I don’t know why it wouldnt be working for you, but make sure you are setting the push-route in the correct part of the config: edit interfaces openvpn vtun0 set server push-route 192.168.1.0/24 push "route 172.25.87.0 255.255.255.0" This will tell OpenVPN clients that when the computer tries to access any IP address in the 172.25.87.0 subnet that it should route through our OpenVPN server (as the default gateway for this network).