Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
DNS port 53 is what virtually all applications use to query DNS so changing it would be pointless as it would only insure most applications could no longer query your DNS server.
Why are you asking this question? Maybe there's another way to accomplish your underlying purpose?
Q.)How to change the default PORT NUMBER OF DNS IN LINUX ?
I'm not sure that I know enough to answer all of the questions that this might really be, but I do know enough to know that it is ambiguous enough to be difficult to answer:
the default number (53) is the default, because it is what happens if you don't change it. If, eg, post install, you change it, you are no longer using the default. From that point of view, you can't change the default, unless you make, a new distro with a different default; otherwise, you have actually changed the port-in-use, but not changed the default. I don't think that this is what you wanted to know
Probably you wanted to know 'how do you change the number from the default?'. there are several ways to do that, and it, kind of, depends on exactly what you are trying to do -
are you trying to get a client to use an unconventional port?
are you trying to get a DNS server to respond on an unconventional port?
In any case, you can probably get iptables to move traffic from one port to another. That is less than an enthusiastic recommendation that this is what you ought to do in some particular circumstance, though.
If you are talking about the DNS server (eg, Bind, or whatever) there may well be a configuration file option to change one of the ports - potentially, there is a 'listen-on' port and 'forward-query-on' port to consider, and you should know which of those you are talking about. But then, I certainly can't say that I know all DNS Servers well enough to suggest that they are all as flexible as BIND...but, then again, you can also argue that this is, as a general consideration, a good thing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.