2

I'm running CentOS as a Virtual Machine. I can access the VM's server (IP = 192.168.0.107, which displays a phpinfo() page as it should), but now I would like to acces a custom domain name: "imd.be" and reach that same phpinfo() page. This has worked before but not anymore (on other router). Here's what I've done.

in resolv.conf

 nameserver 192.168.0.107

in named.conf

zone "imd.be" IN {
    type master;
    file "/var/named/imd.be.zone";
    };

in imd.be.zone

$TTL 86400
@   IN SOA localhost. root.localhost. (
                                    42              ; serial
                                    3600            ; refresh
                                    900             ; retry
                                    1W              ; expire
                                    1D )            ; minimum ttl voor cache
@                       NS              localhost.
                    A               192.168.0.107
www             A               192.168.0.107
ftp                     CNAME   www
admin           CNAME   www
jo              A               192.168.O.107
herexamen               CNAME   www

in /etc/httpd/conf.d/imd.be.conf

<VirtualHost *:80>
  ServerAdmin webmaster@dummy-host.example.com
  DocumentRoot /var/www/imd.be
  ServerName imd.be
  ErrorLog logs/imd.be-error_log
  CustomLog logs/imd.be-access_log common
</VirtualHost>

and

dig imd.be

returns

;; connection timed out; no servers could be reached

What am I missing to browse imd.be and acces my own webpage?

  • Has all this configuration work been carried out on the CentOS machine or the VM host. What OS/distro are you running on the host? – garethTheRed Aug 6 '14 at 12:01
  • @Robbert Segers you should check if you can reach the port with telnet – beginer Aug 6 '14 at 12:03
  • What kind of logging are you doing on the bind side? Do the log files have anything useful around the times you submit your dig requests? – Bratchley Aug 6 '14 at 12:29
  • Is bind running? Does it resolve other queries? – derobert Aug 6 '14 at 12:34
0

Well for connection timed out, it is most probably netfilter/iptables . You should provide an exception for port 53 with:-

iptables -A INPUT --dport 53 -j ACCEPT

This is just an example you should refine it accordingly for further security.

  • well my iptables are OFF. iptables -L returns anywhere anywhere everywhere.. – RobSeg Aug 6 '14 at 12:08
  • 1
    @RobbertSegers alright and as I suggested in the previous comment did you check with telnet? Also it would be interesting to know what allow-transfer {"";}; contains in your named.conf – beginer Aug 6 '14 at 12:16
  • your command isn't recognized. I did 'iptables -I INPUT -p tcp --dport 53 -j ACCEPT' but telnet still returns connection refused – RobSeg Aug 6 '14 at 12:17
  • 1
    'allow-transfer' is not in the file.. 'allow-query { localhost; 0.0.0.0/0; };' is most similar – RobSeg Aug 6 '14 at 12:21
  • @RobbertSegers sorry didnt see telnet answer. – beginer Aug 6 '14 at 12:23

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.