LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-17-2009, 02:16 AM   #1
johnh10000
Member
 
Registered: Nov 2008
Distribution: Ubuntu Lucid Lynx
Posts: 541

Rep: Reputation: 33
bind dns


Hi gang, my little network has expanded to a hub 3 computers and the odd laptop!

Sussed out dhcp all by myself. (for the laptop)

The 3 boxs at the mo have static 192.168.xx.xx ips

How do I get bind to dns these boxes?

I have ftp telnet ssh, etc
www could be a hassel as I'm using virtual hosts there

www.tux.mynet.com

and for my girlfriend !!!!

www.soedie.bassy.com

any ideas?
 
Old 05-17-2009, 03:56 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
no idea what you actually want to do. what does "getting bind" to these boxes mean??? how do virtual hosts relate to dns??
 
Old 05-17-2009, 04:51 AM   #3
johnh10000
Member
 
Registered: Nov 2008
Distribution: Ubuntu Lucid Lynx
Posts: 541

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by acid_kewpie View Post
no idea what you actually want to do. what does "getting bind" to these boxes mean???

so that from another box on the intranet "see" the domains,
ie www.tux.mynet.com winds up with 192.168.52.10

how do virtual hosts relate to dns??
I don't know, I just thought that as it was an apache VH i would have to con figure it differantly.
 
Old 05-17-2009, 04:58 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you'd add your new name server as the name server for those other machines in /etc/resolv.conf.
 
Old 05-17-2009, 10:26 AM   #5
johnh10000
Member
 
Registered: Nov 2008
Distribution: Ubuntu Lucid Lynx
Posts: 541

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by acid_kewpie View Post
well you'd add your new name server as the name server for those other machines in /etc/resolv.conf.
right, how do I set up a name server? DNS therefore bind.

I assume I can use a free dns thingy or my isp's for the internet.
 
Old 05-17-2009, 12:21 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 05-17-2009, 12:54 PM   #7
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
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).
 
Old 05-18-2009, 02:29 AM   #8
johnh10000
Member
 
Registered: Nov 2008
Distribution: Ubuntu Lucid Lynx
Posts: 541

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by salasi View Post
<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.
 
Old 05-20-2009, 03:03 AM   #9
globaltree
Member
 
Registered: Oct 2007
Location: Oregon
Distribution: Slackware 12.2
Posts: 65

Rep: Reputation: 18
Cool 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.

Here is an example of an /etc/hosts file

Code:
127.0.0.1       localhost
ip.ip.ip.ip     host1.yourdomain.tld      host1
ip.ip.ip.ip     host2.yourdomain.tld      host2 
ip.ip.ip.ip     host3.yourdomain.tld      host3
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.

Hope that helps.
 
Old 05-20-2009, 03:40 AM   #10
johnh10000
Member
 
Registered: Nov 2008
Distribution: Ubuntu Lucid Lynx
Posts: 541

Original Poster
Rep: Reputation: 33
[QUOTE=globaltree;3546668]
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.

Here is an example of an /etc/hosts file

Code:
127.0.0.1       localhost
ip.ip.ip.ip     host1.yourdomain.tld      host1
ip.ip.ip.ip     host2.yourdomain.tld      host2 
ip.ip.ip.ip     host3.yourdomain.tld      host3
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?
 
Old 05-21-2009, 06:41 AM   #11
johnh10000
Member
 
Registered: Nov 2008
Distribution: Ubuntu Lucid Lynx
Posts: 541

Original Poster
Rep: Reputation: 33
It works

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?
 
Old 05-21-2009, 07:53 AM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
if you want. you can use whatever DNS you feel like as long as they let you in at the other end.
 
Old 05-21-2009, 01:49 PM   #13
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
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...
 
Old 05-22-2009, 01:55 AM   #14
johnh10000
Member
 
Registered: Nov 2008
Distribution: Ubuntu Lucid Lynx
Posts: 541

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by salasi View Post
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.

Thanks again
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get Windows Clients to be served DNS from a Linux BIND-DNS Server texmansru47 Linux - Networking 12 07-10-2008 07:06 PM
Bind/DNS? wh33t Linux - Networking 4 06-02-2007 11:27 AM
How to BIND/DNS? wh33t Linux - Software 1 06-02-2007 04:26 AM
LXer: DNS: The Bind Leading the Bind LXer Syndicated Linux News 0 06-15-2006 10:33 PM
DNS and BIND dilberim82 Linux - General 10 07-13-2001 10:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration