このページは現在編集中です。

StandaloneモードのProftpdを設定する

Standalone モードは、Proftpd が常に稼動している状態であり、inetdを経由するよりも少しばかり早く反応する。

ただし、アクセス制限は、/usr/local/etc/proftpd.conf で行う必要があり、/etc/hosts.allow での制限が有効にならない。

/etc/rc.conf で proftpd を有効にする

# vi /etc/rc.conf

/etc/rc.conf の中に次の1行を加える。ファイル末尾でよい。

proftpd_enable="YES"

/etc/inetd.conf で ftpd 起動を停止する

# vi /etc/inetd.conf

もし、ftp stream の行が活きていたら、行頭に # をつけてコメントアウトする。

#ftp    stream  tcp     nowait  root    /usr/libexec/ftpd       ftpd -l
#ftp    stream  tcp6    nowait  root    /usr/libexec/ftpd       ftpd -l
#ftp    stream  tcp     nowait  root    /usr/libexec/lukemftpd  ftpd -l -r
#ftp    stream  tcp6    nowait  root    /usr/libexec/lukemftpd  ftpd -l -r

/usr/local/etc/proftpd.conf を編集する

/usr/local/etc/proftpd.conf.sample を /usr/local/etc/proftpd.conf にコピーして、

  • もともと proftpd.conf が存在するのなら、それを使えばよい。
# cd /usr/local/etc
# cp proftpd.conf.sample proftpd.conf
# chmod 644 proftpd.conf

/usr/local/etc/proftpd.conf を編集する。

# vi proftpd.conf

内容は次のような具合。部分的に記載するので該当部分を探して変更する。

  • proftp.conf の中の # はコメント行。
  • UseReverseDNS などが見当たらない場合は適当な位置に追加。
  • standaloneモードの時は、proftpd.conf 内でアクセス制限を行う。
ServerName    "ProFTPD Custom Standalone"
ServerType    standalone

TimesGMT      off
UseReverseDNS off
IdentLookups  off
ServerIdent   off

RootLogin     off

<Limit SITE_CHMOD>
  AllowAll
</Limit>

#以下は、LAN内(192.168.0.0/24と仮定する)に属するIPアドレスからの接続のみを許可する例である。 

<Limit LOGIN>
  Order allow, deny
  Allow from 192.168.0.0/24
  Deny from all
</Limit LOGIN>

ひととおり設定が終わったら、FreeBSD7.1RにFTPサーバ(Proftpd)をインストールに戻ってください。

freebsd7.1r/proftpd/proftpd-standalone.txt · 最終更新: 2009/02/12 18:41 by vdobv
CC Attribution-Noncommercial-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0