Create zone files that servers resolve IP address from domain name on linux.
[1] For internal zone
This example uses internal address[192.168.0.0/24], domain name[server-linux.info], but please use your own one when you set config on your server.
[root@ns ~]# vi /var/named/server-linux.info.lan
$TTL86400
@INSOAns.server-linux.info. root.server-linux.info. (
2007041501;Serial
3600;Refresh
1800;Retry
604800;Expire
86400;Minimum TTL
)
# define name server
INNSns.server-linux.info.
# internal IP address of name server
INA192.168.0.17
# define Mail exchanger
INMX 10ns.server-linux.info.
# define IP address and hostname
nsINA192.168.0.17
[2] For external zone
This example uses external address[172.16.0.80/29], domain name[server-linux.info], but please use your own one when you set config on your server.
[root@ns ~]# vi /var/named/server-linux.info.wan
$TTL86400
@INSOAns.server-linux.info. root.server-linux.info. (
2007041501;Serial
3600;Refresh
1800;Retry
604800;Expire
86400;Minimum TTL
)
# define name server
INNSns.server-linux.info.
# external IP address of name server
INA172.16.0.82
# define Mail exchanger
INMX 10ns.server-linux.info.
# define IP address and hostname
nsINA172.16.0.82
Reverse resolution
Create zone files that servers resolve domain names from IP address.
[3] For internal zone
This example uses internal address[192.168.0.0/24], domain name[server-linux.info], but please use your own one when you set config on your server.
[root@ns ~]# vi /var/named/0.168.192.db
$TTL86400
@INSOAns.server-linux.info. root.server-linux.info. (
2007041501;Serial
3600;Refresh
1800;Retry
604800;Expire
86400;Minimum TTL
)
# define name server
INNSns.server-linux.info.
# define range that this domain name in
INPTRserver-linux.info.
# define IP address and hostname
INA255.255.255.0
17INPTRns.server-linux.info.
[4] For external zone
This example uses external address[172.16.0.80/29], domain name[server-linux.info], but please use your own one when you set config on your server.
[root@ns ~]# vi /var/named/80.0.16.172.db
$TTL86400
@INSOAns.server-linux.info. root.server-linux.info. (
2007041501;Serial
3600;Refresh
1800;Retry
604800;Expire
86400;Minimum TTL
)
# define name server
INNSns.server-linux.info.
# define range that this domain name in
INPTRserver-linux.info.
# define IP address and hostname
INA255.255.255.248
82INPTRns.server-linux.info.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment