2

I have a BIND DNS server running on my Windows 7 development machine and I'm serving pages with WAMPSERVER.

My ideia is to develop some tools (in PHP) for my intranet at work and I want them to be accessible via LAN in this format: http://tools.mycompany.com

I've already placed BIND and I can access http://tools.mycompany.com on the machine that holds BIND server, but I cannot access it from other LAN computers.

I've done the following on my router:

  • defined static IP's for all LAN computers
  • set Port Forwarding to my server (remember: it serves DNS and Web pages)
  • set DNS server configuration to point to my LAN server

On LAN computers, I went to Local Area Network properties and also changed the DNS server IP in order to point to my local DNS server.

If it helps, here is my named.conf file:

options {
  directory "c:\windows\SysWOW64\dns\etc";
  forwarders {127.0.0.1; 8.8.8.8; 8.8.4.4;};
  pid-file "run\named.pid";
  allow-transfer { none; };
  recursion no;
};

logging{
  channel my_log{
    file "log\named.log" versions 3 size 2m;
    severity info;
    print-time yes;
    print-severity yes;
    print-category yes;
  };
  category default{
    my_log;
  };
};

zone "mycompany.com" IN {
    type master;
    file "zones\db.mycompany.com.txt";
    allow-transfer { none; };
};

key "rndc-key" {
        algorithm hmac-md5;
        secret "qfApxn0NxXiaacFHpI86Rg==";
};

controls {
        inet 127.0.0.1 port 953
            allow { 127.0.0.1; } keys { "rndc-key"; };
};

...and a single zone I've defined - file db.mycompany.com.txt:

$TTL 6h
@   IN SOA  tools.mycompany.com.    hostmaster.mycompany.com. (
            2014042601
            10800
            3600
            604800
            86400 )

@       NS  tools.mycompany.com.

tools IN A 192.168.1.4
www IN A 192.168.1.4

On the file above 192.168.1.4 is the IP of the local machine inside my LAN.

Can someone help me here? I need my web pages to be accessible from other computers inside my LAN using my custom domain name.

I've tried on other computers and they can access my server via http://192.168.1.4/, but no able when using http://tools.mycompany.com .

Please, consider the following:

  • I'm completely new to BIND
  • I have basic knowledge in Apache configuration
  • Thanks a lot for your help.

    • Hi everyone, I left the project where I had this issue. So I don't know which answer solved this specific problem. – Ricardo Saraiva Jun 10 '14 at 9:53
    0

    you must add this line to the options in your named.conf file:

    allow-query     { localhost; any; };
    

    so the options will be like this:

    options {
    directory "c:\windows\SysWOW64\dns\etc";
    forwarders {127.0.0.1; 8.8.8.8; 8.8.4.4;};
    pid-file "run\named.pid";
    allow-transfer { none; };
    recursion no;
    allow-query     { localhost; any; };
    };
    
    0

    I faced the same issue. In my case it was due to port blocking by windows firewall. DNS server runs on port 53, which is blocked by default in Windows 7.

    I added rule for allowing port 53 on machine where BIND is installed. For doing this,

    1. Open command prompt in administrative mode.
    2. Execute >netsh firewall add portopening ALL 53 DNS-server

    That's it, now your domain should rock!

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

    Not the answer you're looking for? Browse other questions tagged or ask your own question.