អាយធីខ្មែរស៊ែរ : itkhmershare.blogspot.com

Set Zone

Monday, December 3, 20120 comments

  Create zone files that servers resolve IP address from domain name.
 
[1]
For internal zone
This example uses internal address[10.0.0.0/24], domain name[server.world], but please use your own one when you set config on your server.
root@dlp:~#
vi /etc/bind/server.world.lan
$TTL 86400
@   IN  SOA     dlp.server.world. root.server.world. (
        2012042701  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
# define name server

        IN  NS      dlp.server.world.
# define name server's IP address

        IN  A       10.0.0.30
# define mail exchanger

        IN  MX 10   dlp.server.world.

# define IP address of a hostname

dlp     IN  A       10.0.0.30
[2]
For external zone
This example uses external address[172.16.0.80/29], domain name[server.world], but please use your own one when you set config on your server.
root@dlp:~#
vi /etc/bind/server.world.wan
$TTL 86400
@   IN  SOA     dlp.server.world. root.server.world. (
        2012042701  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
# define name server

        IN  NS      dlp.server.world.
# define name server's IP address

        IN  A       172.16.0.82
# define mail exchanger

        IN  MX 10   dlp.server.world.

# define IP address of a hostname

dlp     IN  A       172.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[10.0.0.0/24], domain name[server.world], but please use your own one when you set config on your server.
root@dlp:~#
vi /etc/bind/0.0.10.db
$TTL 86400
@   IN  SOA     dlp.server.world. root.server.world. (
        2012042701  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
# define name server

        IN  NS      dlp.server.world.

# define the range of this domain included

        IN  PTR     server.world.
        IN  A       255.255.255.0

# define hostname of an IP address

30      IN  PTR     dlp.server.world.
[4]
For external zone
This example uses external address[172.16.0.80/29], domain name[server.world], but please use your own one when you set config on your server.
root@dlp:~#
vi /etc/bind/80.0.16.172.db
$TTL 86400
@   IN  SOA     dlp.server.world. root.server.world. (
        2012042701  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
# define name server

        IN  NS      dlp.server.world.

# define the range of this domain included

        IN  PTR     server.world.
        IN  A       255.255.255.248

# define hostname of an IP address

82      IN  PTR     dlp.server.world.
Share this article :

Post a Comment