Red Hat Enterprise Linux Server release 6.2 (Santiago)にftp proxyサーバをインストールした時のメモ
ftp.proxy – FTP Proxy Server
http://www.ftpproxy.org
【参考サイト】
CentOS6 に ftpproxyをインストールしてみた
http://www.kurobuti.com/blog/?p=4948
今回は時間の都合もあり本家のrpmパッケージを使用しました。Red Hatでは提供されていませんでした
ftpproxy-1.2.3-1.x86_64.rpm
http://www.ftpproxy.org/download/packages/ftpproxy-1.2.3-1.x86_64.rpm
- xinetd自動起動設定
- ftpproxy-1.2.3-1.x86_64.rpmのダウンロード
- パッケージインストール
- /etc/xinetd.d/ftpproxyの作成
- ログの設定
- rsyslog再起動
- logrotate設定
- xinetd起動
- ftpproxy起動設定
- ftpproxyへの接続テスト
- ログ確認
1 2 3 4 5 |
[root@host01 ~]# rpm -qa | grep xinetd xinetd-2.3.14-33.el6.x86_64 [root@host01 ~]# chkconfig xinetd on [root@host01 ~]# chkconfig --list | grep xinetd xinetd 0:off 1:off 2:on 3:on 4:on 5:on 6:off |
1 2 3 4 5 6 7 8 9 10 11 |
[root@host01 ~]# wget http://www.ftpproxy.org/download/packages/ftpproxy-1.2.3-1.x86_64.rpm --2014-12-18 14:59:04-- http://www.ftpproxy.org/download/packages/ftpproxy-1.2.3-1.x86_64.rpm Resolving www.ftpproxy.org... 104.28.7.51, 104.28.6.51, 2400:cb00:2048:1::681c:633, ... Connecting to www.ftpproxy.org|104.28.7.51|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 28616 (28K) [application/x-redhat-package-manager] Saving to: “ftpproxy-1.2.3-1.x86_64.rpm” 100%[======================================>] 28,616 34.3K/s in 0.8s 2014-12-18 14:59:06 (34.3 KB/s) - “ftpproxy-1.2.3-1.x86_64.rpm” saved [28616/28616] |
1 2 3 4 5 6 |
[root@host01 ~]# rpm -ivh ftpproxy-1.2.3-1.x86_64.rpm Preparing... ########################################### [100%] 1:ftpproxy ########################################### [100%] [root@host01 ~]# rpm -ql ftpproxy /usr/local/man/man1/ftp.proxy.1 /usr/local/sbin/ftp.proxy |
1 2 3 4 5 6 7 8 9 10 11 12 |
[root@host01 ~]# vi /etc/xinetd.d/ftpproxy [root@host01 ~]# cat /etc/xinetd.d/ftpproxy service ftp { disable = no socket_type = stream wait = no user = nobody server = /usr/local/sbin/ftp.proxy server_args = -e -m } |
1 2 3 4 5 6 7 8 9 10 11 |
[root@host01 ~]# vi /etc/rsyslog.conf [root@host01 ~]# cat /etc/rsyslog.conf #rsyslog v3 config file # if you experience problems, check # http://www.rsyslog.com/troubleshoot for assistance #### MODULES #### (snip) # ftp proxy ftp.* /var/log/ftpproxy |
1 2 3 |
[root@host01 ~]# /etc/init.d/rsyslog restart Shutting down system logger: [ OK ] Starting system logger: [ OK ] |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
[root@host01 ~]# vi /etc/logrotate.d/syslog [root@host01 ~]# cat /etc/logrotate.d/syslog /var/log/cron /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler /var/log/ftpproxy { sharedscripts postrotate /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true endscript } |
1 2 |
[root@host01 ~]# /etc/init.d/xinetd start Starting xinetd: [ OK ] |
1 2 3 |
[root@host01 ~]# chkconfig ftpproxy on [root@host01 ~]# chkconfig ftpproxy --list ftpproxy on |
1 2 3 |
[root@host01 ~]# lsof -i:21 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME xinetd 366 root 5u IPv6 3579683 0t0 TCP *:ftp (LISTEN) |
1 2 3 4 5 6 7 8 9 10 11 |
[root@host01 ~]# cat /var/log/ftpproxy Dec 11 13:02:31 host01 ftp.proxy[779]: connected to client: 192.168.100, interface= 192.168.1.200:21 Dec 11 13:02:31 host01 ftp.proxy[779]: info: monitor mode: on, ccp: <unset> Dec 11 13:02:31 host01 ftp.proxy[779]: monitor: server not responding Dec 11 13:02:31 host01 ftp.proxy[780]: connected to client: 192.168.100, interface= 192.168.1.200:21 Dec 11 13:02:31 host01 ftp.proxy[780]: info: monitor mode: on, ccp: <unset> Dec 11 13:02:31 host01 ftp.proxy[780]: connected to server: xxx.xxx.xxx.xxx Dec 11 13:02:31 host01 ftp.proxy[780]: login accepted: ftp-user01@xxx.xxx.xxx.xxx Dec 11 13:02:31 host01 ftp.proxy[780]: cwd: / Dec 11 13:03:14 host01 ftp.proxy[780]: STOR /FFFTP.txt: 14061 bytes Dec 11 13:05:13 host01 ftp.proxy[780]: +OK: proxy terminating |