Issue of Allow client to reach entire server subnet
Posted: Wed Feb 19, 2020 2:23 pm
Hi,
I am practicing the openVPN staring from the "Static Key Mini-HOWTO" guide(https://openvpn.net/community-resources ... ini-howto/).
I met an issue of letting the client to access the server's subnet.
My OpenVPN server resides in subnet of 192.168.0.0/8 with gateway Ip of 192.168.0.1 and OpenVPN server installed on a Windows 10 computer with IP of 192.168.0.23.
All tests are fine until trying the Allow client to reach entire server subnet part.
The manual says:
==================================================================
Allow client to reach entire server subnet
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.
=================================================================
So according to the guide above in considering of my real test environment, I took following steps:
Step 1. I added
route 192.168.0.0 255.255.255.0
in .ovpn file of cliemt
Step 2. I added
route 192.168.0.1
in .ovpn file of server
Step 3. I set the value of IPEnableRouter to 1 of Windows 10 computer which hosts the OpenVPN server.
After reconnecting the OpenVpn Server and Client, I was trying to ping a file server of 192.168.0.110 in server subnet, but it was always timer out.
Could I have you help whether some settings are wrong? I guess the step 2 is not correct, but don't know what should be right.
Thanks!
Corydon
I am practicing the openVPN staring from the "Static Key Mini-HOWTO" guide(https://openvpn.net/community-resources ... ini-howto/).
I met an issue of letting the client to access the server's subnet.
My OpenVPN server resides in subnet of 192.168.0.0/8 with gateway Ip of 192.168.0.1 and OpenVPN server installed on a Windows 10 computer with IP of 192.168.0.23.
All tests are fine until trying the Allow client to reach entire server subnet part.
The manual says:
==================================================================
Allow client to reach entire server subnet
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.
=================================================================
So according to the guide above in considering of my real test environment, I took following steps:
Step 1. I added
route 192.168.0.0 255.255.255.0
in .ovpn file of cliemt
Step 2. I added
route 192.168.0.1
in .ovpn file of server
Step 3. I set the value of IPEnableRouter to 1 of Windows 10 computer which hosts the OpenVPN server.
After reconnecting the OpenVpn Server and Client, I was trying to ping a file server of 192.168.0.110 in server subnet, but it was always timer out.
Could I have you help whether some settings are wrong? I guess the step 2 is not correct, but don't know what should be right.
Thanks!
Corydon