读书人

服务器防火墙配备

发布时间: 2012-08-17 02:08:34 作者: rapoo

服务器防火墙配置

[root@qs-xept-app bin]# iptables -L

Chain INPUT (policy ACCEPT)

target ? ? prot opt source ? ? ? ? ? ? ? destination ? ? ? ??

RH-Firewall-1-INPUT ?all ?-- ?anywhere ? ? ? ? ? ? anywhere ? ? ? ? ? ?

?

Chain FORWARD (policy ACCEPT)

target ? ? prot opt source ? ? ? ? ? ? ? destination ? ? ? ??

RH-Firewall-1-INPUT ?all ?-- ?anywhere ? ? ? ? ? ? anywhere ? ? ? ? ? ?

?

Chain OUTPUT (policy ACCEPT)

target ? ? prot opt source ? ? ? ? ? ? ? destination ? ? ? ??

?

Chain RH-Firewall-1-INPUT (2 references)

target ? ? prot opt source ? ? ? ? ? ? ? destination ? ? ? ??

ACCEPT ? ? tcp ?-- ?anywhere ? ? ? ? ? ? anywhere ? ? ? ? ? ?tcp dpt:http?

?

?

[root@qs-xept-app bin]# iptables -I RH-Firewall-1-INPUT -p tcp --dport 8080 -j ACCEPT

[root@qs-xept-app bin]# iptables -L

Chain INPUT (policy ACCEPT)

target ? ? prot opt source ? ? ? ? ? ? ? destination ? ? ? ??

RH-Firewall-1-INPUT ?all ?-- ?anywhere ? ? ? ? ? ? anywhere ? ? ? ? ? ?

?

Chain FORWARD (policy ACCEPT)

target ? ? prot opt source ? ? ? ? ? ? ? destination ? ? ? ??

RH-Firewall-1-INPUT ?all ?-- ?anywhere ? ? ? ? ? ? anywhere ? ? ? ? ? ?

?

Chain OUTPUT (policy ACCEPT)

target ? ? prot opt source ? ? ? ? ? ? ? destination ? ? ? ??

?

Chain RH-Firewall-1-INPUT (2 references)

target ? ? prot opt source ? ? ? ? ? ? ? destination ? ? ? ??

ACCEPT ? ? tcp ?-- ?anywhere ? ? ? ? ? ? anywhere ? ? ? ? ? ?tcp dpt:webcache?

?

[root@qs-xept-app bin]# service iptables save

将当前规则保存到 /etc/sysconfig/iptables: ? ? ? ? ? ? ? ? [确定]


读书人网 >软件架构设计

热点推荐