1

I have a DS215J and want to do the following:

  • VPN server run with OpenVPN -> done
  • DDNS setup with synology.me -> done
  • exported *.ovpn file and connected via Ubuntu -> done
  • issue: Ubuntu has no "host name internet access", when connected to the VPN; only pings to ip's are working
  • as long as Ubuntu is not connected to the VPN, internet access works; as soon as it is connected, only ip pings are possible

Router settings are the following:

  • Model: Speedport Smart
  • TCP ports forwarded to the NAS: 443, 80, 8080, 8443 + another 3 ports
  • UDP ports forwarded to the NAS: 1194 (for OpenVPN), 80, 8080, 8443, 443

NAS settings:

  • OpenVPN up and running
  • Firewall disabled
  • DDNS enabled with synology.me
  • no static routing configured
  • OpenVPN connection successfully established

Open VPN client command line output:

# openvpn --config /mnt/vpn/VPNConfig.ovpn --auth-user-pass /mnt/vpn/auth.conf
Thu Jan 27 21:40:38 2022 OpenVPN 2.4.7 aarch64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jul 19 2021
Thu Jan 27 21:40:38 2022 library versions: OpenSSL 1.1.1f  31 Mar 2020, LZO 2.10
Thu Jan 27 21:40:38 2022 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Thu Jan 27 21:40:38 2022 TCP/UDP: Preserving recently used remote address: [AF_INET] .. <ip removed>
Thu Jan 27 21:40:38 2022 UDP link local (bound): [AF_INET][undef]:1194
Thu Jan 27 21:40:38 2022 UDP link remote: [AF_INET] .. <ip removed>
Thu Jan 27 21:40:38 2022 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Thu Jan 27 21:40:38 2022 [xxx.synology.me] Peer Connection Initiated with [AF_INET] .. <ip removed>
Thu Jan 27 21:40:40 2022 TUN/TAP device tun0 opened
Thu Jan 27 21:40:40 2022 /sbin/ip link set dev tun0 up mtu 1500
Thu Jan 27 21:40:40 2022 /sbin/ip addr add dev tun0 local 10.8.0.6 peer 10.8.0.5
Thu Jan 27 21:40:40 2022 /etc/openvpn/update-resolv-conf tun0 1500 1553 10.8.0.6 10.8.0.5 init
Thu Jan 27 21:40:40 2022 Initialization Sequence Completed

*.ovpn settings:

dev tun
tls-client
remote xxx.synology.me 1194
float
redirect-gateway def1
dhcp-option DNS 192.168.2.1
dhcp-option DNS 1.1.1.1
dhcp-option DNS 1.0.0.1
dhcp-option DNS 8.8.8.8
pull
proto udp
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
comp-lzo
reneg-sec 0
cipher AES-256-CBC
auth SHA512
auth-user-pass
...

I can ping the local ip 10.8.0.6 and external ip's, but no host name:

# ping 10.8.0.6
PING 10.8.0.6 (10.8.0.6): 56 data bytes
64 bytes from 10.8.0.6: icmp_seq=0 ttl=64 time=0.707 ms
# ping www.microsoft.com
ping: unknown host
# ping 2.18.233.62
PING 2.18.233.62 (2.18.233.62): 56 data bytes
64 bytes from 2.18.233.62: icmp_seq=0 ttl=58 time=40.243 ms
# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: icmp_seq=0 ttl=57 time=42.636 ms

It seems that DNS causes troubles, but I have no clue, what to do next.

Update 2202/01/28:

# grep hosts: /etc/nsswitch.conf 
hosts:          files dns

# ls -l /etc/resolv.conf ; cat $_ 
-rw-r--r-- 1 root root 97 Jan 27 20:37 /etc/resolv.conf
# DNS requests are forwarded to the host. DHCP DNS options are ignored.
nameserver 192.168.65.5

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
3: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN group default qlen 1000
    link/tunnel6 :: brd ::
13: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
    link/none 
    inet 10.8.0.6 peer 10.8.0.5/32 scope global tun0
       valid_lft forever preferred_lft forever
    inet6 fe80::a7fa:a4a5:a2e1:594/64 scope link stable-privacy 
       valid_lft forever preferred_lft forever
20: eth0@if21: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:ac:11:00:04 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 172.17.0.4/16 brd 172.17.255.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:acff:fe11:4/64 scope link 
       valid_lft forever preferred_lft forever

# systemd-resolve --status
sd_bus_open_system: No such file or directory

1 Answer 1

1

Looking at the OpenVPN configuration, you are tunneling all traffic through OpenVPN (redirect-gateway def1) and pushing four DNS servers to the client (dhcp-option DNS), one of which is 192.168.2.1:

redirect-gateway def1
dhcp-option DNS 192.168.2.1
dhcp-option DNS 1.1.1.1
dhcp-option DNS 1.0.0.1
dhcp-option DNS 8.8.8.8

I think all DNS requests are sent to 192.168.2.1 which is probably not a valid DNS server and if it is, it's probably not on-link/reachable.

Remove that line from the .ovpn file and try again.

9
  • Thank you, Edward. It's the same result, removing the 192.* ip > that was the one Synology states as used DNS in the DSM frontend. Nevertheless, still not working.
    – bjoern
    Jan 28, 2022 at 11:11
  • I've added 2 extra outputs from the command line above.
    – bjoern
    Jan 28, 2022 at 11:20
  • 1
    Could you please add output of ip a and systemd-resolve --status.
    – Edward
    Jan 28, 2022 at 12:05
  • Thx, both added.
    – bjoern
    Jan 28, 2022 at 12:43
  • 1
    Well, because there have been a lot of DNS resolving issues in Docker for Mac. For example github.com/docker/for-mac/issues/5322 looks a lot like your problems.
    – Edward
    Jan 29, 2022 at 9:13

You must log in to answer this question.

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