Linux - NewbieThis 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
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.
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.
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.
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.).
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.
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).
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?...
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).
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!!
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.
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).
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!"
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.