This document describes the macOS-specific features and setup for EvilLimiter.
EvilLimiter has been updated to support macOS alongside Linux. The macOS implementation uses:
- pfctl (Packet Filter) for firewall rules and traffic blocking
- dummynet via dnctl for bandwidth limiting
- sysctl for IP forwarding configuration
- Standard networking libraries (netifaces, scapy) for interface detection and packet manipulation
- macOS 10.15 (Catalina) or later
- Python 3.7 or later
- Administrator/root privileges
- Xcode Command Line Tools (for development)
-
Install python, pip & dependencies:
brew install python pipx pipx ensurepath
-
Install the package:
Clone the repo then:
cd evillimiter pipx install .
- Uses dummynet pipes instead of Linux traffic control (tc)
- Configured via
dnctlcommand - Integrates with pfctl for packet classification
- Uses pfctl instead of iptables
- Rules are dynamically generated and loaded from temporary files
- Supports both blocking and bandwidth limiting rules
- Compatible with macOS network interface naming (en0, en1, etc.)
- Uses netifaces library for cross-platform interface detection
- Supports both Intel and Apple Silicon Macs
The usage is identical to the Linux version:
# Run with administrator privileges
sudo evillimiter
# Or with specific interface
sudo evillimiter -i en0| Feature | Linux | macOS |
|---|---|---|
| Traffic Control | tc (htb qdisc) | dummynet pipes |
| Firewall | iptables | pfctl |
| IP Forwarding | net.ipv4.ip_forward | net.inet.ip.forwarding |
| Interface Names | eth0, wlan0 | en0, en1 |
-
"Missing util" errors:
- Ensure you're running on a supported macOS version
- Check that system utilities are in standard locations (/usr/bin, /sbin, etc.)
-
Permission denied:
- EvilLimiter requires root privileges on macOS
- Run with
sudo
-
pfctl errors:
- Disable any other firewall software
- Check that pfctl is not already in use by other applications
-
Network interface not found:
- Use
ifconfigto list available interfaces - Specify the interface manually with
-iflag
- Use
Run the test script to verify macOS compatibility:
python3 test_macos.py- pfctl rules are temporary and removed when the application exits
- IP forwarding is restored to original state on cleanup
- Temporary rule files are securely created and cleaned up
EvilLimiter supports both:
- Intel Macs (x86_64)
- Apple Silicon Macs (arm64)
The implementation automatically detects the architecture and uses appropriate system paths.
- System Integrity Protection (SIP): Some operations may be restricted on systems with SIP enabled
- Network Extensions: macOS network extensions may interfere with packet manipulation
- Sandboxing: The application must run outside of App Store sandbox restrictions
For developers working on macOS support:
- Main platform detection in
evillimiter/common/globals.py - macOS-specific limiter in
evillimiter/networking/limit_macos.py - Cross-platform utilities in
evillimiter/networking/utils.py - Shell execution handling in
evillimiter/console/shell.py