A modular bash script for network anonymization that allows you to:
- 🔄 Automatically change your MAC address
- 🌍 Rotate your IP address
- 🧅 Route your traffic through TOR network
- ⏱️ Set custom intervals for changes
- 🔒 Enhanced privacy and security features
- MAC Address Randomization: Generate and apply random MAC addresses
- IP Address Rotation: Request new IP addresses via DHCP
- TOR Integration: Route traffic through TOR network
- Modular Design: Use any combination of features
- Automatic Mode: Set and forget with customizable intervals
- Clean Shutdown: Proper cleanup of all changes
- Status Monitoring: Track your current IP and changes
- Debian/Ubuntu-based Linux distribution
- Root privileges (sudo)
- Active network interface (WiFi or Ethernet)
- Internet connection
# Install all required packages
sudo apt update && sudo apt install -y \
tor \
curl \
dhclient \
iptables \
net-tools \
iproute2
- Clone the repository:
git clone https://github.com/yourusername/AnonIP.git
cd AnonIP
- Make the script executable:
chmod +x AnonIP.sh
- Verify dependencies:
./AnonIP.sh --help
# Start with all features (MAC, IP, and TOR)
sudo ./AnonIP.sh -m -p -T -i wlan0
# Only use TOR
sudo ./AnonIP.sh -T
# Change MAC and IP every hour
sudo ./AnonIP.sh -m -p -t 3600
# Change only MAC address
sudo ./AnonIP.sh -m -i wlan0
Option | Long Option | Description |
---|---|---|
-h |
--help |
Show help message |
-i |
--interface |
Specify network interface (e.g., wlan0) |
-t |
--time |
Set interval in seconds between changes |
-m |
--mac |
Enable MAC address randomization |
-p |
--ip |
Enable IP address rotation |
-T |
--tor |
Enable TOR routing |
-s |
--switch-tor |
Switch TOR exit node |
-x |
--stop |
Stop all services and restore configuration |
- Maximum Privacy Setup:
sudo ./AnonIP.sh -i wlan0 -m -p -T -t 600
This will:
- Use interface wlan0
- Change MAC address every 10 minutes
- Rotate IP address every 10 minutes
- Route traffic through TOR
- Switch TOR exit node every 10 minutes
- Quick TOR Switch:
sudo ./AnonIP.sh -s
This will only switch the TOR exit node.
- Stop All Services:
sudo ./AnonIP.sh -x
This will stop all anonymization services and restore original network configuration.
- This script modifies system network configuration. Use with caution.
- TOR routing may significantly reduce your internet speed.
- Some services might not work properly when routing through TOR.
- MAC address changes might not work on all network interfaces.
- Script must run as root, verify the code before running.
-
MAC Randomization:
- Generates random MAC addresses following IEEE standards
- Applies changes using
ip link
commands
-
IP Rotation:
- Releases current DHCP lease
- Requests new IP address from DHCP server
-
TOR Integration:
- Configures local TOR service
- Sets up transparent proxy
- Modifies DNS resolution
- Configures iptables for routing
-
"Must be run as root" error:
sudo ./AnonIP.sh [options]
-
Interface not found:
- Check available interfaces:
ip link show
-
TOR service fails to start:
- Check TOR service status:
systemctl status tor
-
No internet after running script:
- Stop all services and restore configuration:
sudo ./AnonIP.sh -x
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is provided for educational and research purposes only. Users are responsible for complying with all applicable laws and regulations in their jurisdiction.
- TOR Project for their amazing privacy tool
- Inspiration from various privacy-focused projects
- Community feedback and contributions
Made with ❤️ for the privacy-conscious community