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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Roughly... here is the deal... in lame noob words.
DNS stands for Domain Name Server.
Think in it as your phone number... it is unique... so if I dial it fron anywhere in the world... it will only ring in your phone... same is with IP's, they are unique arroun the world.
Do you know what is the IP for www.google.com ? nor do I !! is hard to remember numbers. So let put it a NAME !!!! That name is "google.com"
How you computer know what is the number to dial for "googgle.com" ? you PC does NOT !!
You PC will consult the DNS database provided by your ISP. Once your PC knows what is the IP for such name, is when it will dial and make the connection.
Now, each time you connect to your ISP, you get a lease for an IP, this IP is unique arround the world. When you register a DNS, the registrar will inform the Domain Name Servers arround the world that 'sumting.com' has the IP ###.###.###.###
Ohh... but your ISP tomorrow will assign you a new IP !! darn... kinda sucks to have dinamic IP... and to update the DNS's usually takes days !!!
SO you get a service from a g uy with a persistant IP and name (like 'www.no-ip.com)
Now you need to inform www.no-ip.com of your new IP EACH time you conect to the internet.
People will make a call to no-ip.com, and the call will be forwarded to your present IP.
The name that you use for the domain name in your INTRANET are never known to the outside world (if you chose so), since they are in different networks.
There are LOTS of totorial in this topic, LOTS of them, I am sure you did none to little effort searching the web in this topic. But, just google a bit, and you will find more extensive explinations.
but how do you "tell" the DNS that this domain name is belone to you and please pointing this domain to MY IP address??? do you do this on your own linux system or it's has to be done on where you register your domain name from?
When you register your domain, you are allowed to specify which name servers are to be authoritative for it. You generally do this through a form on your registrar's Web site. At this point, it is your responsibility to configure those DNS servers to set up the hosts in your domain, any MX (Mail eXchange) records etc. There are a number of free DNS sites that will allow you to use their DNS servers. I've never used them as I have my own servers to use, but from what I've heard, they're generally quite user friendly. You can do your own DNS hosting, but you'll need both a primary and secondary nameserver that are more or less permanantly connected to the Internet with a static IP. Also, you may need to register them as name servers -- I'm not sure, as I did not do the initial configuration of the servers I use. In general, DNS administration is a pretty advanced topic, and requires a bit of work to understand, so it may be best to just use someone else's DNS servers.
You can do your own DNS hosting, but you'll need both a primary and secondary nameserver that are more or less permanantly connected to the Internet with a static IP. Also, you may need to register them as name servers
Here is what I don't understand. some hoster out there can provide me free DNS which by redirecting the domain name to my own IP address. so in domain name control panel where I registered my domain, I can type for example ns2.freednshost.com ns1.freednshost.com. BUT how can I use my own DNS which is ns1.mydomain.com? cause if I set ns1 as ns1.mydomain.com in the domain name control panel. then it's makes me think everybody can set their DNS to ns1.mydomain.com and using their IP. How and who restrict it?
You have to own the domain not a hostname. So you would need to register with a registrar and tell them that mydomain.com is hosted by ns1.mydomain.com. They in turn register this with the top level domain servers so that when they get queried for xxx.mydomain.com they refer them to your dns server which will answer authoritatively for any dns names for your domain. Here is a very basic diagram of a dns query
Your authritative NS
I query the root nameserver to find out what server is handling .com so the root nameserver refers me to tld name server
One of the TLD servers hands out who has mydomain.com
You can configure your own DNS to point any domain name to your machine. But it'll work only for your machine/network. If someone from the other part of the globe asks for a domain, their own (usually their ISP's) nameserver is asked. If there's no simple answer (that nameserver doesn't have it in its cache or doesn't host the domain) it asks one of the root servers. The servers know where to find info for .com, .net and other highest level domains. A server that is supposed to know all .orgs is then asked. It points to a server that know the second part of the address (somewhere.org) and so on. So when your nameserver is not the part of the tree, it's local.
Peacebwitchu: " So you would need to register with a registrar and tell them that mydomain.com is hosted by ns1.mydomain.com. "
Then for example is my domain is www.ebay.com then do I have to use ns1.ebay.com? or ns1.otherbid.com is also fine? But I believe most of them time name server is just going to be their full domain name with ns1 or ns2 infront of it. then let's say if I choose ns1.ebay.com and I set it in name.conf. How and who knows I do own this domain? if you know or you can just guessing if ebay.com is using ns1.ebay.com, can't you set your own DNS as ns1.ebay.com as well?
Mara: . If someone from the other part of the globe asks for a domain, their own (usually their ISP's) nameserver is asked. If there's no simple answer (that nameserver doesn't have it in its cache or doesn't host the domain) it asks one of the root servers.
yea what if someone guessing my domain name server is ns1.mydomain.com and set it on their own machine....
still works!? won't the high level machine check the IP?
If I set www.mydomain.com with ip 126.96.36.199 then how do "they" know this is the correct IP address for domain mydomain.com? cause there is no way for me to "tell" domain.com what's my real IP. Only thing I can set on mydomain.com is I can tell it which domain server should I pointing to. (ns1.mydomain.com) that's all.. but I never mention what's the IP for ns1.mydomain.com. anybody?
Maybe I'll clear things up a bit, because I'm not sure if everything was told straight.
You can set an IP for any hostname on your machine. The right file is /etc/hosts. But I repeat, it'll only work on the machine it's set. When a pair of IP and hostname is found in the file, it's not checked in any DNS server.
Another thind, when you configure a DNS server to keep info about a domain, it won't (in most cases) ask any other server for confirmation. But still, all people not using your server will see the domain correctly (in a different way than you).
ah.. Mara I got what you saying. You saying if I pointing a domain that don't belong to me it's still works for only works for my own machine. and basically how DNS works is it will automatically check whos the owner of the domain, it first check for .com and mydomain.com then check who is the server for www.mydomain.com. I can have any host name I want, for example if www.ebay.com is my domain name and on register control panel I set it DNS to ns1.yahoo.com. Moreover, on my machine I set it to ns1.yahoo.com. then www.ebay.com is going to point to my machine?? I am just telling www.ebay.com that name server is host with ns1.yahoo.com but I didn't told which IP. then as you all know yahoo.com is a famous company and I am not. But I use ns1.yahoo.com is this also works??
The DNS server doesn't check who's the owner - it's not important. The important thing is an existence of an entry in a higher level DNS server (for example, if you need info for somewhere.com new entry must be added/changed in all servers taking care of .com domain). That's how domain registration works. It's not important what does your server say until a higher level server redirects queries about a domain to you. Of course, you won't be allowed to register a domain that's in use or modify addresses of its nameservers. You won't ba also allowed to register a domain its nameservers belong to - because it's already registred.
I'm making things simplier than they are, but that's more or less how it works.
I dont mean to interfear, you explained all correctly, but it is my impression that has not grasped the simple concept of the Domain names.
So, while mare has more tech knowledge about the topic, I will use lame noobie words (which do not represent the whole mechanics behind DNS) but are lame terms that helped me to first understand this topic.
Think in the DNS as a database server. Contains a directory of the number to contact (IP) and the name of such contact (Domain Name)
sumting.com -----> 255.255.255.255
noname.com -----> 255.255.255.254
huangzen.com -----> 255.255.255.253
There is a 'official' directory list in the internet. In order to be part of this 'official' list, you need to use the services of a 'official' registrar. ( http://www.internic.net/regist.html )
Now, you have a unique IP in the internet, this IP can be linked to a name, and be set in that 'official' list. Your local ISP will update their DNS witht eh 'official' list.
That is the OUTSIDE world, the internet.
Now, if you have a BIG local network, like your work place, you can have your own DNS server with a LOCAL list pointing to the local IP's and local names.
Remember that a local network it always TOTALY and COMPLETELY independent to the internet.
The way this no-ip.com service works is by BOUNCING the visitor to your current IP.
Say, a visitor wants to see huangzen.no-ip.com , they are calling to no-ip.com and requesting to see the 'huangzen' web site. at this point they are told 'guess what... is not here !!! you need to go visit him at the IP ###.###.###.### !!!