Last active
March 5, 2016 09:43
-
-
Save beeftornado/8051952 to your computer and use it in GitHub Desktop.
Limiting time machine bandwidth on my OSX Mavericks machine
This file contains 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
# Step 1: Creates a pipe that only allows up to 1MB/s to go through. | |
pipe 1 config bw 1MByte/s | |
# Step 2: Add the pipe to uploads on port 548 (Standard AFP port, aka Time Machine) | |
add 1 pipe 1 dst-port 548 |
This file contains 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 Computer//DTD PLIST | |
1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.beeftornado.ipfw</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/ipfwstartup.sh</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>UserName</key> | |
<string>root</string> | |
<key>GroupName</key> | |
<string>wheel</string> | |
<key>ServiceDescription</key> | |
<string>IPFW filter settings</string> | |
<key>StandardErrorPath</key> | |
<string>/var/log/ipfw.log</string> | |
<key>StandardOutPath</key> | |
<string>/var/log/ipfw.log</string> | |
</dict> | |
</plist> |
This file contains 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
#!/bin/sh | |
# Startup script for ipfw on Mac OS X | |
# Flush existing rules | |
/sbin/ipfw -f -q flush | |
# Silently drop unsolicited connections | |
/usr/sbin/sysctl -w net.inet.tcp.blackhole=2 | |
/usr/sbin/sysctl -w net.inet.udp.blackhole=1 | |
# Load the firewall ruleset | |
/sbin/ipfw -q /etc/ipfw.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment