├── change-tor-ip.service
├── change_tor_ip.sh
├── README.md
├── setup.sh
└── ip-changer.sh
/change-tor-ip.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Change Tor IP Address every 10 seconds
3 | After=network.target
4 |
5 | [Service]
6 | Type=simple
7 | ExecStart=/home/anil/change_tor_ip.sh
8 | Restart=always
9 | RestartSec=10
10 |
11 | [Install]
12 | WantedBy=multi-user.target
13 |
--------------------------------------------------------------------------------
/change_tor_ip.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Read auth cookie as hex string
4 | COOKIE=$(xxd -ps /var/run/tor/control.authcookie | tr -d '\n')
5 |
6 | # Send NEWNYM signal to Tor ControlPort using cookie authentication
7 | printf 'AUTHENTICATE %s\r\nSIGNAL NEWNYM\r\nQUIT\r\n' "$COOKIE" | nc 127.0.0.1 9051 > /dev/null
8 |
9 | # Store IP logs
10 | IP=$(curl -s --socks5-hostname 127.0.0.1:9050 https://check.torproject.org/api/ip | jq -r .IP)
11 | echo "$(date '+%Y-%m-%d %H:%M:%S') - New Tor IP: $IP" >> HOME/tor_ip_log.txt
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # IP Changer
2 |
3 | A simple and efficient tool to automatically change your IP address using Tor network at regular intervals.
4 |
5 |
6 |
7 | ## Features
8 |
9 | - 🔄 Automatic IP rotation at user-defined intervals
10 | - 🛡️ Uses Tor network for secure IP changes
11 | - 🚀 Works on multiple Linux distributions
12 | - ⚡ Easy installation and setup
13 | - ⌛️ Run without installation
14 |
15 | ## Supported Distributions
16 |
17 | - Arch Linux / Manjaro
18 | - Debian / Ubuntu
19 | - Kali Linux
20 | - Parrot OS
21 | - Fedora
22 | - OpenSUSE
23 |
24 | ## Prerequisites
25 |
26 | - Linux-based operating system
27 | - Sudo privileges
28 | - Internet connection
29 | - tor,curl,xxd,fq packages required
30 |
31 | ## Run without Installation
32 | 1. Clone the repository:
33 | ```bash
34 | git clone https://github.com/techchipnet/ip-changer.git
35 | cd ip-changer
36 | ```
37 |
38 | 2. Make the installation script executable:
39 | ```bash
40 | chmod +x ip-changer.sh
41 | ```
42 |
43 | 3. Run the installation script:
44 | ```bash
45 | sudo ./ip-changer.sh
46 | ```
47 |
48 | 4. Follow the on-screen instructions to set your desired IP change interval.
49 | ## Setup for service
50 |
51 | 1. Clone the repository:
52 | ```bash
53 | git clone https://github.com/techchipnet/ip-changer.git
54 | cd ip-changer
55 | ```
56 |
57 | 2. Make the installation script executable:
58 | ```bash
59 | chmod +x setup.sh
60 | ```
61 |
62 | 3. Run the installation script:
63 | ```bash
64 | ./setup.sh
65 | ```
66 |
67 | 4. Follow the on-screen instructions to set your desired IP change interval.
68 |
69 | ## Usage
70 |
71 | Once installed, the service will automatically start and run in the background. Your IP address will be changed at the interval you specified during installation.
72 |
73 | ### Checking Status
74 |
75 | To check if the service is running:
76 | ```bash
77 | systemctl status change-tor-ip.service
78 | ```
79 |
80 | ### Stopping the Service
81 |
82 | To stop the IP changer:
83 | ```bash
84 | sudo systemctl stop change-tor-ip.service
85 | ```
86 |
87 | ### Starting the Service
88 |
89 | To start the IP changer:
90 | ```bash
91 | sudo systemctl start change-tor-ip.service
92 | ```
93 |
94 | ### Changing the Interval
95 |
96 | To change the IP rotation interval:
97 | 1. Stop the service
98 | 2. Edit the `change-tor-ip.service` file
99 | 3. Restart the service
100 |
101 | ## Uninstallation
102 |
103 | To remove the IP Changer:
104 | ```bash
105 | sudo systemctl stop change-tor-ip.service
106 | sudo systemctl disable change-tor-ip.service
107 | sudo systemctl stop tor
108 | sudo systemctl disable tor
109 | sudo rm /etc/systemd/system/change-tor-ip.service
110 | sudo rm /home/$USER/change_tor_ip.sh
111 | ```
112 |
113 | ## Security Note
114 |
115 | This tool uses the Tor network to change your IP address. While Tor provides anonymity, please be aware that:
116 | - Some websites may block Tor exit nodes
117 | - Your connection speed may be affected
118 | - Always use HTTPS connections for sensitive data
119 |
120 | ## License
121 |
122 | This project is licensed under the MIT License.
123 |
124 | ### Video Demo
125 | [](https://www.youtube.com/watch?v=dcTlDILnrSY)
126 |
127 | ### For More Video subcribe TechChip YouTube Channel
128 |
--------------------------------------------------------------------------------
/setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | RED='\033[0;31m'
4 | GREEN='\033[0;32m'
5 | YELLOW='\033[1;33m'
6 | BLUE='\033[0;34m'
7 | NC='\033[0m'
8 |
9 | echo -e "${BLUE}"
10 | echo "TOR"
11 | echo " _____ _____ _____ _ "
12 | echo " |_ _| __ \ / ____| | "
13 | echo " | | | |__) | | | | |__ __ _ _ __ __ _ ___ _ __ "
14 | echo " | | | ___/ | | | _ \ / _ | _ \ / _ |/ _ \ __| "
15 | echo " _| |_| | | |____| | | | (_| | | | | (_| | __/ | "
16 | echo " |_____|_| \_____|_| |_|\__,_|_| |_|\__, |\___|_| "
17 | echo " __/ | "
18 | echo " |___/ V 1.0 "
19 | echo -e "${NC}"
20 | echo -e "${YELLOW}Author: TechChip. https://www.youtube.com/@techchipnet ${NC}"
21 | echo -e "${YELLOW}=========================================================${NC}\n"
22 |
23 | set -e
24 |
25 | if [ -f /etc/os-release ]; then
26 | . /etc/os-release
27 | DISTRO=$ID
28 | else
29 | echo -e "${RED}❌ Unsupported Linux distribution!${NC}"
30 | exit 1
31 | fi
32 |
33 | echo -e "${BLUE}[*] Detected Linux Distro: $DISTRO${NC}"
34 |
35 | echo -e "${BLUE}[*] Installing required packages...${NC}"
36 | case "$DISTRO" in
37 | arch|manjaro|blackarch)
38 | sudo pacman -Syu --noconfirm curl tor jq xxd
39 | TOR_GROUP="tor"
40 | ;;
41 | debian|ubuntu|kali|parrot)
42 | sudo apt update && sudo apt install -y curl tor jq xxd
43 | TOR_GROUP="debian-tor"
44 | ;;
45 | fedora)
46 | sudo dnf install -y curl tor jq xxd
47 | TOR_GROUP="tor"
48 | ;;
49 | opensuse*)
50 | sudo zypper install -y curl tor jq xxd
51 | TOR_GROUP="tor"
52 | ;;
53 | *)
54 | echo -e "${RED}❌ Unsupported distro. Please install curl, tor, jq, xxd manually.${NC}"
55 | exit 1
56 | ;;
57 | esac
58 |
59 | if ! getent group "$TOR_GROUP" >/dev/null; then
60 | echo -e "${BLUE}[*] Group '$TOR_GROUP' not found, creating it...${NC}"
61 | sudo groupadd "$TOR_GROUP"
62 | fi
63 |
64 | if ! groups "$USER" | grep -q " $TOR_GROUP"; then
65 | echo -e "${BLUE}[*] Adding user '$USER' to group '$TOR_GROUP'...${NC}"
66 | sudo usermod -aG "$TOR_GROUP" "$USER"
67 | else
68 | echo -e "${GREEN}[✓] User '$USER' is already a member of group '$TOR_GROUP'.${NC}"
69 | fi
70 |
71 | echo -e "${BLUE}[*] Configuring Tor...${NC}"
72 | TORRC_FILE="/etc/tor/torrc"
73 | NEEDS_UPDATE=0
74 |
75 | grep -q "^ControlPort 9051" "$TORRC_FILE" || NEEDS_UPDATE=1
76 | grep -q "^CookieAuthentication 1" "$TORRC_FILE" || NEEDS_UPDATE=1
77 | grep -q "^CookieAuthFileGroupReadable 1" "$TORRC_FILE" || NEEDS_UPDATE=1
78 |
79 | if [ "$NEEDS_UPDATE" -eq 1 ]; then
80 | echo -e "${BLUE}[*] Updating torrc with required ControlPort settings...${NC}"
81 | {
82 | echo ""
83 | echo "# Added by change-tor-ip automation script"
84 | echo "ControlPort 9051"
85 | echo "CookieAuthentication 1"
86 | echo "CookieAuthFileGroupReadable 1"
87 | } | sudo tee -a "$TORRC_FILE" > /dev/null
88 | sudo systemctl restart tor
89 | else
90 | echo -e "${GREEN}[✓] torrc already configured correctly. Skipping update.${NC}"
91 | fi
92 |
93 | read -p "Enter Tor IP change interval (seconds, default 10): " TIME_INTERVAL
94 | TIME_INTERVAL=${TIME_INTERVAL:-10}
95 |
96 | echo -e "${BLUE}[*] Setting up systemd service with interval: $TIME_INTERVAL sec...${NC}"
97 | sed -i "s/RestartSec=.*/RestartSec=$TIME_INTERVAL/" change-tor-ip.service
98 |
99 | echo -e "${BLUE}[*] Deploying files...${NC}"
100 | INSTALL_DIR="/home/$USER"
101 | sudo cp change_tor_ip.sh "$INSTALL_DIR/"
102 | sed -i "s#HOME#$INSTALL_DIR#g" "$INSTALL_DIR/change_tor_ip.sh"
103 | sudo chmod +x "$INSTALL_DIR/change_tor_ip.sh"
104 | sed -i "s|^ExecStart=.*|ExecStart=${INSTALL_DIR}/change_tor_ip.sh|" change-tor-ip.service
105 | sudo cp change-tor-ip.service /etc/systemd/system/
106 |
107 | echo -e "${BLUE}[*] Enabling and starting service...${NC}"
108 | sudo systemctl daemon-reload
109 | sudo systemctl enable --now change-tor-ip.service
110 | sudo systemctl enable --now tor.service
111 | echo -e "${GREEN}[✔] Deployment complete! Tor IP will change every $TIME_INTERVAL seconds.${NC}"
112 |
--------------------------------------------------------------------------------
/ip-changer.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | RED='\033[0;31m'
4 | GREEN='\033[0;32m'
5 | YELLOW='\033[1;33m'
6 | BLUE='\033[0;34m'
7 | NC='\033[0m'
8 |
9 | echo -e "${BLUE}"
10 | echo "TOR"
11 | echo " _____ _____ _____ _ "
12 | echo " |_ _| __ \\ / ____| | "
13 | echo " | | | |__) | | | | |__ __ _ _ __ __ _ ___ _ __ "
14 | echo " | | | ___/ | | | _ \\ / _\` | '_ \\ / _\` |/ _ \\ '__| "
15 | echo " _| |_| | | |____| | | | (_| | | | | (_| | __/ | "
16 | echo " |_____|_| \\_____|_| |_|\\__,_|_| |_|\\__, |\\___|_| "
17 | echo " __/ | "
18 | echo " |___/ V 1.0 "
19 | echo -e "${NC}"
20 | echo -e "${YELLOW}Author: TechChip. https://www.youtube.com/@techchipnet ${NC}"
21 | echo -e "${YELLOW}=========================================================${NC}\n"
22 |
23 | set -e
24 | [[ "$UID" -ne 0 ]] && {
25 | echo -e "${RED}❌ Please run this script as root.${NC}"
26 | exit 1
27 | }
28 |
29 | setup() {
30 | if [ -f /etc/os-release ]; then
31 | . /etc/os-release
32 | DISTRO=$ID
33 | else
34 | echo -e "${RED}❌ Unsupported Linux distribution!${NC}"
35 | exit 1
36 | fi
37 |
38 | echo -e "${BLUE}[*] Detected Linux Distro: $DISTRO${NC}"
39 |
40 | echo -e "${BLUE}[*] Installing required packages (if not already installed)...${NC}"
41 | case "$DISTRO" in
42 | arch|manjaro|blackarch)
43 | sudo pacman -S --needed --noconfirm curl tor jq xxd
44 | TOR_GROUP="tor"
45 | ;;
46 | debian|ubuntu|kali|parrot)
47 | sudo apt update
48 | sudo apt install -y curl tor jq xxd
49 | TOR_GROUP="debian-tor"
50 | ;;
51 | fedora)
52 | sudo dnf install -y curl tor jq xxd
53 | TOR_GROUP="tor"
54 | ;;
55 | opensuse*)
56 | sudo zypper install -y curl tor jq xxd
57 | TOR_GROUP="tor"
58 | ;;
59 | *)
60 | echo -e "${RED}❌ Unsupported distro. Please install curl, tor, jq, xxd manually.${NC}"
61 | exit 1
62 | ;;
63 | esac
64 |
65 | if ! getent group "$TOR_GROUP" >/dev/null; then
66 | echo -e "${BLUE}[*] Group '$TOR_GROUP' not found, creating it...${NC}"
67 | sudo groupadd "$TOR_GROUP"
68 | fi
69 |
70 | if ! groups "$USER" | grep -q " $TOR_GROUP"; then
71 | echo -e "${BLUE}[*] Adding user '$USER' to group '$TOR_GROUP'...${NC}"
72 | sudo usermod -aG "$TOR_GROUP" "$USER"
73 | else
74 | echo -e "${GREEN}[✓] User '$USER' is already a member of group '$TOR_GROUP'.${NC}"
75 | fi
76 |
77 |
78 | echo -e "${BLUE}[*] Configuring Tor...${NC}"
79 | TORRC_FILE="/etc/tor/torrc"
80 | NEEDS_UPDATE=0
81 |
82 | grep -q "^ControlPort 9051" "$TORRC_FILE" || NEEDS_UPDATE=1
83 | grep -q "^CookieAuthentication 1" "$TORRC_FILE" || NEEDS_UPDATE=1
84 | grep -q "^CookieAuthFileGroupReadable 1" "$TORRC_FILE" || NEEDS_UPDATE=1
85 |
86 | if [ "$NEEDS_UPDATE" -eq 1 ]; then
87 | echo -e "${BLUE}[*] Updating torrc with required ControlPort settings...${NC}"
88 | {
89 | echo ""
90 | echo "# Added by change-tor-ip automation script"
91 | echo "ControlPort 9051"
92 | echo "CookieAuthentication 1"
93 | echo "CookieAuthFileGroupReadable 1"
94 | } | sudo tee -a "$TORRC_FILE" > /dev/null
95 | sudo systemctl restart tor
96 | else
97 | echo -e "${GREEN}[✓] torrc already configured correctly. Skipping update.${NC}"
98 | fi
99 | }
100 |
101 | ipchanger() {
102 | COOKIE=$(xxd -ps /var/run/tor/control.authcookie | tr -d '\n')
103 |
104 | printf 'AUTHENTICATE %s\r\nSIGNAL NEWNYM\r\nQUIT\r\n' "$COOKIE" | nc 127.0.0.1 9051 > /dev/null
105 |
106 | IP=$(curl -s --socks5-hostname 127.0.0.1:9050 https://check.torproject.org/api/ip | jq -r .IP)
107 | echo "$(date '+%Y-%m-%d %H:%M:%S') - New Tor IP: $IP"
108 | }
109 |
110 | setup
111 |
112 | read -p "Enter Tor IP change interval in seconds (default 10): " TIME_INTERVAL
113 | TIME_INTERVAL=${TIME_INTERVAL:-10}
114 |
115 | echo -e "${GREEN}[*] Starting Tor IP changer every $TIME_INTERVAL seconds...${NC}"
116 |
117 | while true; do
118 | ipchanger
119 | sleep "$TIME_INTERVAL"
120 | done
121 |
--------------------------------------------------------------------------------