Forked from rootindex/--Library--LaunchDaemons--co.echo.httpdfwd.plist
Created
July 10, 2023 08:35
-
-
Save peschee/e56f32a3d718c461d9566b01ffa9561a to your computer and use it in GitHub Desktop.
Making macos on boot redirect port 80 to 8080 and 443 to 8443 on all interfaces permanently, -- = /
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080 | |
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>co.echo.httpdfwd</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>sh</string> | |
<string>-c</string> | |
<string>cat /etc/pf.anchors/dev | sudo pfctl -ef - && sysctl -w net.inet.ip.forwarding=1</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>UserName</key> | |
<string>root</string> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment