forked from benjie/mehserve
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.firewall.plist
24 lines (24 loc) · 891 Bytes
/
test.firewall.plist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?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>Disabled</key>
<false/>
<key>Label</key>
<string>meh.firewall</string>
<key>WorkingDirectory</key>
<string>/var/run</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>-c</string>
<string>
(echo "rdr pass proto tcp from any to any port 80 -> 127.0.0.1 port 12439"; echo "rdr pass proto tcp from any to any port 443 -> 127.0.0.1 port 12443") | pfctl -a "com.apple/250.ApplicationFirewall" -f - -E
</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>UserName</key>
<string>root</string>
</dict>
</plist>