4. Iptables 서비스에 포트 80번을 다음과 같이 추가합니다. 다시 iptables 명령어를 이용해 방화벽 목록을 확인합니다.
[root@controller ~]# iptables -A INPUT -p tcp -m state –state NEW -m tcp –dport 80 -j ACCEPT [root@controller ~]# 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 ACCEPT tcp – anywhere anywhere state NEW tcp dpt:amqp ACCEPT tcp – anywhere anywhere state NEW tcp dpt:http 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