3
7

More than 5 years have passed since last update.

CentOS6.6(x64)FTPインストールと接続(iptables設定)

Posted at

rootになる。

インストール

yum -y install vsftpd

設定

cd /etc/vsftpd/
cp -prf vsftpd.conf vsftpd.conf.org
vi vsftpd.conf

下記のように設定する。

anonymous_enable=NO
ascii_upload_enable=YES
ascii_download_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
ls_recurse_enable=YES

ユーザ追加

echo "yamato" >> /etc/vsftpd/chroot_list

IPアドレス制限

echo "vsftpd:ALL" >> /etc/hosts.deny
echo "vsftpd:ALL" >> /etc/hosts.allow

iptablesの設定

iptables -vnL
vi /etc/sysconfig/iptables
-A INPUT -p tcp -m tcp --dport 20 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
/etc/init.d/iptables restart

SELinux

setenforce 0

起動

/etc/rc.d/init.d/vsftpd restart
3
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
7