Server configuration file
dev tun
ifconfig 10.8.0.1 10.8.0.2
secret static.key
route ??????????????????
Client configuration file
remote myremote.mydomain
dev tun
ifconfig 10.8.0.2 10.8.0.1
secret static.key
route 192.168.1.0 255.255.255.0
I'm able to ping 10.8.0.2 from the server and 10.8.0.1 from the client.
My OpenVPN server is on private LAN 192.168.1.0 ... with the gateway 192.168.1.1
It says
How do i allow client to reach entire server subnet so i can ping back and forth from machines on subnet to client?Suppose the OpenVPN server is on a subnet 192.168.4.0/24. Add the following to client configuration:
route 192.168.4.0 255.255.255.0
Then on the server side, add a route to the server's LAN gateway that routes 10.8.0.2 to the OpenVPN server machine (only necessary if the OpenVPN server machine is not also the gateway for the server-side LAN). Also, don't forget to enable IP Forwarding on the OpenVPN server machine.
Can someone please help with an example of what to do?