Page 1 of 1

OpenVPN server IP access

Posted: Mon Sep 27, 2021 5:49 pm
by snikkelonius
I'm running an OpenVPN server on a Synology NAS that has IP 192.168.1.10. This server also hosts a DNS server on the same IP.
After I've connected with a OpenVPN client to the server, the client is assigned 10.8.0.10 for the VPN tunnel. All IP's in the 192.168 range are still accessible, except for 192.168.1.10, which is a problem for me, because that's the IP that's configured in the client as the DNS server. So basically addresses cannot be resolved.

How can I configure the client or server so that the original server IP is still routed to the VPN/DNS server? If I connect to my router and forward the VPN connection from the router to the VPN server everything works fine, but I'd like to connect directly to the VPN server when I'm directly connected to my LAN.

When I do a route print I see the following entries:

Code: Select all

Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0        128.0.0.0         10.8.0.9        10.8.0.10    281
         10.8.0.0    255.255.255.0         10.8.0.9        10.8.0.10    281
         10.8.0.0  255.255.255.255     192.168.1.10     192.168.1.90     41
         10.8.0.1  255.255.255.255         10.8.0.9        10.8.0.10    281
         10.8.0.8  255.255.255.252         On-link         10.8.0.10    281
        10.8.0.10  255.255.255.255         On-link         10.8.0.10    281
        10.8.0.11  255.255.255.255         On-link         10.8.0.10    281
     192.168.1.10  255.255.255.255      192.168.1.1     192.168.1.90    296
     192.168.1.90  255.255.255.255         On-link      192.168.1.90    296
    192.168.1.255  255.255.255.255         On-link      192.168.1.90    296
My client.ovpn:

Code: Select all

dev tun
tls-client
remote 192.168.1.10 1194
redirect-gateway def1
dhcp-option DNS 192.168.1.10
pull

Re: OpenVPN server IP access

Posted: Mon Sep 27, 2021 7:41 pm
by TinCanTech
snikkelonius wrote:
Mon Sep 27, 2021 5:49 pm
How can I configure the client or server so that the original server IP is still routed to the VPN/DNS server?
You have to change to a different network, like a library, and connect the VPN to the public IP of your server.