我用2003server, 批处理首先关闭所有端口,然后打开80,20,21端口,关闭所有端口实现了,但打开端口没实现。我的防火墙也关了!请帮忙分析一下原因,谢谢
@echo off
rem 关闭服务器所有端口
ipseccmd -w REG -p "Haishion" -r "Block All IP" -f *+0 -n BLOCK
rem 开放服务器端口,80,20,21
ipseccmd -w REG -p "Haishion" -r "Open Port 80" -f *+0:80:TCP -n PASS
ipseccmd -w REG -p "Haishion" -r "Open Port 20" -f *+0:20:TCP -n PASS
ipseccmd -w REG -p "Haishion" -r "Open Port 21" -f *+0:21:TCP -n PASS
rem 激活指派
ipseccmd -w REG -p "Haishion" -x
net stop policyagent
net start policyagent
cmd
@echo off
rem 关闭服务器所有端口
ipseccmd -w REG -p "Haishion" -r "Block All IP" -f *+0 -n BLOCK
rem 开放服务器端口,80,20,21
ipseccmd -w REG -p "Haishion" -r "Open Port 80" -f *+0:80:TCP -n PASS
ipseccmd -w REG -p "Haishion" -r "Open Port 20" -f *+0:20:TCP -n PASS
ipseccmd -w REG -p "Haishion" -r "Open Port 21" -f *+0:21:TCP -n PASS
rem 激活指派
ipseccmd -w REG -p "Haishion" -x
net stop policyagent
net start policyagent
cmd
