Beispiel #1
0
 def test_dmz_udp(self):
     dmz_business.set_status_enable(self)
     dmz_control.set_host(self,host1)
     dmz_business.set_udp_protocol(self)
     dmz_control.set_port(self,port1)
     dmz_control.dmz_apply(self)
     dmz_business.iptables_nat(self,host1)
Beispiel #2
0
 def test_dmz_icmp(self):
     dmz_business.set_status_enable(self)
     dmz_control.set_host(self,host1)
     dmz_business.set_icmp_protocol(self)
     dmz_control.dmz_apply(self)
     dmz_business.iptables_nat(self,host1)
     dmz_business.set_status_disable(self)                #测试DMZ策略禁用后是否生效
     dmz_control.dmz_apply(self)
     time.sleep(4)
     dmz_business.iptables_dmz_disable(self,host1)       #测试DMZ策略禁用后是否生效