0

I have an OpenVPN server on Ubuntu and several OpenVPN clients on Windows 10, both are behind a router (port forwarding has been done). Each client can connect fine and can ping/connect to each other, they can also ping the DNS server (8.8.8.8) but cannot resolve DNS names (if I try to ping www.google.com or similar, I get no result). I tried to change some settings in the routing table of a client, but with no success. Anyway I can get it to work? My routing table (before connection to OpenVPN) is the following:

Network address     Mask            Gateway             Interface       Metrics
0.0.0.0             0.0.0.0         192.168.1.1         192.168.1.67    281
0.0.0.0             255.255.255.255     192.168.1.1     192.168.1.67    26
8.0.0.0             255.255.255.0       192.168.1.1     192.168.1.67    26
8.0.0.0             255.255.255.255     192.168.1.1     192.168.1.67    26
127.0.0.0           255.0.0.0           On-link         127.0.0.1       331
127.0.0.1           255.255.255.255     On-link         127.0.0.1       331
127.255.255.255     255.255.255.255     On-link         127.0.0.1       331
192.168.1.0         255.255.255.0       On-link         192.168.1.67    281
192.168.1.0         255.255.255.0       192.168.1.1     192.168.1.67    26
192.168.1.0         255.255.255.255     192.168.1.1     192.168.1.67    26
192.168.1.67        255.255.255.255     On-link         192.168.1.67    281
192.168.1.255       255.255.255.255     On-link         192.168.1.67    281
224.0.0.0           240.0.0.0           On-link         127.0.0.1       331
224.0.0.0           240.0.0.0           On-link         192.168.1.67    281
224.0.0.0           240.0.0.0           On-link         a               9256
255.255.255.255     255.255.255.255     On-link         127.0.0.1       331
255.255.255.255     255.255.255.255     On-link         192.168.1.67    281
255.255.255.255     255.255.255.255     On-link         a               9256

Permanent routes:
Network address     Mask        Gateway         Metrics
0.0.0.0             0.0.0.0     192.168.1.1     Deafault

while the routing table after connection is the following:

Network address     Mask                Gateway     Interface       Metrics
0.0.0.0             0.0.0.0             192.168.1.1 192.168.1.67    281
0.0.0.0             255.255.255.255     192.168.1.1 192.168.1.67    26
8.0.0.0             255.255.255.0       192.168.1.1 192.168.1.67    26
8.0.0.0             255.255.255.255     192.168.1.1 192.168.1.67    26
10.8.0.0            255.255.255.0       10.8.0.1    10.8.0.4        4
10.8.0.0            255.255.255.255     10.8.0.1    10.8.0.4        4
10.8.0.4            255.255.255.255     On-link     10.8.0.4        259
127.0.0.0           255.0.0.0           On-link     127.0.0.1       331
127.0.0.1           255.255.255.255     On-link     127.0.0.1       331
127.255.255.255     255.255.255.255     On-link     127.0.0.1       331
192.168.1.0         255.255.255.0       On-link     192.168.1.67    281
192.168.1.0         255.255.255.0       192.168.1.1 192.168.1.67    26
192.168.1.0         255.255.255.255     192.168.1.1 192.168.1.67    26
192.168.1.67        255.255.255.255     On-link     192.168.1.67    281
192.168.1.255       255.255.255.255     On-link     192.168.1.67    281
224.0.0.0           240.0.0.0           On-link     127.0.0.1       331
224.0.0.0           240.0.0.0           On-link     10.8.0.4        259
224.0.0.0           240.0.0.0           On-link     192.168.1.67    281
224.0.0.0           240.0.0.0           On-link     a               9256
255.255.255.255     255.255.255.255     On-link     127.0.0.1       331
255.255.255.255     255.255.255.255     On-link     10.8.0.4        259
255.255.255.255     255.255.255.255     On-link     192.168.1.67    281
255.255.255.255     255.255.255.255     On-link     a               9256

Permanent routes:
network address     Mask        Gateway         Metrics
0.0.0.0             0.0.0.0     192.168.1.1     Default

the addresses starting with 10.8.x.x are the VPN addresses, while 192.168.x.x are the IPs of the router the Windows client is connected to. Any tip?

3
  • Supposedly you need to fix either the server or the client config as described here to either the server not insisting on the client using the OpenVPN connection as their default gateway, or the client ignoring that setting. If you control the server I'd fix the server.
    – kostix
    Nov 3, 2020 at 17:51
  • …on the other hand the routing table looks normal to me: that is, only 10.8.0/24 is routed through the VPN. Could you save the routing info before and after the connecting and compare them? (fc would do; diff could do better but it's not stock Windows).
    – kostix
    Nov 3, 2020 at 17:54
  • Thank you Kostix, as requested, I updated the question with the routing table before connection to OpenVPN Nov 4, 2020 at 8:06

1 Answer 1

1

Solved, I deleted these 2 rows

push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"

from the file server.conf on the OpenVPN server. Now clients can browse internet and communicate with other clients on the VPN, the only problem that reamins is that clients cannot ping DNS names (such as Google.com). However they browse fine, and that's what's important.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .