Results 1 to 6 of 6
Hallo to every one,
I'm trying to move all my websites to a VPS that I hired.
(CentOS Linux 5.4)
To create my DNS server I'm using co.cc addresses (free ...
- 03-16-2010 #1Just Joined!
- Join Date
- Mar 2010
- Posts
- 6
Configuring my VPS
Hallo to every one,
I'm trying to move all my websites to a VPS that I hired.
(CentOS Linux 5.4)
To create my DNS server I'm using co.cc addresses (free domains) for test until I get a correct configuration.
What I am trying to do is this:
I create in co.cc site the domain aaa.co.cc and configure the ZONE RECORD:
aaa.co.cc A 111.111.111.111
ns1.aaa.co.cc A 111.111.111.111
ns2.aaa.co.cc A 111.111.111.111
(names and ips showed here are fictitious, of course)
Also I create bbb.co.cc domain and configure the Service Type as "name server DNS" to:
ns1.aaa.co.cc
ns2.aaa.co.cc
In my VPS server configure BIND:
Create MASTER ZONE:
aaa.co.cc. A 111.111.111.111 Default
ns1.aaa.co.cc. A 111.111.111.111 Default
ns2.aaa.co.cc. A 111.111.111.111 Default
bbb.co.cc. A 111.111.111.111 Default
aaa.co.cc. NS Default ns1.aaa.co.cc.
bbb.co.cc. NS Default ns1.aaa.co.cc.
And I create in my Apache 2 Virtual Hosts, one for aaa.co.cc and another for bbb.co.cc. Each with its path and a test index.html file in each home.
I also open port 53 for TCP and UDP on firewall.
Obviously I can "dig" to aaa.co.cc and all is right, but bbb.co.cc gives me the error:
;; Connection timed out, no servers could be reached
Am I making a big mistake?
I already know that ns1 and ns2 have the same IP, but I want to see if my idea works before "buying" another IP.
Any idea for me?
Thank you very much for your patience and sorry for my accent.
- 03-16-2010 #2
NS1 and NS2 are to be 2 different DNS servers not just 2 ip addresses on the same system. Without having the correct information I cannot help you much as I cannot see the problem to know where the problem is.
You have bind installed on this system? How about posting the complete zone file inside CODE tags ? Need to see what you are doing inside the zone.
- 03-16-2010 #3Just Joined!
- Join Date
- Mar 2010
- Posts
- 6
Hi Lazydog,
Thanks for your reply. Yes BIND is installed.
I've been reading arround the internet and have done some changes. Here is my actual configuration:.....
UPSS. I can't post the info because linuxforums says:
You are only allowed to post URLs to other sites after you have made 15 posts or more.
I'm goint to try to solve this issue and I'll post here my configuration.
Thx again.
- 03-16-2010 #4Just Joined!
- Join Date
- Mar 2010
- Posts
- 6
Hi Lazydog,
Thanks for your reply. Yes BIND is installed.
I've been reading arround the internet and have done some changes. Here is my actual configuration:
named.conf
file:gassgassnet.co.cc.hostsCode://options { // directory "/etc"; // pid-file "/var/run/named/named.pid"; // }; // //zone "." { // type hint; // file "/etc/db.cache"; // }; // // named.conf // // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS // server as a caching only nameserver (as a localhost DNS resolver only). // // See /usr/share/doc/bind*/sample/ for example named configuration files. // options { listen-on port 53 { 127.0.0.1; }; listen-on-v6 port 53 { ::1; }; directory "/var/named/chroot/var/named"; dump-file "/var/named/chroot/var/named/data/cache_dump.db"; statistics-file "/var/named/chroot/var/named/data/named_stats.txt"; memstatistics-file "/var/named/chroot/var/named/data/named_mem_stats.txt"; allow-query { localhost; }; recursion yes; }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; zone "." IN { type hint; file "named.root"; }; #include "/etc/named.conf.local"; zone "gassgassnet.co.cc" { type master; file "/var/named/gassgassnet.co.cc.hosts"; }; zone "oremosjuntos.co.cc" { type master; file "/var/named/oremosjuntos.co.cc.hosts"; };
file:oremosjuntos.co.cc.hostsCode:$ttl 38400 gassgassnet.co.cc. IN SOA ns1.gassgassnet.co.cc. hostmaster.gassgassnet.co.cc. ( 1268697837 10800 3600 604800 38400 ) gassgassnet.co.cc. IN NS ns1.gassgassnet.co.cc. gassgassnet.co.cc. IN A 190.120.229.160 www-gassgassnet.co.cc. IN CNAME gassgassnet.co.cc. ns1.gassgassnet.co.cc. IN A 190.120.229.160
(To post this I've changed the "dot" for "-" in CNAME records)Code:$ttl 38400 oremosjuntos.co.cc. IN SOA ns1.gassgassnet.co.cc. hostmaster.gassgassnet.co.cc. ( 1268751127 10800 3600 604800 38400 ) oremosjuntos.co.cc. IN NS ns1.gassgassnet.co.cc. oremosjuntos.co.cc. IN A 190.120.229.160 www-oremosjuntos.co.cc. IN CNAME oremosjuntos.co.cc.
If more information needed just say it.
Thanks.
- 03-17-2010 #5Just Joined!
- Join Date
- Mar 2010
- Posts
- 6
Perhaps I found the problem.
The port 53 is open in firewall but... it seems that it's filtered by VPS provider.

- 03-18-2010 #6
Are you sure your VPS provider is filtering port 53? Your config isn't setup listen on any ip except 127.0.0.1 you should change this if you expect other to be able to resolve.
Change:
listen-on port 53 { 127.0.0.1; };
To:
listen-on port 53 { any; };
And change:
allow-query { localhost; };
To:
allow-query { any; };
This way requests coming in on your public address will also be answered and resolve your site.
Also change:
recursion yes;
To:
recursion { localhost; };
Don't need other using your system to resolve anything but your domain.
Also are you really running IPv6 or planning on using IPv6? If not then you can remove all the IPv6 stuff.
You should also start using the $ORIGIN statements in your zone files. Would keep you from typing repeated information, for example the domain.
If you are starting Named correctly as a chroot environment then you need to change your options as in a chrooted environment /var/named/chroot is the root dir. so the following should be changed;Code:$ttl 38400 gassgassnet.co.cc. IN SOA ns1.gassgassnet.co.cc. hostmaster.gassgassnet.co.cc. ( 1268697837 10800 3600 604800 38400 ) $ORIGIN gassgassnet.co.cc. IN NS ns1.gassgassnet.co.cc. @ IN A 190.120.229.160 www IN CNAME gassgassnet.co.cc. ns1 IN A 190.120.229.160
toCode:options { directory "/var/named/chroot/var/named"; dump-file "/var/named/chroot/var/named/data/cache_dump.db"; statistics-file "/var/named/chroot/var/named/data/named_stats.txt"; memstatistics-file "/var/named/chroot/var/named/data/named_mem_stats.txt";
This along with the other things should get you up and running.Code:options { 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";
Q: how are you sarting Bind? With an init script? Is that init script starting named in a chroot environment?Last edited by Lazydog; 03-18-2010 at 01:53 PM.


Reply With Quote