Problem with Private Neworks and DNS

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
NoSoup4u2
OpenVpn Newbie
Posts: 2
Joined: Fri Apr 15, 2022 1:36 am

Problem with Private Neworks and DNS

Post by NoSoup4u2 » Fri Apr 15, 2022 2:51 am

I just installed a new clean install of openVpn Server version 2.10.2 on an Ubuntu 20.x. So far so good, my server has 1
physical interface with one public ip. When i use the default i can connect to it and most works but here is the few issues
i have and i am hoping someone can point me in right direction on how to solve them.
Some Prefix
=============
there a 2 Public c classes behind my remote firewall as well as 3 C classes witch are private but are not nat'd but routed.
the interface of my Access server is in one of the 2 public C's and ends with 11. I can ping from the console of the Access
Server all Subnets , private or public fine.

a) when i set my Should VPN clients have access to private subnets (non-public networks on the server side)? to Yes use Routing
and specify 192.168.0.0/24, 192.168.2.0/24, 192.168.8.0/24 in the next textbox 1 per line and have selected Yes for all other 3.
i can access the Ip's on the public side and access the internet, i also see an entry for the default route in my clients route table

0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.34 281
0.0.0.0 128.0.0.0 192.168.240.129 192.168.240.132 257

but i cant access the ip's on the private network

b) if i go and and set Should client Internet traffic be routed through the VPN? to No i no longer have the default route and i see
private routes in my pc's route table as well as the dns still goes to vpn

8.8.4.4 255.255.255.255 192.168.240.161 192.168.240.163 102
8.8.8.8 255.255.255.255 192.168.240.161 192.168.240.163 102
192.168.0.0 255.255.255.0 192.168.240.161 192.168.240.163 102
192.168.2.0 255.255.255.0 192.168.240.161 192.168.240.163 102
192.168.8.0 255.255.255.0 192.168.240.161 192.168.240.163 102

in this case the DNS is no longer reachable as well as neither of the hosts on the private routed Network.

So what my goal is to have my Client to use the Internet including DNS servers without the VPN as well as be able to reach
any of the public and private Subnets via the VPN. So not sure what i am missing here

Also based on some docs the config file was suposed to be in the ubuntu /etc dir but i cant find anything
Thanks

NoSoup4u2
OpenVpn Newbie
Posts: 2
Joined: Fri Apr 15, 2022 1:36 am

Re: Problem with Private Neworks and DNS

Post by NoSoup4u2 » Fri Apr 15, 2022 8:38 pm

I was able with some additional Info from Support to solve the issue. In my case it was due to fact that i have routed subnets behind the AS Server, it is required that the Subnet used by the VPN is reachable from anywhere in your network behind the AS Open VPN server. In my case i added static route to subnet and pointed it to the IP of the OpenVpn Server. After that all start working fine

Post Reply