#iptable 설치 방법

yum -y install iptables
yum -y install iptables-service

#iptables service 설치 확인 방법

rpm -qa | grep iptables

결과

Imagem em um ipad

#/etc/sysconfig 이동

cd /etc/sysconfig

결과

Imagem em um ipad

#iptables 열기

vi iptables

결과

Imagem em um ipad

#수정 방법

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state –state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state –state NEW -m tcp –dport 22 -j ACCEPT
-A INPUT -p tcp -m state –state NEW -m tcp –dport 1521 -j ACCEPT

추가

-A INPUT -j REJECT –reject-with icmp-host-prohibited
-A FORWARD -j REJECT –reject-with icmp-host-prohibited
COMMIT

-A INPUT -p tcp --dport PORT -j ACCEPT

EX) -A INPUT -p tcp –dport 1521 -j ACCEPT

iptables 명령어 설정 후 재시작 필요!

iptables service start
iptables service stop
iptables service restart