Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-18-2012, 11:12 AM   #1
LQ Newbie
Registered: Jun 2012
Posts: 16

Rep: Reputation: Disabled
Trying to Host DNS with Bind, SO close, question

Ok, so I want to host my domain with my computer using BIND. I did this before with FreeBSD and for some reason having trouble getting it to work on CentOS 6. It took forever but I am able to ping my domain (from inside the network and outside the network) but when I visit the webpage from inside the network it pulls up my router's configuration page. And if you try to access it from Outside the network it cant find the webpage.

I simply need some experienced eyes to look this over for me and show me where I am going wrong if you could

Here is all the relevant information I could think to add:

NameServers are at ns3/ (my ip is dynamic so they act as my nameservers)

[root@mizfitz etc]# ping -c3
PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=64 time=0.192 ms
64 bytes from ( icmp_seq=2 ttl=64 time=0.128 ms
64 bytes from ( icmp_seq=3 ttl=64 time=0.163 ms

--- ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.128/0.161/0.192/0.026 ms
[root@mizfitz etc]# dig

; <<>> DiG 9.7.3-P3-RedHat-9.7.3-8.P3.el6_2.3 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46623
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;		IN	A


;; Query time: 0 msec
;; WHEN: Mon Jun 18 10:53:29 2012
;; MSG SIZE  rcvd: 49
[root@mizfitz etc]# nslookup

Non-authoritative answer:
options {
	listen-on port 53 { any; };
        listen-on-v6 port 53 { ::1; };
        directory	"/var/named";
        dump-file	"/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { any; };
        recursion yes;

        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";

logging {
	channel default_debug {
                file "data/";
                severity dynamic;

zone "." IN {
	type hint;
        file "";

#include "/etc/named.rfc1912.zones";
zone "localhost" IN {
        type master;
        file "";
        allow-update { none; };

zone "" {
                type master;
                file "/var/named/";
                allow-transfer {
              ;                      # localhost
                notify yes;

zone "" {
        type master;
        file "/var/named/";

include "/etc/named.rfc1912.zones";
$TTL 3600    IN	SOA (
                        1D )

        ; Name Server
        IN	NS
        IN	NS
        IN	NS

        ; Mail Exchanger                    IN A  
www                     IN CNAME      
@	IN	SOA     (
2007040301	;serial
14400                 ;refresh
3600                   ;retry
604800              ;expire
10800                ;minimum
)                IN      NS                IN      NS

5               IN	PTR
When I visit in a webbrowser my index.html loads fine
When I visit in a webbrowser i get my router config page

When Outsider visits just not found
Outsider can ping/dig/nslookup just fine

If you need anymore info let me know

What I think it is, I think it has something to do with either my router (this machine is currently set on the DMZ, but get same results inside router when I simply portforward) or it has to do with my reverse ip settings

Any help will be greatly appreciated!
Old 06-18-2012, 04:55 PM   #2
Registered: Apr 2004
Location: Costa Rica
Distribution: slack current with (still off the hook)
Posts: 284

Rep: Reputation: 33
Well a couple of things here.

Have you created a PAT(port address translation) in your router so the HTTP requests are redirected to
And you need to read about BIND Views and NAT(network address translation).

From the outside they are reaching your router that most likely has all ports closed, if open the port and map it to your machine, from the outside they will be able to see it.

Now on your internal network you are providing your public IP, which is indeed the router, hence the need for views.
Old 06-18-2012, 07:53 PM   #3
LQ Newbie
Registered: Jun 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
thank you

My machine is on the DMZ, a feature that my router provides that sets the server outside of any firewall and port forwarding, so that I do not have to forward ports. Or atleast that is how it worked on FreeBSD.

Also my reverse IP zone file designates my LAN IP ( in the PTR record.

If that is not what you are referring to please explain, thanks for the response!
Old 06-18-2012, 08:09 PM   #4
LQ Newbie
Registered: Jun 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
[SOLVED] I guess it was a directory error, did a fresh install of CentOS and copied those files back over, works like a charm


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
BIND DNS - Add host record gen2_user Linux - Newbie 4 10-14-2010 12:05 PM
Dns Error: Connection to the remote host close mosharaf_linux Linux - Server 3 12-24-2008 05:34 AM
BIND/DNS Host resolution problem Seventh Linux - Newbie 1 03-21-2007 03:38 PM
BIND DNS Default Host movitto Linux - Networking 1 03-19-2006 06:02 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration