I have an EC2 instance (Amazon AMI) on AWS and I have a purchased a domaine name on Gandi.net. Let's imagine my domain name is "teaorcoffee.com".
On Gandi, I have set up a sub-domain name "dev" to delegate DNS to my EC2 instance. Here is the configuration in the zone file on Gandi :
dev 10800 IN NS ec2-22-222-222-22.eu-west-1.compute.amazonaws.com.
I would like to configure sub-domain of "dev.teaorcoffee.com" on my EC2 instance, like "sql.dev.teaorcoffee.com".
I am trying to do that with :
- the "bind" util
- the file "named.conf.local" wich is included in the file "named.conf"
- and a "dev.teaorcoffee.com" zone file
but without success.
Here is the "named.conf.local" file :
zone "dev.teaorcoffee.com" IN { type master; file "/var/named/dev.teaorcoffee.com"; allow-update { none; }; };
Here is the "dev.teaorcoffee.com" zone file :
$TTL 60 @ IN SOA master.dev.teaorcoffee.com. support.teaorcoffee.com. ( 2013030300 60 60 60 38400 ) dev.teaorcoffee.com. IN NS master master.dev.teaorcoffee.com. IN A 127.0.0.1 sql IN CNAME master
I can restart the dns without any error with the command :
sudo /etc/init.d/named restart
But when I am trying to do a nslookup on "dev.teaorcoffee.com" and its sub-domain, I get the following error :
nslookup dev.teaorcoffee.com Server: 127.0.0.1 Address: 127.0.0.1#53
* Can't find dev.teaorcoffee.com: No answer
What can I change to make it work ?
Thanks in advance for any help.
dig
instead of nslookup for more informative messages. – Michael - sqlbot@ IN A 127.0.0.1
. Then, I have executed thedig
command instead ofnslookup
. It seems to work without any problem. But, I still can'tping dev.teaorcoffee.com
or any sub-domain outside of my EC2 instance. – lightmania