0

I am connected to a reliance wifi connection obtained a 192.168.0.101 ip. 192.168.0.1 as primary dns. I configured dns bind to give name to my server process. To test that locally i changed the dhclient.conf "prepend domain-name-servers 127.0.0.1;" so that my resolv.conf changed to namserver 127.0.0.1. and my primary dns changed to 127.0.0.1

ashokkrishna@krishna:~$ nslookup group.hom
Server:     127.0.0.1
Address:    127.0.0.1#53

** server can't find group.hom: SERVFAIL

and the config file

ashokkrishna@krishna:/etc/bind$ cat named.conf.local
# Our domain zone
zone "group.hom" {
   type master;
   file "/etc/bind/zones/group.hom.db";
};

# For reverse DNS 
zone "0.168.192.in-addr.arpa" {
   type master;
   file "/etc/bind/zones/rev.0.168.192.in-addr.arpa";
};

the forward zone file.

ashokkrishna@krishna:/etc/bind/zones$ cat group.hom.db
;
; BIND data file for local loopback interface
;
$TTL    604800
@   IN  SOA i.group.hom. root.group.hom. (
                  2     ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
;
@   IN  NS  group.hom.
@   IN  A   192.168.0.101
www     IN  A       192.168.0.101

reverse zone

ashokkrishna@krishna:/etc/bind/zones$ cat rev.0.168.192.in-addr.arpa
;
; BIND data file for local loopback interface
;
$TTL    604800
@   IN  SOA i.group.hom. root.group.hom. (
                  2     ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
;
@   IN  NS  group.hom.
101.0.168   IN  PTR group.hom.

/etc/hosts

ashokkrishna@krishna:/etc/bind/zones$ cat /etc/hosts
127.0.0.1   localhost
127.0.0.1      krishna
192.168.0.101       i.group.hom    i

named.conf.options

dnssec-validation auto;

    auth-nxdomain no;    # conform to RFC1035
    listen-on-v6 { any; };
};

why i am getting this error? bind successfully running but it is not giving the name to my system. its not connecting why.?

new zone database:

;
; BIND data file for local loopback interface
;
$TTL    604800
@   IN  SOA ib.group.hom. root.group.hom. (
                  2     ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
;
@   IN  NS  group.hom.
group.hom.    IN    A    192.168.0.101
@   IN  A   192.168.0.101
www     IN  A       192.168.0.101
ashok
  • 229
  • 2
  • 4
  • 10

1 Answers1

0

Try to add to your zone (group.hom.db) this:

group.hom.    IN    A    192.168.0.1

Because you only have an entry for www.group.hom

alphamikevictor
  • 1,062
  • 6
  • 19
  • is it 192.168.0.1 ? – ashok May 30 '15 at 07:34
  • ashokkrishna@krishna:~$ sudo named-checkzone group.hom.db /etc/bind/zones/group.hom.db /etc/bind/zones/group.hom.db:13: ignoring out-of-zone data (group.hom) – ashok May 30 '15 at 07:45
  • after adding group.hom. IN A 192.168.0.1 – ashok May 30 '15 at 07:45
  • Did you restart named and tried to query again group.hom ? – alphamikevictor May 30 '15 at 08:07
  • after adding group.hom IN A 192.168.0.101 – ashok May 30 '15 at 09:11
  • i restarted it worked fine. – ashok May 30 '15 at 09:12
  • but it is not resolving the www.group.hom. – ashok May 30 '15 at 09:12
  • nslookup www.group.hom Server: 192.168.0.1 Address: 192.168.0.1#53 ** server can't find www.group.hom: NXDOMAIN – ashok May 30 '15 at 09:12
  • Could you please update the question with the new zone database? – alphamikevictor May 30 '15 at 09:23
  • Try to remove the line `@ IN A 192.168.0.101` and then restart again named. – alphamikevictor May 30 '15 at 09:34
  • ya now its working – ashok May 30 '15 at 09:38
  • but reverse lookup failed. – ashok May 30 '15 at 09:38
  • ** server can't find 101.0.168.192.in-addr.arpa: NXDOMAIN – ashok May 30 '15 at 09:40
  • ok it is worked for me. i just change 101.0.168 to 101 in reverse lookup zone file. then it worked for me. – ashok May 30 '15 at 09:58
  • but it is not working in the browser – ashok May 30 '15 at 09:58
  • You must check your machine points to your dns. – alphamikevictor May 30 '15 at 09:59
  • my primary dns points to 127.0.0.1 but secondary dns points to 192.168.0.1 – ashok May 30 '15 at 10:02
  • actually group.hom. www.group.hom. both addresses are worked fine when i typed in the browser. – ashok May 30 '15 at 10:03
  • but when i typed the 192.168.0.101 in the browser it didn't converted back to group.hom – ashok May 30 '15 at 10:03
  • hi bro please help me. – ashok May 30 '15 at 10:17
  • If you perform a ping to www.group.hom or group.hom from the CLI it should reply with the IP address you assigned. If it is the case you can try with `curl -v http://www.group.hom/` to see what happens and continue your troubleshooting. – alphamikevictor May 30 '15 at 10:47
  • ping group.hom and ping www.group.hom worked successfully. – ashok May 30 '15 at 10:53
  • Oops didn't see your last comments. When you type on your browser the ip address it does not any type of conversion. Think about with HTTP Virtual servers you can have lots of differents sites based on the `Host` header you send to the webserver, if you type http://192.168.0.101 in your browser then it will send as header `Host: 192.168.0.101` – alphamikevictor May 30 '15 at 10:53
  • but when i typed facebook ip in the address bar it immediately converted to www.facebook.com – ashok May 30 '15 at 10:56
  • But it is not performed by the browser, when you reach facebook ip it replies you with a redirect to http://www.facebook.com: `[root@workhorse ~]# curl -i http://31.13.83.8` and observe how in the reply it says to you `Location: http://www.facebook.com/` which instructs the browser to go to www.facebook.com – alphamikevictor May 30 '15 at 11:03
  • could you please provide me any resource about this why browsers dont do reverse lookup and about the facebook ip and dns connection. to understand better. – ashok May 30 '15 at 11:06
  • You can start at [WikiPedia](http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) and perhaps search at [Google](https://www.google.es/search?q=http+for+dummies&ie=utf-8&oe=utf-8&gws_rd=cr&ei=dpppVeDIDYGqU7ThgZAK) . Or just try to use the Network console of Firefox or Chrome and try to figure out what's going on, keep asking those things you don't understand ... the basic process of learning :) – alphamikevictor May 30 '15 at 11:11
  • curl -v "http://www.group.hom" Rebuilt URL to: http://www.group.hom/ * Hostname was NOT found in DNS cache * Could not resolve proxy: * Closing connection 0 – ashok May 30 '15 at 11:18