LoginSignup
12
13

More than 5 years have passed since last update.

EC2でFTPサーバを起動する(セキュリティグループ設定のコツ)

Last updated at Posted at 2014-04-17

EC2上にFTPサーバを起動する際のポート空けとかの設定。

パッシブモードOFFだけの対応でよければ簡単

セキュリティグループでTCPの20-21を開けるだけでOK

パッシブモードONの対応方法がちょっと面倒

セキュリティグループでTCPの60000-60100を追加で開ける。
更に proftpd.conf に以下の設定も追加する。

proftpd.conf
MasqueradeAddress <Public IP or Hostname>
PassivePorts      60000 60100

説明

  • 60000-60100ポートはPassive Mode Onの接続で使うことにするポート。
  • PassivePortsではパッシブモード用のポート範囲を限定している。
  • MasqueradeAddressでEC2インスタンスに付いているPublicIPの指定もしてやる必要がある。これをしておかないとパッシブの接続先として10.0.2.32とかのプライベートアドレスを伝えてしまうから繋がらない。
12
13
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
12
13