Page 1 of 1

OpenVPN routing problems

Posted: Sun Feb 10, 2019 9:16 pm
by R3Natas
I am configuring my OpenVPN server and my idea was to make different subnets for different needs:

My main subnet for unprivileged DHCP users is

Code: Select all

10.110.131.0/24
On server it is configured that way:

Code: Select all

server 10.110.131.0 255.255.255.0
Then following this tutorial I made some additional subnets for my privileged static IP users:

Code: Select all

10.110.128.0/24
10.110.129.0/24
10.110.130.0/24
I added routing to the server.conf:

Code: Select all

route 10.110.128.0 255.255.255.0
route 10.110.129.0 255.255.255.0
route 10.110.130.0 255.255.255.0
Then client config in the ccd directory looks like this:

Code: Select all

ifconfig-push 10.110.128.9 255.255.255.252
But the actual problem is this configuration doesn't work with Windows or Linux clients, only iPhone deals with any settings very well.

Connecting from my Windows client using above provided configuration it gives me these errors:

Code: Select all

Route: Waiting for TUN/TAP interface to come up...
Warning: route gateway is not reachable on any active network adapters: 10.110.131.1
So it can't find VPN gateway which is 10.110.131.1

A way to fix this problem is to change subnet mask in the ccd config for the client to:

Code: Select all

ifconfig-push 10.110.128.9 255.255.252.0
Unfortunately, I don't like this approach and would like to find a normal way to configure my static clients, so then I could control access levels for different subnets in the firewall

So any ideas?