Skip to content

Commit e737f4b

Browse files
committed
firewall.py: add comments about sysctl problems.
1 parent d9f761a commit e737f4b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

firewall.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,12 @@ def do_ipfw(port, dnsport, subnets):
270270

271271
if subnets or dnsport:
272272
sysctl_set('net.inet.ip.fw.enable', 1)
273+
274+
# This seems to be needed on MacOS 10.6 and 10.7. For more
275+
# information, see:
276+
# http://groups.google.com/group/sshuttle/browse_thread/thread/bc32562e17987b25/6d3aa2bb30a1edab
277+
# and
278+
# http://serverfault.com/questions/138622/transparent-proxying-leaves-sockets-with-syn-rcvd-in-macos-x-10-6-snow-leopard
273279
changeflag = sysctl_set('net.inet.ip.scopedroute', 0, permanent=True)
274280
if changeflag == SUCCESS:
275281
log("\n"
@@ -283,6 +289,10 @@ def do_ipfw(port, dnsport, subnets):
283289
"permanent; you only have to do this once.\n\n")
284290
sys.exit(1)
285291
elif changeflag == FAILED:
292+
# On MacOS 10.7, the scopedroute sysctl became read-only, so
293+
# we have to fix it using a kernel boot parameter instead,
294+
# which requires rebooting. For more, see:
295+
# http://groups.google.com/group/sshuttle/browse_thread/thread/a42505ca33e1de80/e5e8f3e5a92d25f7
286296
log('Updating kernel boot flags.\n')
287297
defaults_write_kernel_flag('net.inet.ip.scopedroute', 0)
288298
log("\n"

0 commit comments

Comments
 (0)