2020. 4. 16.

[Linux] vsftp ip 제한 설정 실습


접속 IP 구별하여 제한한다.

/etc/hosts.deny(혹은 /etc/hosts.allow) /etc/vsftpd/vsftpd.conf  파일을 수정하여야한다.


/etc/hosts.deny
vsftpd : 192.168.10.153

#192.168.10.153 vsftpd 서비스로 접속하지 못하게 한다.

/etc/vsftpd/vsftpd.conf
listen=NO
tcp_wrappers=YES
# Ip기반으로 차단하는것
수정해준다.

vi /etc/hosts.deny
vsftpd : 192.168.10.153



ftp 192.168.10.152
#153번과 154번으로 접속하여 비교해봅니다.

Croot@cent153 ftp 192.168. 152 
connected to 192.168.113.152 (192.168.1ø.152). 
421 not available. 
ftp) exit 
Croot@cent153 ifconfig 
ens32: BROADCAST, mtu 15øø 
inet 192.168.113.153 netmask 255.255.255.e broadcast 192.168.113.255 
Croot@cent154 # ftp 192.168. 152 
ftp: connect: 
ftp) exit 
Croot@cent154 ftp 192.168. 152 
connected to 192.168.1ø.152 (192.168.1ø.152). 
2213 (vsFTPd 3.e.2) 
Name (192.168.1ø.152:root): test 
331 Please specify the password. 
Password: 
23ø Login successful. 
Remote system type is UNIX. 
using binary mode to transfer files. 
ftp) exit 
221 Goodbye. 
Croot@cent154 ifconfig 
ens32: BROADCAST, mtu 15øø 
inet 192.168.113.154 netmask 255.255.255.ø broadcast 192.168.1ø.255

댓글 없음:

댓글 쓰기