LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-12-2005, 11:52 PM   #1
nasirjones
LQ Newbie
 
Registered: Dec 2004
Distribution: arch, ubuntu(headless), redhat
Posts: 14

Rep: Reputation: 0
do i have to use Bind to configure DNS?


Im just wondering if I have to use bind? or is there another way to configure DNS, I have a linux box behind a router and i wanna use it as an http server.

-thanx
 
Old 01-13-2005, 12:15 AM   #2
sgrayban
Member
 
Registered: Nov 2004
Location: Spokane, WA
Distribution: Debian 6.0
Posts: 369

Rep: Reputation: 30
DNS is bind -- no bind no dns unless you use your ISP for DNS then all you need to do is edit /etc/resolve.conf

Unless you want to control your own domain in which case you need to run your own bind or use a place like zoneedit.com
 
Old 01-13-2005, 04:13 AM   #3
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
You don't need bind for one system (in most cases). What you need is a name hosting service that will point your dns (internet name) to your current IP address.

What is your setup? How are you connected to the internet? Do you have a static or dynamic IP address? Is your prospective server on an internal (non-routing) address?

Let's pretend you are a DSL customer. You called up your local provider and said "I want the internet". They sent you a DSL modem that also happens to be a firewall router (sometimes they send these, sometimes they don't). Now you can see the internet, but the internet can't see you! Don't worry, there are ways around this.

If this doesn't at all sound like your setup, please let me know.

First things first. People need to be able to connect to you from the outside using an IP address. Once that's taken care of, then you can worry about getting the name to stick. Most consumer routers have an internal web page that can be used to set it up. How you use this depends strongly on which brand and model you have. Start by finding out your "default gateway". This will be the "internal" ip address of your router. You can find this using the "route -n" command from linux, or "ipconfig" from windows .Using route, look for the line starting with four zero's. The next four numbers are your default gateway. Now go to any web browser and type "http://192.168.0.1" (Insert you own default gateway instead of 192.168.0.1).

You will need to find "port forwarding" sometimes called "pin-holes" (and who knows what else it may be known as). Your router has two IP addresses. One that your computer and the "internal" network sees, and an "external" address assigned by your ISP. You need to tell your router to forward any external packets that it receives on tcp port 80 (aka: http, web server) to your computer. This way when someone tries to get a web page from your router, they will instead be getting a page from your server.

If you aren't paying for a static IP address, you will need to find a service that will allow you to update the name entries on a frequent basis. Anytime your IP address changes, your server will be unavailable until dns servers on the internet (yes, running bind) find out about the change. It's not your machine that needs to serve names, it's other machines that need to serve your name for you. There are a few free services that do this. I use www.dyndns.org.

Good luck. Please post back (too few people do).
 
Old 01-13-2005, 04:20 AM   #4
sgrayban
Member
 
Registered: Nov 2004
Location: Spokane, WA
Distribution: Debian 6.0
Posts: 369

Rep: Reputation: 30
uhh my answer was the simplest one.

If he is only wanting intranet he can use bind or the /etc/hosts file.

To each his/her own ways.
 
Old 01-13-2005, 04:43 AM   #5
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
Quote:
Originally posted by sgrayban
uhh my answer was the simplest one.

If he is only wanting intranet he can use bind or the /etc/hosts file.

To each his/her own ways.
Uh, excuse me.

Quote:
Originally posted by nasirjones
...
I have a linux box behind a router and i wanna use it as an http server.
...
I could be mistaken, but I interpret this to mean "I want computers on the internet to see my server, even if I have this router in the way". There is nothing either the hosts file or bind (on it's own) can do to make this happen. Of course, if he's planning on hosting a domain with multiple public computers, then bind is a must (or something equivalent). That just doesn't seem to be what he's asking. In any case, the method is the same. (1) Make sure other computers can talk to yours using an IP address and a port number. (2) Make sure another computer will translate names for you (if using dns on the internet, this will be a computer not in your immediate control; there is no way arround this.).
 
Old 01-13-2005, 07:27 AM   #6
nasirjones
LQ Newbie
 
Registered: Dec 2004
Distribution: arch, ubuntu(headless), redhat
Posts: 14

Original Poster
Rep: Reputation: 0
correct...I want external computers to see me. Also I have a dynamic ip as i am using a dsl connection and since its a home setup im also behind a router, port forwarding is on, I used Bind last time, so I will use the Bind again. except this time im using a different distro than rh9 so i will have to configure it by script....no windoze

Last edited by nasirjones; 01-13-2005 at 07:28 AM.
 
Old 01-13-2005, 08:28 AM   #7
omes
Member
 
Registered: Jan 2003
Distribution: debian, FreeBSD
Posts: 120

Rep: Reputation: 15
Quote:
Originally posted by nasirjones
(...)Also I have a dynamic ip as i am using a dsl connection and since its a home setup im also behind a router, port forwarding is on, I used Bind last time, so I will use the Bind again. (...)
As for the dynamic ip address, you should use something similar to dyn-dns or no-ip. It's quite hard to keep up to date records of dynamic ip's (especially if they change a lot).

Good luck.

- omes
 
Old 01-13-2005, 11:20 AM   #8
nasirjones
LQ Newbie
 
Registered: Dec 2004
Distribution: arch, ubuntu(headless), redhat
Posts: 14

Original Poster
Rep: Reputation: 0
ooooooooook now i need help once again configuring the DNS with bind, unfourtunately i have only done this using redhat in kde i never did this with the actual named.conf and all that, can someone explain how i would add my addy from dyn-dns?? I have read the stuff but I dont get the whole forward and reverse look up stuff....what would i put in those files?...
 
Old 01-13-2005, 11:31 AM   #9
omes
Member
 
Registered: Jan 2003
Distribution: debian, FreeBSD
Posts: 120

Rep: Reputation: 15
Quote:
Originally posted by nasirjones
ooooooooook now i need help once again configuring the DNS with bind, unfourtunately i have only done this using redhat in kde i never did this with the actual named.conf and all that, can someone explain how i would add my addy from dyn-dns?? I have read the stuff but I dont get the whole forward and reverse look up stuff....what would i put in those files?...
What do you mean? you want the auto-updater to do this for you.. Thats the whole thing about these services, to atomize things. If you'd have to update the records every time the ip change there wouldn't be a point with dyn-dns...

By the way, i doubt you'll get reverse for your ip (in that case you'll have to speak to your ISP).

