Amazon Web Services - AWS EC2 - Ubuntu 14.04
Reverse Zone
Reverse zone defines which web page will be opened whe we type IP in browser's adress bar. Also it is important for other internet services like IRC chat.
To check your reverse IP zone:
# dig -x 52.28.170.2
;; ANSWER SECTION:
2.170.28.52.in-addr.arpa. 300 IN PTR ec2-52-28-170-2.eu-central-1.compute.amazonaws.com.
If you get ec2-52-28-170-2.eu-central-1.compute.amazonaws.com. and not your domain do the following:
Let suppose our IP is 52.28.170.2
1. create /etc/bind/db.reverse file
# vim /etc/bind/db.reverse
$ORIGIN 170.28.52.IN-ADDR.ARPA.
$TTL 14400
@ 86400 IN SOA ns1.mikosoft.net. info.mikosoft.net. (
2015062900 ;Serial Number
86400 ;refresh
7200 ;retry
86400 ;expire
86400 ;minimum
)
@ 86400 IN NS ns1.mikosoft.net.
@ 86400 IN NS ns2.mikosoft.net.
2 IN PTR mikosoft.net.
2. add lines in /etc/bind/named.conf.default-zones
//reverse zone
zone "170.28.52.in-addr.arpa" {
type master;
file "/etc/bind/db.reverse";
};
3. check everything
Now when we type in browser http://52.28.170.2 page http://mikosoft.net should be opened.
Also when we run.
#dig -x 52.28.170.2
2.170.28.52.in-addr.arpa. 161 IN PTR mikosoft.net