Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
For that fundamental a question you need to refer to general docs and howtos, we can't tell you all that. And you can use whatever name servers you want to for upstream requests, or maybe just use the root servers to be as formally correct as possible.
Having gone down this path though, if you want to achieve a result rather than primarily learn DNS, a small package like dnsmasq is quite possibly a more appropriate and much simpler approach.
If you found out that the exact wording of your question was in danger of making the solution 10x or 100x (maybe even 1000x, which you might find difficult to believe) more difficult than it need be, would you forgive someone for answering a different question from the one that you asked?
My first suggestion is for you to look at (in a bookshop, or from a library) the classic "DNS and Bind" book; I suggest this not because it will solve all of your problems, but because it won't. After looking at this for a while, you might conclude that setting up Bind can, rather literally, be a bind.
So, what should you do?
Well, one option would be to use one of the easier-to-set-up things that provide DNS, rather than Bind. From what you've said Dnsmasq would be good and maradns and pdns would be alternatives.
I'm still not clear that you actually need to do even this. If you understand how networking works (and, if you don't, you really, really don't have much of a chance of getting Bind set up correctly - and note that I'm explicitly distinguishing here between "set up correctly and adding no new security issues" from just "getting something to the point at which it seems to work"), you could just add entries for the servers which you need to resolve on your own network in resolv.conf.
Note that the 'resolv.conf' solution can potentially be a small admin headache if you are continually connecting and disconnecting machines from your network (which is where dnsmasq, etc, come in).
OTOH, if this is a learning exercise, and you want to get a job in networking, you probably want a copy of DNS and Bind and you want to suffer whatever headaches that brings as soon as possible. You might also want to consider some other documentation in addition. Google (other search engines exist...) for a tutorial (from memory, linux home networking has a good one, but there will be many others) and consider the 'Cookbook' as well as DNS and Bind (the first couple of chapters of "DNS and Bind" do a good job of explaining the environment, which isn't in the cookbook and you might find the 'Craig Hunt' one lighter on the aspirin requirement than "DNS and Bind", although that is the definitive reference).
<snip>lt to believe) more difficult than it need be, would you forgive someone for answering a different question from the one that you asked?
go ahead
My first suggestion is for you to look at (in a bookshop, or from a library) the classic "DNS and Bind" book; I suggest this not because it <snip>
I was planning to do that.
Well, one option would be to use one of the easier-to-set-up things that provide DNS, rather than Bind. From what you've said Dnsmasq would be good and maradns and pdns would be alternatives.
just grabbed dnsmasq
I'm still not clear that you actually need to do even this. If you understand how networking works (and, if you don't, you really, really don't have much of a chance of getting Bind set up correctly - and note that I'm explicitly distinguishing here between "set up correctly and adding no new security issues" from just "getting something to the point at which it seems to work"), you could just add entries for the servers which you need to resolve on your own network in resolv.conf.
hmm as my gfriend and I will be on cable in the next 2 weeks security will be an issue.
Note that the 'resolv.conf' solution can potentially be a small admin headache if you are continually connecting and disconnecting machines from your network (which is where dnsmasq, etc, come in).
hope so.
OTOH, if this is a learning exercise, and you want to get a job in networking, you probably want a copy of DNS and Bind and you want to suffer whatever headaches that brings as soon as possible. You might also want to consider some other documentation in addition. Google (other search engines exist...) for a tutorial (from memory, linux home networking has a good one, but there will be many others) and consider the 'Cookbook' as well as DNS and Bind (the first couple of chapters of "DNS and Bind" do a good job of explaining the environment, which isn't in the cookbook and you might find the 'Craig Hunt' one lighter on the aspirin requirement than "DNS and Bind", although that is the definitive reference).
I'll check the library
thanks gang. All I really want is for all the local boxes to talk to one another using their names. And the dhcp ones to chat to say www.tux.mynet.com. the perm ones do this as that is their hosts file.
use /etc/hosts to bypass dns with statically configured network
Code:
man hosts
The /etc/hosts file can identify the machines on your network for your network... simply use a text editor to create one on each machine; this would be too much work on a large network, and hence the need for dns, but with only three machines on a hub, it shouldn't be too much trouble.
Obviously, you should replace ip.ip.ip.ip with the actual ip addresses for the machines on your network.
Once all machines on network have their /etc/hosts and have been rebooted, they can talk to each other by ip addresses, fully qualified domain names, or just machine names, as if the addresses had been looked up at a name server.
The /etc/hosts file can identify the machines on your network for your network... simply use a text editor to create one on each machine; this would be too much work on a large network, and hence the need for dns, but with only three machines on a hub, it shouldn't be too much trouble.
Obviously, you should replace ip.ip.ip.ip with the actual ip addresses for the machines on your network.
Once all machines on network have their /etc/hosts and have been rebooted, they can talk to each other by ip addresses, fully qualified domain names, or just machine names, as if the addresses had been looked up at a name server.
Thanks, I've done that already, but now I'm tring to use dhcp, and want that to happen on dhcp boxes too.
I am tring maradns but I have the following problem
[quote from syslog]
May 20 09:17:09 tux maradns.etc_maradns_mararc:
May 20 09:17:09 tux maradns.etc_maradns_mararc: Using default ICANN root servers
May 20 09:17:09 tux maradns.etc_maradns_mararc: Log: Root directory changed
May 20 09:17:09 tux maradns.etc_maradns_mararc: Fatal error: Problem binding to port 53.
May 20 09:17:09 tux maradns.etc_maradns_mararc:
May 20 09:17:09 tux maradns.etc_maradns_mararc: System said: Address already in use
May 20 09:18:01 tux /USR/SBIN/CRON[6606]: (amavis) CMD (test -e /usr/sbin/amavisd-new-cronjob && /usr/sbin/amavisd-new-cronj
I have turned off the firewall for now, any ideas?
Thanks to everyone. With the help of dnsmasq and err turning off bind. It does what I want.
The only final question, which I think I know the ans to is. When we do get viergin media (cable) I presume I just plug in their dns ips into the dnsmasq.conf, yes?
Your isp's dns servers ought to be a good option, but some isps do a seriously substandard job with running them (either performance, or keeping the servers patched; when I asked mine when it would be safe to conclude that they had patched a recent exploit, they didn't even answer....) if that is the case with yours, look into openDNS.
Can't remember Dnsmasq, but most servers of that kind allow you to put in more than one upstream server, which can be useful, but often you wait for the first one to time out before trying the second. Check 'man dnsmasq' or an online tutorial for more info...
Your isp's dns servers ought to be a good option, but some isps do a seriously substandard job with running them (either performance, or keeping the servers patched; when I asked mine when it would be safe to conclude that they had patched a recent exploit, they didn't even answer....) if that is the case with yours, look into openDNS.
I think I know that we are using a 3 dongle at the mo. They are horrible at night, when they are busy.
Can't remember Dnsmasq, but most servers of that kind allow you to put in more than one upstream server, which can be useful, but often you wait for the first one to time out before trying the second. Check 'man dnsmasq' or an online tutorial for more info...
Yeah dnsmasq does allow several up-stream dns, so will plug in now open dns, and see what happens on the dongle.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.