Good luck.

- omes
 
Old 01-13-2005, 11:34 AM   #10
nasirjones
LQ Newbie
 
Registered: Dec 2004
Distribution: arch, ubuntu(headless), redhat
Posts: 14

Original Poster
Rep: Reputation: 0
sorry i guess i just want (for learning sake) to set up the dns by myself and keep adjusting the files....i know that sounds nuts but i just wanted to get familiar with setting it up...i know theres updaters but im hoping its possible to do it the hard way and wanted to know how i do that...if that mmakes sense!!
 
Old 01-13-2005, 11:58 AM   #11
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
One major problem with what you are trying to do - you can run a web site on a dhcp connection, but you can't run DNS servers on dhcp. The DNS server has to have a static address so that other computers know where to look for the DNS info. The DNS IP can be changed, but to do so you have to go through whatever registrar you used for the site, and tell them of the change. By the time the registrar's system accurately shows your new DNS address, you may have moved on to a new IP.

If you want to run your own DNS that's fine, BIND is super easy to configure and use, but you need a fixed address for it.

Peace,
JimBass
 
Old 01-13-2005, 11:59 AM   #12
nasirjones
LQ Newbie
 
Registered: Dec 2004
Distribution: arch, ubuntu(headless), redhat
Posts: 14

Original Poster
Rep: Reputation: 0
ok cool....then its not possible in this situation...so i will dload the client from dyn-dns....thanx for advice....
 
Old 01-13-2005, 12:08 PM   #13
omes
Member
 
Registered: Jan 2003
Distribution: debian, FreeBSD
Posts: 120

Rep: Reputation: 15
Quote:
Originally posted by JimBass
One major problem with what you are trying to do - you can run a web site on a dhcp connection, but you can't run DNS servers on dhcp. The DNS server has to have a static address so that other computers know where to look for the DNS info. The DNS IP can be changed, but to do so you have to go through whatever registrar you used for the site, and tell them of the change. By the time the registrar's system accurately shows your new DNS address, you may have moved on to a new IP.

If you want to run your own DNS that's fine, BIND is super easy to configure and use, but you need a fixed address for it.

Peace,
JimBass
Eh, most registrar's today can use CNAME when handling DNS.. That means you simply input the vhost you got/chose from dyn-dns in the "ip" field, and it'll all work very well!

BIND? i assume you mean: "named is super easy to configure". That isn't the fully truth. Forwarding and reversing might be hard for a first timer.. I advice to read some tutorials. If you don't understand them, put a note on this board or pm me, and i'll answer all your questions (that is if i know the answer to them )

Good luck.

- omes

Ps.: If you want to learn of forwarding and reversing, get IPv6 from a free provider btexact is my favourite, but sixxs are also liked by many. With IPv6 you'll get full authority when it comes to reversing (something you wont in most IPv4 cases).
 
Old 01-13-2005, 12:13 PM   #14
omes
Member
 
Registered: Jan 2003
Distribution: debian, FreeBSD
Posts: 120

Rep: Reputation: 15
Quote:
Originally posted by nasirjones
ok cool....then its not possible in this situation...so i will dload the client from dyn-dns....thanx for advice....
But it IS possible!! (at least in most cases)

Also, if it doesn't work out too good for you, i know about many places that can host your DNS records ( however they don't host your reverse records), and you can make and change records whenever you'd like through a web-interface.

NOTHING's IMPOSSIBLE! "If there is a will there is a way!"

- omes
 
Old 07-28-2006, 10:38 AM   #15
isuck@linux
Member
 
Registered: Jun 2006
Distribution: messed up debian
Posts: 250

Rep: Reputation: 30
Hey guys! I was reading the posts and I'm in a sort of same problem. I have a "semi-static" ip, it only changes once in a month or so. I have an apache server behind 2 routers and my dsl router runs webadmin in port 80. I also have bind running but only for speed purpouses, my domains use yahoo dns. Now my problem is that when I try to access my Virtual hosts from my LAN, what I get is my dsl router webadmin. So I thought that if I add thouse domains to my bind, the query would be internal and I would see the web pages correctly. I'm assuming that of course. The problem is that I don't know how to add those 2 domain names to my bind, I tried adding a zone but nothing happened, dig still shows the yahoo records. Can you help me out here if you know what I'm talking about? thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
DISCUSSION: Configure BIND DNS to Answer Active Directory Queries ghight LinuxAnswers Discussion 1 07-04-2007 09:46 AM
DNS and bind kevinm2 Linux - Networking 1 06-15-2005 10:18 PM
help configure these BIND /DNS files adengua Linux - Networking 0 03-02-2004 06:26 AM
DNS and BIND buttnutt Linux - Networking 5 06-08-2002 06:02 PM
DNS and BIND dilberim82 Linux - General 10 07-13-2001 10:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:09 PM.

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