I am using same configuration files for OpenVPN, same operating system (ubuntu 20) on two different laptops, but I notice with Wireshark, then on one of them, the VPN connection goes through UDP, including all DNS requests, so I don't see any DNS, but the other laptop, all through TCP, and I see the DNS requests. One of the differences I noticed between the outputs on the command prompt of the OpenVPN process, was the network interface on the laptop that did not send DNS through tunnel was IFACE=wlo1, the other was IFACE=wlp2s0. They both had similar output here:

/etc/openvpn/update-resolv-conf tun0 1500 1553 172.16.xx.xx 172.16.xx.xx init
dhcp-option DNS 172.16.xx.xx

Why is DNS not going through tunnel, and why is it using TCP? Config files are same.

  • You need to configure DNS traffic to go through the tunnel. – schroeder Dec 7 '20 at 21:08
  • Potential duplicate: security.stackexchange.com/questions/123764/… – schroeder Dec 7 '20 at 21:08
  • how do i configure dns to go through the tunnel? And why is one openvpn process using tcp, the other udp. the config files are the same on both laptops – as2az1 Dec 7 '20 at 21:12
  • @as2az1: "And why is one openvpn process using tcp, the other udp. the config files are the same on both laptops" - By default OpenVPN will try UDP and when this fails switch to TCP. Thus maybe UDP fails for one laptop. Since nothing relevant is known about the laptops, there setup, the environment they get used etc no more specific answer can be given. – Steffen Ullrich Dec 7 '20 at 21:23
  • @SteffenUllrich ok thanks for that info. I didnt know this. Why does it not encrypt dns when using TCP? i just ran dnsleaktest , reopened wireshark, and now see other laptop using udp, so this is wierd, why sometimes udp fails, sometimes works, what could be the issue? – as2az1 Dec 7 '20 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.