(self, port, family, udp, user, group)
| 474 | pf.enable() |
| 475 | |
| 476 | def restore_firewall(self, port, family, udp, user, group): |
| 477 | if family not in [socket.AF_INET, socket.AF_INET6]: |
| 478 | raise Exception( |
| 479 | 'Address family "%s" unsupported by pf method_name' |
| 480 | % family_to_string(family)) |
| 481 | if udp: |
| 482 | raise Exception("UDP not supported by pf method_name") |
| 483 | |
| 484 | pf.disable(pf_get_anchor(family, port)) |
| 485 | |
| 486 | def firewall_command(self, line): |
| 487 | if line.startswith('QUERY_PF_NAT '): |