Page 1 of 1

Random Ip Adress Per 5 Min Using Tor In Linux

Posted: Sun Jul 28, 2024 3:20 pm
by vengeance
1. Installing Tor:

Code: Select all

sudo apt-get install tor

2. Configuring Tor:
Edit the Tor configuration file /etc/tor/torrc by running the following command:

Code: Select all

sudo nano /etc/tor/torrc
Add the following lines to the end of the file:

Code: Select all

ExitPolicy reject *:25
HiddenServiceDir /var/lib/tor/hiddenservice
HiddenServicePort 80 127.0.0.1:80
Save the changes.

3. Restarting Tor:

Code: Select all

sudo service tor restart

4. Creating a hidden service:

Code: Select all

sudo nano /var/lib/tor/hiddenservice/hosts
Add the following lines to the end of the file:

Code: Select all

127.0.0.1 localhost
::1 localhost
Save the changes.

5. Starting the hidden service:

Code: Select all

sudo service tor restart

6. Connecting to the hidden service:
To connect to the hidden service, run the following command:

Code: Select all

torsocks -p 80 http://localhost
This will start a Tor SOCKS proxy on port 80 and connect to the hidden service.

7. Randomizing IP addresses:
To randomize your IP address every 5 minutes, you can use the ipchanger tool. First, install it by running the following command:

Code: Select all

sudo apt-get install ipchanger
Then, add the following line to your crontab by running the following command:

Code: Select all

crontab -e
And then add the following line:

Code: Select all

*/5 * * * * /usr/bin/ipchanger -d 5
Save the changes.

8. Verifying the changes:
To verify that your IP address is being randomized every 5 minutes, you can use the following command:

Code: Select all

ip addr show
This will display your current IP address. You can run this command every 5 minutes to see if your IP address has changed.