간단하게 iptables를 설정했는데ftp가 안됨니다.
물론 iptable을 내리면 되구요.
무엇이 잘못된거같은데..
다음은 제가 설정한 것입니다.
(환경: redhat7.2, 커널-2.4.7)
/etc/sysconfig/에 있는 iptables
=========================================================
#!/bin/sh
#우선 모든 Rule을 정리한다.
/sbin/iptables -F
# 다음으로 각각에 대한 정책을 세운다.
/sbin/iptables -P INPUT DROP
/sbin/iptables -P OUTPUT ACCEPT
/sbin/iptables -P FORWARD DROP
/sbin/iptables -A INPUT -p tcp --dport 22 -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 80 -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 21 -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 20 -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 1:65535 -j DROP
/sbin/iptables -A INPUT -p icmp --icmp-type echo-request -j DROP
=========================================================
그다음 /etc/rc.d/rc.local에서 iptables자동시작하게 함
iptables 실행결과==============================================
[root@com10 rc.d]# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp-
data
ACCEPT tcp -- anywhere anywhere tcp
dpt:mysql
DROP tcp -- anywhere anywhere tcp
dpts:tcpmux:65535
DROP icmp -- anywhere anywhere icmp echo-
request
Chain FORWARD (policy DROP)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
==============================================================