MCPcopy Index your code
hub / github.com/sshuttle/sshuttle / restore_firewall

Method restore_firewall

sshuttle/methods/ipfw.py:210–219  ·  view source on GitHub ↗
(self, port, family, udp, user, group)

Source from the content-addressed store, hash-verified

208 ipfw('table', '126', 'add', '%s/%s' % (snet, swidth))
209
210 def restore_firewall(self, port, family, udp, user, group):
211 if family not in [socket.AF_INET]:
212 raise Exception(
213 'Address family "%s" unsupported by ipfw method'
214 % family_to_string(family))
215
216 ipfw_noexit('delete', '1')
217 ipfw_noexit('table', '124', 'flush')
218 ipfw_noexit('table', '125', 'flush')
219 ipfw_noexit('table', '126', 'flush')
220
221 def is_supported(self):
222 if which("ipfw"):

Callers

nothing calls this directly

Calls 2

family_to_stringFunction · 0.90
ipfw_noexitFunction · 0.85

Tested by

no test coverage detected