Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using port 53 for my vpn, and I need to use port 53. I changed the port of dnsmasq, connected openVPN, and now request are unable to resolve errors.

sudo dnsmasq -p 5642

. Is there a way to change the port of dnsmasq w/o conflicts/errors?

share|improve this question

2 Answers 2

No. Every piece of DNS requester software expects to find the DNS service on port 53 of the nameserver. If it is not there then DNS will not work.

$ grep '\s53/' /etc/services 
domain          53/tcp                          # name-domain server
domain          53/udp
share|improve this answer

Actually some unix distros allow you to specify the port for DNS in the /etc/resolv.conf nameservers entry but unfortunately Ubuntu isn't one of them. If it were possible you would specify the DNS port in /etc/network/interfaces along with the IP address of the nameserver — presumably a loopback address in your case.

There is an enhancement logged: Please allow specification of port in resolv.conf

My guess is that you will have move the port that your VPN is using. However, there is probably a good reason why the VPN is listening on the DNS port. You might want to check it out before trying to change it; you might be trying to do something that it already does for you.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.