|
|
我的目的是想只对外开放80 22端口,而且从服务器端也能SSH连接其它机器的SSH服务,以下是我的配置.
turtlejob:/backup# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:www
ACCEPT 0 -- anywhere anywhere
Chain FORWARD (policy DROP)
target prot opt source destination
Chain OUTPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp spt:ssh
ACCEPT tcp -- anywhere anywhere tcp spt:www
ACCEPT 0 -- anywhere anywhere |
|