[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
HWADDR="**:**:**:**:**:**"
IPV6INIT="yes"
ONBOOT="yes"
IPADDR=192.168.0.1
NETMASK=255.255.255.0
GATEWAY=192.168.0.254
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
HWADDR="00:0C:29:DA:5B:40"
IPV6INIT="yes"
ONBOOT="yes"
IPADDR=192.168.0.1
NETMASK=255.255.255.0
IPADDR2=192.168.0.2
NETMASK2=255.255.255.0
IPADDR3=192.168.0.3
NETMASK3=255.255.255.0
IPADDR4=192.168.0.4
NETMASK4=255.255.255.0
GATEWAY=192.168.0.254
IPV6ADDR=fec0::1/120
IPV6ADDR_SECONDARIES="fec0::2/120 fec0::3/112 fec0::4/120"
IPV6_DEFAULTGW=fec0::ff
[root@localhost ~]# yum -y install vsftpd
Loaded plugins: fastestmirror, security
asterisk-11 | 1.1 kB 00:00
asterisk-11/primary | 30 kB 00:00
asterisk-11 132/132
asterisk-current | 1.1 kB 00:00
asterisk-current/primary | 26 kB 00:00
asterisk-current 78/78
base | 3.7 kB 00:00
base/primary_db | 4.4 MB 00:00
digium-11 | 951 B 00:00
digium-11/primary | 2.0 kB 00:00
digium-11 8/8
digium-current | 1.1 kB 00:00
digium-current/primary | 4.6 kB 00:00
digium-current 25/25
extras | 3.4 kB 00:00
extras/primary_db | 18 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 4.4 MB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.x86_64 0:2.2.2-11.el6_4.1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Installing:
vsftpd x86_64 2.2.2-11.el6_4.1 updates 151 k
Transaction Summary
=============================================================================================================================
Install 1 Package(s)
Total download size: 151 k
Installed size: 331 k
Downloading Packages:
vsftpd-2.2.2-11.el6_4.1.x86_64.rpm | 151 kB 00:00
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
Package: centos-release-6-4.el6.centos.10.x86_64 (@anaconda-CentOS-201207061011.x86_64/6.3)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : vsftpd-2.2.2-11.el6_4.1.x86_64 1/1
Verifying : vsftpd-2.2.2-11.el6_4.1.x86_64 1/1
Installed:
vsftpd.x86_64 0:2.2.2-11.el6_4.1
Complete!
[root@localhost ~]# vi /etc/vsftpd/vsftpd.conf
12 anonymous_enable=NO
[root@localhost ~]# cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd_ipv6.conf
[root@localhost ~]# vi /etc/vsftpd/vsftpd_ipv6.conf
107 # When "listen" directive is enabled, vsftpd runs in standalone mode and
108 # listens on IPv4 sockets. This directive cannot be used in conjunction
109 # with the listen_ipv6 directive.
110 #listen=YES
111 #
112 # This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
113 # sockets, you must run two copies of vsftpd with two configuration files.
114 # Make sure, that one of the listen options is commented !!
115 listen_ipv6=YES
[root@localhost ~]# adduser tester
[root@localhost ~]# passwd tester
Changing password for user tester.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]# service vsftpd start
Starting vsftpd for vsftpd: [ OK ]
Starting vsftpd for vsftpd_ipv6: [ OK ]
[root@localhost ~]# yum -y install bind-*
Loaded plugins: fastestmirror, security
Determining fastest mirrors
* base: centos.tt.co.kr
* extras: centos.tt.co.kr
* updates: centos.tt.co.kr
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bind.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be installed
--> Processing Dependency: portreserve for package: 32:bind-9.8.2-0.17.rc1.el6_4.6.x86_64
---> Package bind-chroot.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be installed
---> Package bind-devel.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be installed
---> Package bind-dyndb-ldap.x86_64 0:2.3-2.el6_4.1 will be installed
---> Package bind-libs.x86_64 32:9.8.2-0.17.rc1.el6.3 will be updated
---> Package bind-libs.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be an update
---> Package bind-sdb.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be installed
--> Processing Dependency: libpq.so.5()(64bit) for package: 32:bind-sdb-9.8.2-0.17.rc1.el6_4.6.x86_64
---> Package bind-utils.x86_64 32:9.8.2-0.17.rc1.el6.3 will be updated
---> Package bind-utils.x86_64 32:9.8.2-0.17.rc1.el6_4.6 will be an update
--> Running transaction check
---> Package portreserve.x86_64 0:0.0.4-9.el6 will be installed
---> Package postgresql-libs.x86_64 0:8.4.13-1.el6_3 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Installing:
bind x86_64 32:9.8.2-0.17.rc1.el6_4.6 updates 4.0 M
bind-chroot x86_64 32:9.8.2-0.17.rc1.el6_4.6 updates 71 k
bind-devel x86_64 32:9.8.2-0.17.rc1.el6_4.6 updates 378 k
bind-dyndb-ldap x86_64 2.3-2.el6_4.1 updates 69 k
bind-sdb x86_64 32:9.8.2-0.17.rc1.el6_4.6 updates 306 k
Updating:
bind-libs x86_64 32:9.8.2-0.17.rc1.el6_4.6 updates 878 k
bind-utils x86_64 32:9.8.2-0.17.rc1.el6_4.6 updates 182 k
Installing for dependencies:
portreserve x86_64 0.0.4-9.el6 base 23 k
postgresql-libs x86_64 8.4.13-1.el6_3 base 200 k
Transaction Summary
=============================================================================================================================
Install 7 Package(s)
Upgrade 2 Package(s)
Total download size: 6.0 M
Downloading Packages:
(1/9): bind-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm | 4.0 MB 00:00
(2/9): bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm | 71 kB 00:00
(3/9): bind-devel-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm | 378 kB 00:00
(4/9): bind-dyndb-ldap-2.3-2.el6_4.1.x86_64.rpm | 69 kB 00:00
(5/9): bind-libs-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm | 878 kB 00:00
(6/9): bind-sdb-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm | 306 kB 00:00
(7/9): bind-utils-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm | 182 kB 00:00
(8/9): portreserve-0.0.4-9.el6.x86_64.rpm | 23 kB 00:00
(9/9): postgresql-libs-8.4.13-1.el6_3.x86_64.rpm | 200 kB 00:00
-----------------------------------------------------------------------------------------------------------------------------
Total 3.7 MB/s | 6.0 MB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : 32:bind-libs-9.8.2-0.17.rc1.el6_4.6.x86_64 1/11
Installing : portreserve-0.0.4-9.el6.x86_64 2/11
Installing : 32:bind-9.8.2-0.17.rc1.el6_4.6.x86_64 3/11
Installing : postgresql-libs-8.4.13-1.el6_3.x86_64 4/11
Installing : 32:bind-sdb-9.8.2-0.17.rc1.el6_4.6.x86_64 5/11
Installing : 32:bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64 6/11
Installing : bind-dyndb-ldap-2.3-2.el6_4.1.x86_64 7/11
Installing : 32:bind-devel-9.8.2-0.17.rc1.el6_4.6.x86_64 8/11
Updating : 32:bind-utils-9.8.2-0.17.rc1.el6_4.6.x86_64 9/11
Cleanup : 32:bind-utils-9.8.2-0.17.rc1.el6.3.x86_64 10/11
Cleanup : 32:bind-libs-9.8.2-0.17.rc1.el6.3.x86_64 11/11
Verifying : 32:bind-9.8.2-0.17.rc1.el6_4.6.x86_64 1/11
Verifying : postgresql-libs-8.4.13-1.el6_3.x86_64 2/11
Verifying : 32:bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64 3/11
Verifying : bind-dyndb-ldap-2.3-2.el6_4.1.x86_64 4/11
Verifying : 32:bind-devel-9.8.2-0.17.rc1.el6_4.6.x86_64 5/11
Verifying : 32:bind-utils-9.8.2-0.17.rc1.el6_4.6.x86_64 6/11
Verifying : 32:bind-libs-9.8.2-0.17.rc1.el6_4.6.x86_64 7/11
Verifying : 32:bind-sdb-9.8.2-0.17.rc1.el6_4.6.x86_64 8/11
Verifying : portreserve-0.0.4-9.el6.x86_64 9/11
Verifying : 32:bind-libs-9.8.2-0.17.rc1.el6.3.x86_64 10/11
Verifying : 32:bind-utils-9.8.2-0.17.rc1.el6.3.x86_64 11/11
Installed:
bind.x86_64 32:9.8.2-0.17.rc1.el6_4.6 bind-chroot.x86_64 32:9.8.2-0.17.rc1.el6_4.6
bind-devel.x86_64 32:9.8.2-0.17.rc1.el6_4.6 bind-dyndb-ldap.x86_64 0:2.3-2.el6_4.1
bind-sdb.x86_64 32:9.8.2-0.17.rc1.el6_4.6
Dependency Installed:
portreserve.x86_64 0:0.0.4-9.el6 postgresql-libs.x86_64 0:8.4.13-1.el6_3
Updated:
bind-libs.x86_64 32:9.8.2-0.17.rc1.el6_4.6 bind-utils.x86_64 32:9.8.2-0.17.rc1.el6_4.6
Complete!
[root@localhost ~]# vi /etc/named.conf
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { any; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; };
[root@localhost ~]# vi /etc/named.rfc1912.zones
zone "test.test" IN {
type master;
file "test.test.zone";
allow-update { none; };
};
[root@localhost ~]# cp /var/named/named.localhost /var/named/test.test.zone
[root@localhost ~]# cd /var/named
[root@localhost named]# chown root.named test.test.zone
[root@localhost named]# chmod 770 test.test.zone
[root@localhost named]# vi ./test.test.zone
NS test.test.
A 192.168.0.1
dns IN A 192.168.0.1
AAAA fec0::1
ssh IN A 192.168.0.1
AAAA fec0::1
web IN A 192.168.0.2
AAAA fec0::2
ftp IN A 192.168.0.3
AAAA fec0::3
sip IN A 192.168.0.4
AAAA fec0::4
[root@localhost named]# vi /etc/hosts
192.168.0.1 dns.test.test
192.168.0.1 ssh.test.test
192.168.0.2 web.test.test
192.168.0.3 ftp.test.test
192.168.0.4 sip.test.test
fec0::1 dns.test.test
fec0::1 ssh.test.test
fec0::2 web.test.test
fec0::3 ftp.test.test
fec0::4 sip.test.test
[root@localhost named]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
[root@localhost named]# service named start
Generating /etc/rndc.key:tester
[ OK ]
Starting named: [ OK ]
[root@dlocalhost named]# vi /etc/resolv.conf
nameserver 127.0.0.1
nameserver 168.126.63.1
nameserver ::1
[root@localhost named]# nslookup
> test.test
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: test.test
Address: 192.168.0.1
> dns.test.test
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: dns.test.test
Address: 192.168.0.1
> ssh.test.test
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: ssh.test.test
Address: 192.168.0.1
> web.test.test
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: web.test.test
Address: 192.168.0.2
> ftp.test.test
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: ftp.test.test
Address: 192.168.0.3
> sip.test.test
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: sip.test.test
Address: 192.168.0.4