Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to accomplish a DNS set up on my local machine using Linux and CentOS.

I've been following couple of tutorials and eventually everything seemed to work but when surfing to my example website I realized it didn't... This is what I've done after installing bind.


   zone "ims.be" IN {
            type master;
            file "example.com.zone";
            allow-update { none; };


$TTL 86400
@    IN    SOA    localhost.    root.localhost. (
            42 ; serial
            3600      ; refresh after 6 hours
            900       ; retry after 1 hour
            1W     ; expire after 1 week
            1D )    ; minimum TTL of 1 day

@       NS      localhost.
        A       192.168.0.***
www     A       192.168.0.***
ftp     CNAME   www


<VirtualHost *:80>
    ServerAdmin webmaster@example.com
    DocumentRoot /home/ims.be/
    ServerName ims.be
    ServerAlias www.ims.be
    ErrorLog logs/ims.be-error_log
    CustomLog logs/ims.be-access_log common

I am able to ping, dig and nslookup to my example website called ims.be.







NAMESERVERS enter image description here

But when surfing to ims.be or www.ims.be using Chrome/Firefox/IE/Safari I get an error that the webpage is not available... However when I surf to my IP address this displays the page ims.be like it should.

I'm working on a Windows 7 using CentOS to access Linux.

I discovered that I'm able to ping etc to ims.be from my Linux but when I'm in command line in Windows I'm unable to ping/nslookup/... ims.be:

Ping request could not find host ims.be

I thought I had to change settings in Windows to get this done but nothing changed just yet... What I've done:

enter image description here

enter image description here

share|improve this question
On your client box (Windows 7), do you have it set to use CentOS as a DNS server? – SailorCire Aug 24 '14 at 16:29
Compare what you've done to this tutorial: digitalocean.com/community/tutorials/… – slm Aug 24 '14 at 16:34
@SailorCire No, how do I set to use CentOS as a DNS server? – user3629755 Aug 24 '14 at 16:41
Looking at your updated question, you'll "never" be able to ping ims.be (this is due to your bind entries). Try pinging www.ims.be – SailorCire Aug 25 '14 at 18:08
also unable to ping www.ims.be... – user3629755 Aug 26 '14 at 11:00

On the box you are using to try to reach the web page, what are your name servers set to?

If on Windows from a cmd prompt you can run:

ipconfig /all

If in Linux, your name servers should be in /etc/resolv.conf

Make sure they are set to only use your new name server. By default, the system will search for the SOA (Start of Authority) and return whatever that server says is the correct IP.

To find the authoritative name servers for your domain you can do a whois, which reports the following as the authoritative name servers for the domain you listed:

share|improve this answer
I've set these to my localhost and ims.be, edited above – user3629755 Aug 25 '14 at 9:23

You can't ping from your Windows host to your Linux guest, Linux firewall is blocking the requests. Can you SSH from your windows into your Linux?

ssh user@ipadress

Make sure your ports are open (firewall is not blocking). For SSH you need port 22 to be open, for DNS port 53. You can open up ports like this.

iptables -I INPUT -p tcp --dport 22 -j ACCEPT

Check the status of your iptables like this.

iptables -L -n

You can also try to manually add the IP of the Linux guest to your windows system. Go to


your Linux IP should be in there, if not, add it.

share|improve this answer
Yes I am able to ssh from windows to Linux. I opened port 53 but still not able to ping to ims.be... – user3629755 Aug 25 '14 at 11:31
Turn off your firewall on linux and see if you still can't ping. ' /etc/init.d/iptables save' and '/etc/init.d/iptables stop'. Then ping. To start again: '/etc/init.d/iptables start' – Harbinger Aug 25 '14 at 11:36
Thanks but still not able to ping – user3629755 Aug 25 '14 at 13:09
what's the return of 'traceroute 192.168.X.X -r' ? Also, try to manually add the IP of the Linux guest to your windows system. Go to C:\WINDOWS\system32\drivers\etc\hosts file, your Linux IP should be there, if not add it. – Harbinger Aug 25 '14 at 13:33
Nice, I added the Linux IP manually and now it works! How's it possible this file doesn't get updated? Cheers! – user3629755 Aug 25 '14 at 13:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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