Can i set up a dns server if i don't have registered domain?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Every dns server I have ever used has only a numerical IP (no domain name). Has your experience been different?
No.
If you notice the zone file:
Code:
$TTL 3600
@ IN SOA ns1.example.com. dns-blr2.example.com. (
2010053101 ; Serial 4char year 2mm 2dd 2vv
10800 ; REFRESH
10800 ; retry after 3 hours which forces it on the slave
604800 ; expire after 1 week
86400 ) ; minimum TTL of 1 day
IN NS ns1
IN NS ns2
ns1 IN A 10.76.15.121
noc-t2k-01 IN A 10.76.15.72
noc-t1k-03 IN A 10.76.15.119
noc-t1k-05 IN A 10.76.15.122
Code:
noc-t2k-01.example.com IN A 10.76.15.72
noc-t1k-03.example.com IN A 10.76.15.119
noc-t1k-05.example.com IN A 10.76.15.122
This "noc-t2k-01.example.com" is assigned a static ip address.
So what is this "noc-t2k-01.example.com"?
Isn't a registered domain name?
If we do:
Code:
dig www.google.com
Code:
; <<>> DiG 9.7.0-P1 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34531
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 4, ADDITIONAL: 4
;; QUESTION SECTION:
;www.google.com. IN A
;; ANSWER SECTION:
www.google.com. 39488 IN CNAME www.l.google.com.
www.l.google.com. 110 IN A 209.85.229.99
www.l.google.com. 110 IN A 209.85.229.104
www.l.google.com. 110 IN A 209.85.229.147
;; AUTHORITY SECTION:
google.com. 34932 IN NS ns1.google.com.
google.com. 34932 IN NS ns2.google.com.
google.com. 34932 IN NS ns3.google.com.
google.com. 34932 IN NS ns4.google.com.
;; ADDITIONAL SECTION:
ns1.google.com. 34947 IN A 216.239.32.10
ns2.google.com. 244746 IN A 216.239.34.10
ns3.google.com. 20662 IN A 216.239.36.10
ns4.google.com. 20889 IN A 216.239.38.10
;; Query time: 5 msec
;; SERVER: 114.31.0.66#53(114.31.0.66)
;; WHEN: Wed Jun 2 01:55:51 2010
;; MSG SIZE rcvd: 236
I think you are both on different wavelengths here.
Cola - your question is rather vague - can you be more specific? What are you trying to achieve? You don't have to own a .com address to run a DNS server, if that is what you mean. You could for example have an internal domain "myhouse.local" - you don't have to have this registered anywhere.
then you could have 3 PC's...pc1.myhouse.local, and so on. For each PC you would have an A record within the BIND Zone File for myhouse.local, eg:
pc1.myhouse.local. IN A 192.168.1.1
pc2.myhouse.local. IN A 192.168.1.2
and so on..
If PC1 tries to ping hostname PC3, the myhouse.local nameserver resolves the name with an authoritative response.
If the PC's in the internal domain used this DNS server and requested an address for which the DNS server has no entry it will be forwarded to an external DNS server. This can be done with forwarders or by using the root.hints file.
In the example zone file you posted "noc-t2k-01.example.com" is a host (note that it is an A record).
I think you are both on different wavelengths here.
Cola - your question is rather vague - can you be more specific? What are you trying to achieve? You don't have to own a .com address to run a DNS server, if that is what you mean. You could for example have an internal domain "myhouse.local" - you don't have to have this registered anywhere.
then you could have 3 PC's...pc1.myhouse.local, and so on. For each PC you would have an A record within the BIND Zone File for myhouse.local, eg:
pc1.myhouse.local. IN A 192.168.1.1
pc2.myhouse.local. IN A 192.168.1.2
and so on..
If PC1 tries to ping hostname PC3, the myhouse.local nameserver resolves the name with an authoritative response.
If the PC's in the internal domain used this DNS server and requested an address for which the DNS server has no entry it will be forwarded to an external DNS server. This can be done with forwarders or by using the root.hints file.
In the example zone file you posted "noc-t2k-01.example.com" is a host (note that it is an A record).
Often these are used for websites, for example.
If I am stating the obvious, I apologise.
I have only one pc/machine.
How would this domain be "myhouse.local" made?
I want to set up a dns server on my pc.
Do you want to do DNS for an internal domain (which as covered doesn't need to be a publicly registered domain)? Basically the simplest thing to do if you only have a single PC is setup BIND and only a root hints zone file.
If you do want to resolve internal hosts just pick some random domain for the computers internally to use, and setup the forward lookup zone file. Might as well do the reverse too if you go through the trouble of setting up an internal server (not really that big of a deal IMHO).
While it would be perfectly acceptable to set up a local domain, with only one PC I don't see a good reason to. If you want to name it, it would be easier to put an entry in your hosts file. One thing to consider is that you can run a DNS server and use that instead of your ISP for doing lookups. It has been my experience that the DNS service seems to be the most common item to go down on ISPs. There are quite a few good tutorials out there on this subject. Bind9 is pretty easy to setup. Take a look at these: http://www.zaphu.com/2007/09/10/ubun...-server-setup/
and http://lani78.wordpress.com/2008/08/...local-network/
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.