|
General software and network General OS-independent software and network questions, X11, MTA, routing, etc. |
|
Thread Tools | Display Modes |
|
||||
nameservers
Hello all,
I stumbled upon this tutorial http://www.howtoforge.com/linux_bind...ing_nameserver (sorry not trying to spam) . I was reading it and really explains how to things step by step, but still I have a problem with configuring nameservers so I came here to ask for help. I'm trying to figure out the way to make nameservers for domain name "komentari.info" on vps I rented for testing. In order to update nameservers of this domain I should create ones on this vps machine rite.. like ns1 and ns2 or whatever.. the thing is that I add these ns1.komentari.info inside /etc/named.conf inside file it points to /var/zone/named/ns1.komentari.info.zone. I also add httpd.conf inside <Virtualhost> .. and yet I don't manage to change domains nameservers .. I've bought this domain at key-systems.de (sorry if this is spam) and it doesn't allow me to update nameservers because they don't quite exist .. I've been reading a lot to get an idea how DNS works and I'm pretty much there just I'm missing something. Can you guys help me, which file/s should I edit .. or if I'm doing something wrong to start with can someone put me in the right direction? I've been googling but this tutorial is the best I could find for this type of setup .. Thank you in advance |
|
|||
Are you sure this link works? I'm getting a 404 page not found error.
|
|
||||
Don't know why it didn't paste the whole link.. here it is then http://www.howtoforge.com/linux_bind...ing_nameserver
|
|
|||
Without showing any configuration file it is very difficult to help you
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
||||
I created a little how-to on crafting Redundant Caching-only DNS servers in OpenBSD. It uses CARP, but the named.conf listed could be used independent of any CARP configuration on the servers.
It's listed at this site, but I will create a guide for this here very shortly. Until then, hope that guide (which may even be slightly incomplete) guides you in the right direction.
__________________
Network Firefighter |
|
||||
Thank you for your answers .. here are some configuration files I will start with /etc/httpd/conf/httpd.conf using this turtorial
Its pretty big file I can't post it.. so I'll tell you what I added/edited in here .. LINE 133 - Replaced Listen 80 with Listen 208.84.149.210:80 since this is server main ip LINE 251 - Replaced ServerAdmin root@localhost with ServerAdmin hexteam@gmail.com LINE 266 - Added ServerName 208.84.149.210 LINE 973 - Added NameVirtualHost panel.komentari.info:80 Now I added one virtual hostname record LINE 985 - <VirtualHost panel.komentari.info:80> LINE 986 - ServerAdmin hexteam@gmail.com LINE 987 - ServerName 208.84.149.210 LINE 988 - DocumentRoot /www LINE 989 - ErrorLog logs/error_log LINE 990 - CustomLog logs/access_log combined LINE 991 - </VirtualHost> I also added include file so my httpd.conf wouldn't get too big and I can't handle all records inside so I added LINE 992 - Include conf/vhosts/*.conf and created dir named vhosts -------------------------------------------------------------------- This is what I get with httpd -S Code:
httpd -S [Sun May 25 15:57:22 2008] [error] (EAI 2)Name or service not known: Could not resolve host name panel.komentari.info -- ignoring! [Sun May 25 15:57:23 2008] [error] (EAI 2)Name or service not known: Could not resolve host name panel.komentari.info -- ignoring! VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: _default_:443 208.84.149.210 (/etc/httpd/conf.d/ssl.conf:81) Syntax OK What I did next was cd /etc/httpd/conf/vhosts and added 2 files : 1st one was ns1.komentari.info.80.conf with this content Code:
<VirtualHost ns1.komentari.info:80> ServerAdmin hexteam@gmail.com ServerName 208.84.149.210 ServerAlias www.ns1.komentari.info </VirtualHost> Code:
<VirtualHost ns2.komentari.info:80> ServerAdmin hexteam@gmail.com ServerName 208.84.151.35 ServerAlias www.ns2.komentari.info </VirtualHost> Code:
service httpd restart Stopping httpd: [ OK ] Starting httpd: [Sun May 25 16:09:50 2008] [error] (EAI 2)Name or service not known: Could not resolve host name panel.komentari.info -- ignoring! [Sun May 25 16:09:51 2008] [error] (EAI 2)Name or service not known: Could not resolve host name panel.komentari.info -- ignoring! [Sun May 25 16:09:51 2008] [error] (EAI 2)Name or service not known: Could not resolve host name ns1.komentari.info -- ignoring! [Sun May 25 16:09:52 2008] [error] (EAI 2)Name or service not known: Could not resolve host name ns2.komentari.info -- ignoring! [ OK ] is about making cached nameservers .. I'm still a noob on this topic I've been reading a lot and have some expirience with several control panels but never tried to configure this on my own .. so I did next According to this tutorial there should be file /etc/named.conf but in this version of centos 5 there are slightly different 2 files, one particularly similar to named.conf mentioned in tutorial so what I did I copied named.rfc1912.zones to named.conf and added Code:
zone "panel.komentari.info" IN { type master; file "/var/named/panel.komentari.info.zone"; allow-update { none; }; }; zone "ns1.komentari.info" IN { type master; file "/var/named/ns1.komentari.info.zone"; allow-update { none; }; }; zone "ns2.komentari.info" IN { type master; file "/var/named/ns1.komentari.info.zone"; allow-update { none; }; }; then I started named service named start it failed at first because I didn't have files created inside /var/named .. after creating all 3 files started editing /var/named/panel.komentari.info.zone here is its content Code:
$TTL 86400 @ IN SOA @ hexteam.gmail.com. ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum @ IN NS ns1.komentari.info. IN NS ns2.komentari.info. panel.komentari.info. IN A 208.84.149.210 localhost.panel.komentari.info. IN A 127.0.0.1 Code:
$TTL 86400 @ IN SOA @ hexteam.gmail.com. ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum @ IN NS ns1.komentari.info. IN NS ns2.komentari.info. ns1.komentari.info. IN A 208.84.149.210 localhost.ns1.komentari.info. IN A 127.0.0.1 Code:
$TTL 86400 @ IN SOA @ hexteam.gmail.com. ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum @ IN NS ns1.komentari.info. IN NS ns2.komentari.info. ns2.komentari.info. IN A 208.84.151.35 localhost.ns2.komentari.info. IN A 127.0.0.1 Code:
nameserver 208.77.101.249 nameserver 208.77.101.48 nameserver 208.77.98.215 Code:
ls -la total 36 drwxr-x--- 5 root named 4096 May 25 16:41 . drwxr-xr-x 21 root root 4096 Dec 31 03:46 .. drwxr-x--- 6 root named 4096 May 25 16:24 chroot drwxrwx--- 2 named named 4096 Nov 10 2007 data -rw-r--r-- 1 root root 581 May 25 16:41 komentari.info.zone lrwxrwxrwx 1 root named 45 May 25 08:03 localdomain.zone -> /var/named/chroot//var/named/localdomain.zone lrwxrwxrwx 1 root named 43 May 25 08:03 localhost.zone -> /var/named/chroot//var/named/localhost.zone lrwxrwxrwx 1 root named 44 May 25 08:03 named.broadcast -> /var/named/chroot//var/named/named.broadcast lrwxrwxrwx 1 root named 37 May 25 08:03 named.ca -> /var/named/chroot//var/named/named.ca lrwxrwxrwx 1 root named 44 May 25 08:03 named.ip6.local -> /var/named/chroot//var/named/named.ip6.local lrwxrwxrwx 1 root named 40 May 25 08:03 named.local -> /var/named/chroot//var/named/named.local lrwxrwxrwx 1 root named 39 May 25 08:03 named.zero -> /var/named/chroot//var/named/named.zero -rw-r--r-- 1 root root 589 May 25 16:39 ns1.komentari.info.zone -rw-r--r-- 1 root root 588 May 25 16:41 ns2.komentari.info.zone -rw-r--r-- 1 root root 594 May 25 16:38 panel.komentari.info.zone drwxrwx--- 2 named named 4096 Nov 10 2007 slaves Last edited by c0mrade; 26th May 2008 at 12:03 AM. |
|
|||
First get the nameserver setup working
You should use a single file for the komentari.info zone. And if you specify NS records you also should specify the their A records (sometimes called the glue records). Then test with dig if you can lookup the nameservers Code:
$ dig -t ns komentari.info. Code:
$ dig +norecurse panel.komentari.info @208.84.149.210 Code:
$ dig +norecurse panel.komentari.info @208.84.151.35
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
You only need one file for the zone komentari.info. In that file you put all hosts in that zone. No, need to use different files
Code:
$TTL 86400 @ IN SOA @ hexteam.gmail.com. ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum IN NS ns1.komentari.info. IN NS ns2.komentari.info. ns1 IN A 208.84.149.210 ns2 IN A 208.84.151.35 komentari.info. IN A 208.84.149.210 Code:
]netstat -an -f inet Active Internet connections (including servers) Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp 0 0 192.168.222.20.53 *.* LISTEN tcp 0 0 127.0.0.1.53 *.* LISTEN tcp 0 0 *.6000 *.* LISTEN tcp 0 0 127.0.0.1.587 *.* LISTEN tcp 0 0 127.0.0.1.25 *.* LISTEN tcp 0 0 *.22 *.* LISTEN tcp 0 0 *.515 *.* LISTEN Code:
$ dig +norecurse -t ns komentari.info @127.0.0.1 ; <<>> DiG 9.3.4 <<>> +norecurse -t ns komentari.info @127.0.0.1 ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42956 ;; flags: qr aa ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 2 ;; QUESTION SECTION: ;komentari.info. IN NS ;; ANSWER SECTION: komentari.info. 86400 IN NS ns1.komentari.info. komentari.info. 86400 IN NS ns2.komentari.info. ;; ADDITIONAL SECTION: ns1.komentari.info. 86400 IN A 208.84.149.210 ns2.komentari.info. 86400 IN A 208.84.151.35 Code:
$ dig +norecurse komentari.info @127.0.0.1 ; <<>> DiG 9.3.4 <<>> +norecurse komentari.info @127.0.0.1 ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47363 ;; flags: qr aa ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;komentari.info. IN A ;; ANSWER SECTION: komentari.info. 86400 IN A 208.84.149.210 ;; AUTHORITY SECTION: komentari.info. 86400 IN NS ns1.komentari.info. komentari.info. 86400 IN NS ns2.komentari.info. ;; ADDITIONAL SECTION: ns1.komentari.info. 86400 IN A 208.84.149.210 ns2.komentari.info. 86400 IN A 208.84.151.35 ;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Tue May 27 03:03:42 2008 ;; MSG SIZE rcvd: 116 With those commands you can check whether the nameserver has been configured correctly. The next problem is to make non-recursive queries working. In other words, recursive queries starting from the DNS root servers Code:
]dig -t ns komentari.info. ; <<>> DiG 9.3.4 <<>> -t ns komentari.info. ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23254 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;komentari.info. IN NS ;; ANSWER SECTION: komentari.info. 11395 IN NS ns1.green-grupa.com. komentari.info. 11395 IN NS ns2.green-grupa.com. ;; Query time: 1 msec ;; SERVER: 192.168.222.10#53(192.168.222.10) ;; WHEN: Tue May 27 03:28:24 2008 ;; MSG SIZE rcvd: 83 As you can see it doesn't find yours You have to contact your registrar for the komentari.info zone and tell him that your nameservers are ns1 and ns2.komentari.info at addresses 208.84.149.210 and 208.84.151.35. They have to enter this information in the nameservers for the *.info top level domain. After that is done, my and other recursive nameservers will find your nameservers at 208.84.149.210 and 208.84.151.35.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting up nameservers | paran0iaX | OpenBSD General | 11 | 13th March 2009 12:16 PM |