mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-04-23 10:49:35 +02:00
BSD: "ipfw add %d accept ip from any to any established"
With this rule, we don't interfere with already-established (or incoming) connections to routes that we're about to take over. This is what happens by default in Linux/iptables.
This commit is contained in:
parent
7043195043
commit
680941cb0c
@ -115,6 +115,9 @@ def do_ipfw(port, subnets):
|
|||||||
if subnets:
|
if subnets:
|
||||||
sysctl_set('net.inet.ip.fw.enable', 1)
|
sysctl_set('net.inet.ip.fw.enable', 1)
|
||||||
sysctl_set('net.inet.ip.forwarding', 1)
|
sysctl_set('net.inet.ip.forwarding', 1)
|
||||||
|
|
||||||
|
ipfw('add', sport, 'accept', 'ip',
|
||||||
|
'from', 'any', 'to', 'any', 'established')
|
||||||
|
|
||||||
# create new subnet entries
|
# create new subnet entries
|
||||||
for snet,swidth in subnets:
|
for snet,swidth in subnets:
|
||||||
|
Loading…
Reference in New Issue
Block a user