I am running OS X 10.10 Yosemite, and I am looking for a way to limit upload bandwidth specifically on TCP port 8333, so I can run Bitcoin Core to contribute outgoing bandwidth without completely saturating my connection.
Here is a list of utilities I have looked into:
ipfw - This has been deprecated since OS X 10.7, and has been removed in OSX 10.10. Unfortunately this also means that any ipfw GUIs are out too (Waterroof, Speedlimit, Noobproof, etc).
Network Link Conditioner - This allows bandwidth limiting on Yosemite, but only on a system-wide level. I’m looking for a solution that will limit bandwidth only on a specific port, or only for a specific app, so my entire system won’t be affected by the limit.
pfctl - This is the new tool that replaces ipfw in Yosemite, but there is a lot less help available online, especially on limiting port/application bandwidth.
dnctl - There is almost no documentation available for this online, but it seems like it may be able to do the job if configured properly. It has been mentioned before in this Stack Overflow question, but the answer doesn't provide any examples on how to use/configure dnctl to limit bandwidth.
In short, I am looking for a way to limit bandwidth of a specific application/port on OS X 10.10 Yosemite. Does anything like this exist? And if so, how can I use it to limit outgoing traffic for a specific app, or on TCP port 8333?
Here is what I've tried with pfctl and dnctl:
Maximillians-MacBook:~ Max$ sudo pfctl -E
Password:
No ALTQ support in kernel
ALTQ related functions disabled
pf enabled
Token : 1626248500898813477
Maximillians-MacBook:~ Max$ (cat /etc/pf.conf && echo "dummynet-anchor \"customRule\"" && echo "anchor \"customRule\"") | sudo pfctl -f -
pfctl: Use of -f option, could result in flushing of rules
present in the main ruleset added by the system at startup.
See /etc/pf.conf for further details.
No ALTQ support in kernel
ALTQ related functions disabled
Maximillians-MacBook:~ Max$ echo "dummynet in quick proto tcp from any to any port 8333 pipe 1" | sudo pfctl -a customRule -f -
pfctl: Use of -f option, could result in flushing of rules
present in the main ruleset added by the system at startup.
See /etc/pf.conf for further details.
No ALTQ support in kernel
ALTQ related functions disabled
Maximillians-MacBook:~ Max$ sudo dnctl pipe 1 config bw 10Kbit/s
Maximillians-MacBook:~ Max$
Unfortunately I'm still getting over 1Mbit/s chugging through my connection on port 8333.
echo "dummynet out on bridge100 proto tcp from any to any allow-opts pipe 4243" | sudo pfctl -a "customRule" -f -
but this does not:echo "dummynet out on bridge100 proto tcp from any to any port 80 allow-opts pipe 4243" | sudo pfctl -a "customRule" -f -