Page 1 of 1

Subnet mask and routing for VPN client

Posted: Tue Jul 04, 2017 11:14 am
by MarcoPolo70
Hi all

I am trying to set up a PC to LAN VPN tunnel.

I have installed and configured the SoftEther VPN server (on Debian), and I have OpenVPN clients successfully establishing a VPN tunnel.

However, the subnet mask and routing information on the client end is incorrect. It is not getting an address from the LAN DHCP server, but from something else. These results are from a Debian openvpn client.

What I expect:
DHCP-supplied address: 192.168.2.x/24, with routing to the entire 192.168.2.0 subnet.

What happens:
Address supplied: 192.168.2.101/32, with no routing to the 192.168.2.0 subnet.
A default route is added via 192.168.2.102, but it has a metric of 50 and so never gets used.

Following two lines from the server-side logs show the problem:
2017-07-04 20:44:16.642 OpenVPN Session 1 (172.16.222.79:49896 -> 172.16.222.78:1194) Channel 0: The IP address and other network information parameters are set successfully. IP Address of Client: 192.168.2.101, Subnet Mask: 255.255.255.0, Default Gateway: 192.168.2.254, DNS Server 1: 172.16.222.254, DNS Server 2: 8.8.8.8, WINS Server 1: , WINS Server 2:
2017-07-04 20:44:16.642 OpenVPN Session 1 (172.16.222.79:49896 -> 172.16.222.78:1194) Channel 0: The full strings replied: "PUSH_REPLY,ping 3,ping-restart 10,ifconfig 192.168.2.101 192.168.2.102,dhcp-option DNS 172.16.222.254,dhcp-option DNS 8.8.8.8,route-gateway 192.168.2.102,redirect-gateway def1"

What I expect is the settings in the first line above. What is actually happening is the settings in the secodn line.

Any ideas where I should start looking?

Thanks
Mark Bleyerveld

Re: Subnet mask and routing for VPN client

Posted: Wed Jul 12, 2017 7:20 am
by thisjun
It's normal.
However, if you want to use real configuration IP address, please use tap mode OpenVPN.