CentOS6.6 PCからftp接続できない [LINUX]
VMWare ESXi上にCentOS6.6(x64) minimal+FTPサーバ+ベースで構築したところ、PCからftpができない。
インストール後の作業
・/etc/selinux/config編集
SELINUX=disabled
・vsftpd起動設定
chkconfig vsftpd on
そしてOSを再起動 。
teratermから接続はできるが、FFFTPでは接続先が見つからないというエラーが発生。
久々の構築なので何か忘れている…
普通に考えると残りはファイアウォール設定。いつも明示的な設定はやっていなかったような…
CentOS6.3でうまく動いている環境と比較する。
# ps -ef | grep iptable
root 11658 31882 0 13:18 pts/0 00:00:00 grep iptable
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
プロセスは動いておらず、設定は空っぽ。なんでも通す設定。
これに対して新サーバは
# ps -ef | grep iptable
root 1503 1487 0 22:27 pts/0 00:00:00 grep iptable
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
あれ、何か設定がたくさんされている。そういえば、デフォルトは絞り込み設定だったような。
が、それらしいプロセスは上がっていない。別の方法で確認。
# chkconfig --list | grep ipta
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
OS起動時にファイアウォールが有効になってる!
サービス名とプロセス名が違うのか!?
というわけでプロセスを停止。
# /etc/rc.d/init.d/iptables stop
iptables: チェインをポリシー ACCEPT へ設定中filter [ OK ]
iptables: ファイアウォールルールを消去中: [ OK ]
iptables: モジュールを取り外し中: [ OK ]
# chkconfig iptables off
これで無事にftpできました。
インストール後の作業
・/etc/selinux/config編集
SELINUX=disabled
・vsftpd起動設定
chkconfig vsftpd on
そしてOSを再起動 。
teratermから接続はできるが、FFFTPでは接続先が見つからないというエラーが発生。
久々の構築なので何か忘れている…
普通に考えると残りはファイアウォール設定。いつも明示的な設定はやっていなかったような…
CentOS6.3でうまく動いている環境と比較する。
# ps -ef | grep iptable
root 11658 31882 0 13:18 pts/0 00:00:00 grep iptable
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
プロセスは動いておらず、設定は空っぽ。なんでも通す設定。
これに対して新サーバは
# ps -ef | grep iptable
root 1503 1487 0 22:27 pts/0 00:00:00 grep iptable
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
あれ、何か設定がたくさんされている。そういえば、デフォルトは絞り込み設定だったような。
が、それらしいプロセスは上がっていない。別の方法で確認。
# chkconfig --list | grep ipta
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
OS起動時にファイアウォールが有効になってる!
サービス名とプロセス名が違うのか!?
というわけでプロセスを停止。
# /etc/rc.d/init.d/iptables stop
iptables: チェインをポリシー ACCEPT へ設定中filter [ OK ]
iptables: ファイアウォールルールを消去中: [ OK ]
iptables: モジュールを取り外し中: [ OK ]
# chkconfig iptables off
これで無事にftpできました。
タグ:iptables
2015-04-16 13:32
nice!(0)
コメント(0)
トラックバック(0)
コメント 0