Cannot use DNS with proto=tcp

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
mrwolf
OpenVpn Newbie
Posts: 2
Joined: Sun Sep 20, 2015 6:19 pm

Cannot use DNS with proto=tcp

Post by mrwolf » Sun Sep 20, 2015 6:52 pm

Hi there,

I am configuring OpenVPN 2.3.2 on Ubuntu 14.04 with 2 OpenVPN instances, one listening on TCP and one on UDP.

On my Android phone I use OpenVPN for Android as client (I tried to use OpenVPN connect, but it can't import .ovpn files with embedded certificates and even splitting them into single files didn't work) and everything works correctly with the UDP instance.

When I try to use the TCP instance I cannot perform any DNS lookup. Pinging the server 10.8.1.1 works fine.

TCP configuration: http://pastebin.com/ALu2ZK8Y
UDP configuration: http://pastebin.com/0PCfucpE

I have dnsmasq running and listening on both tun0 and tun1 interfaces.

Any ideas how to troubleshoot this problem?

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Cannot use DNS with proto=tcp

Post by Traffic » Mon Sep 21, 2015 11:01 am

mrwolf wrote:When I try to use the TCP instance I cannot perform any DNS lookup. Pinging the server 10.8.1.1 works fine.
Your configs:
  • TCP: push "dhcp-option DNS 10.8.1.1"
  • UDP: push "dhcp-option DNS 10.8.0.1"
Did you setup a DNS server on both IP addresses ?

mrwolf
OpenVpn Newbie
Posts: 2
Joined: Sun Sep 20, 2015 6:19 pm

Re: Cannot use DNS with proto=tcp

Post by mrwolf » Tue Sep 22, 2015 4:38 pm

Traffic wrote:
mrwolf wrote:When I try to use the TCP instance I cannot perform any DNS lookup. Pinging the server 10.8.1.1 works fine.
Your configs:
  • TCP: push "dhcp-option DNS 10.8.1.1"
  • UDP: push "dhcp-option DNS 10.8.0.1"
Did you setup a DNS server on both IP addresses ?
Yes, as I said dnsmasq is listening on both tun0 and tun1 and I tested with an nslookup that they do work.

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Cannot use DNS with proto=tcp

Post by Traffic » Tue Nov 24, 2015 12:08 am

How about iptables rules etc ..

Post Reply