Skip to content

Commit

Permalink
Replace ipfw with pf.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobthecow committed Nov 2, 2014
1 parent cc9dc84 commit e0b7b20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions bin/local-tld-uninstall
Expand Up @@ -15,3 +15,6 @@ $SUDO rm -f /Library/LaunchDaemons/ie.hood.local-tld-firewall.plist
rm -f $HOME/Library/LaunchAgents/ie.hood.local-tld-service.plist

$SUDO rm -f /etc/resolver/dev

# Flush nat rules
$SUDO pfctl -a com.apple/250.PowFirewall -F nat 2>/dev/null || true
2 changes: 1 addition & 1 deletion etc/ie.hood.local-tld-firewall.plist
Expand Up @@ -8,7 +8,7 @@
<array>
<string>sh</string>
<string>-c</string>
<string>ipfw add fwd 127.0.0.1,5999 tcp from any to me dst-port 80 in &amp;&amp; sysctl -w net.inet.ip.forwarding=1</string>
<string>echo "rdr pass on lo0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 5999" | pfctl -a "com.apple/250.ApplicationFirewall" -f - -E</string>
</array>
<key>RunAtLoad</key>
<true/>
Expand Down

0 comments on commit e0b7b20

Please sign in to comment.