FTPサーバ

vsftpdが標準ですがEPELリポジトリを追加すればproftpdが使える様になります。

ProFTPD をEPEL からインストール

# yum --enablerepo=epel -y install proftpd

主な変更箇所

ServerName 			"www.hoghoge.com"
ServerAdmin 			wemaster@hoghoge.com
IdentLookups			off
TimesGMT			off
ListOptions 			“-a”
AllowRetrieveRestart		on
AllowStoreRestart		on
PassivePorts			4000 4100
DeleteAbortedStores		on
MaxClientsPerHost		5
MaxHostsPerUser		5
ExtendedLog     		/var/log/proftpd/access.log WRITE,READ default
ExtendedLog     		/var/log/proftpd/auth.log AUTH auth

ディレクティブ<DYNAMIC_BAN_LISTS><ANONYMOUS_FTP>は削除しました。

F/Wの内側でプライベートアドレスを使用している場合には、

MasqueradeAddress		Global IP

として指定を追加しないとパッシブ接続の時プライベートアドレスが返答されて繋がりません。
MasqueradeAddressを指定すればグローバルIPが帰って来て正常に接続できます。

証明書をサーバ証明書に変更するには

TLSRSACertificateFile		/etc/letsencrypt/live/ドメイン名/cert.pem
TLSRSACertificateKeyFile		/etc/letsencrypt/live/ドメイン名/privkey.pem

のようにフルパスで指定しましす。

FTP接続を禁止するユーザを1行ずつ列挙

# vi /etc/ftpusers
root
・
・
・

自動起動設定

# systemctl start proftpd
# systemctl enable proftpd