GhostIP is an automated tool to rotate your IP and MAC address on Linux systems, useful for penetration testing, anonymization, or bypassing IP-based rate limits.
- Auto-detect active network interface: No need to specify manually, the script finds the active one.
- Random MAC address & IP rotation: Prevent tracking by changing MAC and requesting a new DHCP lease.
- Public IP & Geolocation Check: Uses ipinfo.io to display old vs new public IP and location.
- Stealth Mode: Logs silently without printing to the terminal (for background usage).
- Color-coded Logs:
INFO
(green) andWARNING
(red) messages for better visibility. - CGNAT Detection: Warns you if your public IP does not change (common with mobile carriers).
- Installer & Auto-Updater: Easy install/uninstall and update from GitHub repository.
- Skip Public Check Option: Faster rotation when public IP check is not needed.
ghostip/
├── ghostIp.sh # Main script for IP & MAC rotation
├── installer.sh # Installer, uninstaller, and updater script
├── version.txt # Holds the latest version number
├── README.md # Documentation (this file)
└── LICENSE # License file (MIT recommended)
- Clone the repository:
git clone https://github.com/xRiot45/GhostIp.git
cd GhostIp
- Make scripts executable:
chmod +x ghostIp.sh installer.sh
- Run the installer:
sudo ./installer.sh
- Follow menu options to install GhostIP.
After installation, you can run GhostIP directly:
sudo ghostIp.sh no 10 1 5
Stealth mode
:yes
orno
Maximum rotations
:0
= infinite loopMinimum delay
: in secondsMaximum delay
: in seconds
Example:
sudo ghostIp.sh no 5 2 5
This will rotate IP and MAC 5 times with random delay between 2–5 seconds.
--skip-public-check
: Skips public IP and geolocation check (faster rotation).--force-interface <iface>
: Force specific interface (e.g.,--force-interface wlan0
).--no-mac-change
: Only rotates IP without changing MAC.--log-to-file-only
: Suppress console output, log to file only.
To check and apply updates from the repository:
sudo ./installer.sh
Choose option 3) Update GhostIP
.
The script compares your local version.txt
with the remote version in the repository and updates automatically.
Run the installer and choose uninstall option:
sudo ./installer.sh
Select 2) Uninstall GhostIP
to remove all files and logs.
Logs are stored in:
/usr/local/bin/ghostIp.log
Color codes:
- INFO (green): Normal operations
- WARNING (red): Issues like failed IP change or no internet
[2025-08-03 16:10:05] [INFO] Disconnecting interface wlxec086b18f384...
[2025-08-03 16:10:05] [INFO] Changing MAC Address to 02:1E:A3:CA:AD:35
[2025-08-03 16:10:05] [INFO] Releasing old IP...
[2025-08-03 16:10:05] [INFO] Requesting new IP...
[2025-08-03 16:10:12] [INFO] Local IP: 192.168.18.126 (MAC: 02:1E:A3:CA:AD:35)
[2025-08-03 16:10:12] [INFO] Old Public IP: 118.99.64.211 (Pontianak, ID)
[2025-08-03 16:10:12] [INFO] New Public IP: 118.99.64.211 [NO CHANGE]
[2025-08-03 16:10:12] [WARNING] Detected possible CGNAT: Public IP hasn't changed.
[2025-08-03 16:10:12] [INFO] Waiting 3 seconds before next rotation...
- Linux (Debian, Ubuntu, Kali recommended)
- Packages:
curl
,jq
,iproute2
The installer automatically checks and installs missing dependencies.
-
If public IP does not change, your ISP may be using CGNAT. In this case, use VPN or TOR mode in future releases.
-
Ensure you run the script as root:
sudo ghostIp.sh no 10 1 5
-
Check network interface with:
ip a
-
Use
--force-interface
if auto-detection fails:sudo ghostIp.sh no 10 1 5 --force-interface wlo1
MIT License (see LICENSE file for details).