CentOS 7 FTP 서버 설치, 설정

Static IP 설정




1
2
3
4
5
6
7
8
9
10
11
12
13
14
cd /etc/sysconfig/network-scripts
#Set confi
sudo vi ifcfg-eth0
#Insert below script into /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static
IPADDR=125.131.73.28
NETMASK=255.255.255.0 
#NETMASK는 다음과 같이 대체  PREFIX=24 랑 같음
DNS1=
DNS2=
GATEWAY=
cs



FTP 서버 설치
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
yum -y update
yum -y install vsftpd
sudo vim /etc/vsftpd/vsftpd.conf
#Modify below script
#Disallow anonymous, unidentified users to access files via FTP; change the anonymous_enable setting to NO:
anonymous_enable=NO
#Allow local uses to login by changing the local_enable setting to YES:
local_enable=YES
#If you want local user to be able to write to a directory, then change the write_enable setting to YES:
write_enable=YES
#Local users will be ‘chroot jailed’ and they will be denied access to any other part of the server; change the chroot_local_user setting to YES:
chroot_local_user=YES
#exit
systemctl restart vsftpd
systemctl enable vsftpd
firewall-cmd --permanent --add-port=21/tcp
firewall-cmd --reload
cs



학교, 기관에서 내부망을 사용하고 있다면 지금 설정한 Server의 Port만 Open한다고 외부에서 접속할 수 있는 것은 아니다.

해당 기관의 정보관리팀(IP,보안관리)에 할당 받은 IP의 Port Open을 요청해야한다.

Share:

댓글 1개: