8/1/12

CẤU HÌNH TRUY CẬP TCP WRAPPER

1.1.         CẤU HÌNH TRUY CẬP TCP WRAPPER

a)    Cài đặt TCP Wrapper

[root@linux ~]#yum -y install tcp_wrappers
b)   Kiểm tra hoạt động của wrap

[root@linux ~]#ldd /usr/sbin/sshd | grep wrap
    libwrap.so.0 => /lib64/libwrap.so.0 (0x00007f01b4e2a000)
c)    Cấu hình điều khiển TCP Wrapper  trong '/etc/hosts.allow' và '/etc/hosts.deny' với truy cập sshd từ 10.0.0.0/24.

[root@linux ~]#vi /etc/hosts.deny
sshd: ALL
[root@linux ~]#vi /etc/hosts.allow
sshd: 10.0.0.
d)   Ví dụ truy cập vsftpd  từ 'host.example.domain'.
[root@linux ~]#vi /etc/hosts.deny
vsftpd: ALL
[root@linux ~]#vi /etc/hosts.allow
vsftpd: host.example.domain

[5]  For the case to allow access to all services that can be under TCP Wrapper control only from 'example.domain' and '10.0.1.0/24'.

[root@linux ~]#vi /etc/hosts.deny
ALL: ALL
[root@linux ~]#vi /etc/hosts.allow
ALL: .example.domain 10.0.1.

Bài đăng phổ biến