Add com.coverall
file to /etc/pf.anchors
with:
rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port = 80 -> 127.0.0.1 port 8080
rdr pass on en0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass on en1 inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass on en2 inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
Update pf.conf
to point to this new file a-la:
scrub-anchor "com.apple/*"
nat-anchor "com.apple/*"
rdr-anchor "com.apple/*"
rdr-anchor "coverall"
dummynet-anchor "com.apple/*"
anchor "com.apple/*"
load anchor "com.apple" from "/etc/pf.anchors/com.apple"
load anchor "coverall" from "/etc/pf.anchors/com.coverall"
Run: sudo pfctl -ef /etc/pf.conf
To startup port forwarding on boot:
cd /Library/LaunchDaemons
sudo curl -O https://gist.githubusercontent.com/eddanger/f67ce14f69c32bccfecc/raw/0c887ad24678241a6f1fb1855641bd63574fc80a/com.coverallcrew.firewall.plist
sudo launchctl load -w com.coverallcrew.firewall.plist