(self)
| 818 | bash("iptables -I INPUT -p tcp -m tcp --dport %s -j ACCEPT"%port) |
| 819 | |
| 820 | def config(self): |
| 821 | try: |
| 822 | for port in self.ports: |
| 823 | self.allowPort(port) |
| 824 | |
| 825 | for rule in self.rules: |
| 826 | bash("iptables " + rule) |
| 827 | |
| 828 | bash("iptables-save > /etc/sysconfig/iptables") |
| 829 | self.syscfg.svo.stopService("iptables") |
| 830 | self.syscfg.svo.startService("iptables") |
| 831 | return True |
| 832 | except: |
| 833 | raise |
| 834 | |
| 835 | def restore(self): |
| 836 | return True |
nothing calls this directly
no test coverage detected