Postingan

Menampilkan postingan dari Agustus, 2016

Configure DHCP Client - CentOS

Configure DHCP Client - CentOS 2014/08/02 Configure DHCP Client. DHCP Client uses 68/UDP. [1] It's the example for configuring CentOS Client. [root@dlp ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 # change BOOTPROTO= dhcp [root@dlp ~]# /etc/rc.d/init.d/network restart Shutting down interface eth0:                              [  OK  ] Shutting down loopback interface:                          [  OK  ] Bringing up loopback interface:                            [  OK  ] Bringing up interface eth0:                                [  OK  ] Configure DHCP Client : Windows It's the example for configuring on Windows 10 Client.

Configure DHCP Server

Configure DHCP Server 2014/08/02 Configure DHCP ( Dynamic Host Configuration Protocol ) Server. DHCP Server uses 67/UDP. [1] Install and configure DHCP Server. [root@dlp ~]# yum -y install dhcp [root@dlp ~]# vi /etc/dhcp/dhcpd.conf # create new # specify domain name option domain-name "srv.world"; # specify name server's hostname or IP address option domain-name-servers dlp.srv.world; # default lease time default-lease-time 600; # max lease time max-lease-time 7200; # this DHCP server to be declared valid authoritative; # specify network address and subnet mask subnet 10.0.0.0 netmask 255.255.255.0 {    # specify the range of lease IP address    range dynamic-bootp 10.0.0.200 10.0.0.254;    # specify broadcast address    option broadcast-address 10.0.0.255;    # specify default gateway    option routers 10.0.0.1; } [root@dlp ~]# /etc/rc.d/init.d/dhcpd start Starting dhcpd: [  OK

Configure Slave DNS Server

Configure Slave DNS Server 2014/08/02 Configure Slave DNS Server. The following example shows an environment that Master DNS is "dlp.srv.world", Slave DNS is "ns.example.host". [1] Configure Master DNS server. [root@dlp ~]# vi /etc/named.conf # add an IP address of slave DNS server allow-transfer { localhost; 172.16.0.85; }; [root@dlp ~]# vi /var/named/srv.world.wan $TTL 86400 @   IN  SOA     dlp.srv.world. root.srv.world. ( # update serial       2014080203  ;Serial       3600        ;Refresh        1800        ;Retry        604800      ;Expire        86400       ;Minimum TTL )        IN  NS      dlp.srv.world. # add Slave server       IN  NS      ns.example.host.       IN  A       172.16.0.82        IN  MX 10   dlp.srv.world. dlp     IN  A       172.16.0.82 [root@dlp ~]# rndc reload server reload successful [2] Configure SLAVE DNS server. [root@ns ~]# vi /etc/named.conf #

Set CNAME

Set CNAME 2014/08/02 If you'd like to set another name to your Host, define CNAME record in a zone file. [1] Set CNAME record in zone file. [root@dlp ~]# vi /var/named/srv.world.lan $TTL 86400 @   IN  SOA     dlp.srv.world. root.srv.world. ( # update serial       2014080202  ;Serial       3600        ;Refresh        1800        ;Retry        604800      ;Expire        86400       ;Minimum TTL )       IN  NS      dlp.srv.world.        IN  A       10.0.0.30        IN  MX 10   dlp.srv.world. dlp     IN  A       10.0.0.30 # [ aliase IN CNAME server's name ] ftp     IN  CNAME   dlp.srv.world. [root@dlp ~]# rndc reload server reload successful [root@dlp ~]# dig ftp.srv.world. ; <<>> DiG 9.7.0-P2-RedHat-9.7.0-5.P2.el6 <<>> ftp.srv.world. ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY:

Chroot Environment

Chroot Environment 2014/08/02 Configute chroot environment. Simply install "bind-chroot" package to do so. If you edit named.conf or other zone files on chroot environment, edit configuration files under /var/named/chroot/. [root@dlp ~]# yum -y install bind-chroot [root@dlp ~]# /etc/rc.d/init.d/named restart Stopping named: [ OK ] Starting named: [ OK ] [root@dlp ~]# ll /var/named/chroot/etc total 28 -rw-r--r-- 1 root root   331 Jul  9 11:17 localtime drwxr-x--- 2 root named 4096 Nov 11  2010 named -rw-r----- 1 root named 1550 Jul  9 23:19 named.conf -rw-r--r-- 1 root named  601 Nov 11  2010 named.iscdlv.key -rw-r----- 1 root named  931 Jun 21  2007 named.rfc1912.zones drwxr-xr-x 3 root root  4096 Jul  9 23:30 pki -rw-r----- 1 root named   77 Jul  9 23:02 rndc.key [root@dlp ~]# ll /var/named/chroot/var/named total 40 -rw-r--r-- 1 root  root   359 Jul  9 23:25 0.0.10.db drwxr-x--- 6 root  named 4096 Jul  9 23:30 chroot drwxrwx---