配置如下:
Generated by iptables-save v1.4.21 on Thu Dec 3 18:37:43 2015
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
#对1和102开放22端口
-A INPUT -p tcp -s 192.168.137.1,192.168.137.102 --dport 22 -j ACCEPT
#对所有IP禁止访问22端口
-A INPUT -p tcp --dport 22 -j REJECT
COMMIT