When you use Tor to browse the web, your connection to the site is passed through random IP addresses based in any number of countries. This is great for keeping your real location private, but unhelpful if you want to visit a website that only allows connections from a particular country. If you want the sites you browse to think you're connecting from a certain location, you can add custom entry and exit nodes to your configuration file. It's a better idea to use a VPN to fake your location, but Tor will work if you don't have one. This wikiHow teaches you how to set custom exit and entry nodes in the Tor web browser using Windows, macOS, and Linux.
Using Tor to Change Your Location
- Open the “torrc” file in a text editor.
- Type in EntryNodes {} StrictNodes 1 below the last line of text.
- Add ExitNodes {} StrictNodes 1 onto the following line.
- Enter your country’s entry and exit codes into the blank {}.
- Click save and exit, then open Tor when you visit a website.
Steps
-
Open Tor at least once. You'll need to run Tor at least once to create the file you'll be editing. Just double-click the Start Tor browser icon in the folder where you've installed Tor and click Connect at least one time.
- If you've already started Tor, close it—you'll need to make sure the app is closed so you can effectively edit the configuration file. [1] X Research source
- Keep in mind that not all sites and regions permit traffic from Tor, so you may not be able to access all websites using the browser.
-
Open the Tor folder. If you're using Windows or Linux , the location varies depending on where you installed the app. On Linux you may try to use commands locate torrc and find / torrc . If you're using a Mac, you'll actually need to open a different folder:
- Windows and Linux: The default install location for Tor is the desktop on both operating systems. [2] X Research source Double-click the Tor Browser folder to open it.
- Mac: Open Finder, press Command + Shift + G , and enter or paste this address into the field: ~/Library/Application Support/TorBrowser-Data . [3] X Research source Click Go to open the folder.
Advertisement -
Navigate to the "torrc" file. This is the configuration file you'll need to edit. To find it:
- Windows and Linux: Double-click the Browser folder, double-click the TorBrowser folder, double-click the Data folder, and then double-click the Tor folder. [4] X Research source
- Mac: Just double-click the Tor folder.
-
Open the file called torrc in a text editor. To do this, double-click the file. If it doesn't automatically open a text editor, you'll be prompted to choose one (e.g., Notepad for Windows or TextEdit for macOS).
-
Add the
EntryNodes
line. Place your cursor below the last line of text in the document, then type in EntryNodes {} StrictNodes 1 and press Enter or Return to go to the next line.Doing this step may not be necessary if all you want to do is set a specific exit node, the one whose IP address will be shown to the services you connect to.
-
Add the
ExitNodes
line. Type inExitNodes {} StrictNodes 1
onto the next line. -
Find your entry and exit country codes. Go to https://www.iso.org/obp/ui/#search in your web browser and write down the 2-digit code for the country you're pretending to be in. You can add multiple countries if you'd like. [5] X Research source
- For example, if you want your Tor browsing session to start in Canada and exit in Egypt, you would look for the "Canada" country code (ca) and the "Egypt" country code (eg).
- Not all countries have Tor entry and exit nodes. After finding a code, go to https://metrics.torproject.org/rs.html , type country:eg (replace eg with the country code you want to look up), and click Search to find out if Tor has any relays there.
-
Enter your entry and exit country codes. Type the code for the country in which you want your session to start in between the {} curly brackets to the right of the "EntryNodes" line, and then repeat with the exit country and the "ExitNodes" line. For example, to enter in Canada and exit in Egypt, your lines might look like this:
-
EntryNodes {ca} StrictNodes 1
-
ExitNodes {eg} StrictNodes 1
-
-
Consider disabling strict nodes. The "StrictNodes 1" value means that Tor will not try to use countries other than those you've specified. However, it also means that if no nodes are available in the regions you entered, you won't be able to make the connection. You can replace
StrictNodes 1
withStrictNodes 0
to ensure that Tor can still use other countries' codes if those specified aren't working. -
Add multiple country options to a strict node. If you do want to keep strict nodes enabled for your entry and/or exit nodes, consider adding multiple countries rather than just using one country. You can add countries by adding more country codes inside of brackets, making sure to separate them with commas. For example, to add Canada, Egypt, and Turkey to the "ExitNodes" line, you would have the following line:
-
ExitNodes {ca},{eg},{tr} StrictNodes 1
- Make sure there are no spaces between bracketed countries.
-
-
Save and exit the file. If you're using Windows or macOS, just click File , select Save , and exit the app. Saving the file in Linux depends on which text editor you're using. If you're using a graphical text editor, you can usually just press Ctrl + S to save.
-
Open Tor and visit a website. Go to any website (e.g., https://www.wikihow.com/) in Tor, and then click the padlock icon on the address bar at the top of the browser. Now you'll see the entry node, the middle nodes, and the exit node, which should match what you entered into the file.
Community Q&A
-
QuestionWhat about Linux?Community AnswerEdit /etc/tor/torrc.
-
QuestionHow do I make the last IP in the node be from a specific country?Community AnswerOpen the folder where you have installed Tor, browse through browser > Tor browser > Tor > data. There you will find a file named "torrc." Open the file with Notepad. At the end of the document, on a new line, write this: ExitNodes {US}. For example, if you want your exit node to be in China, type {CN}.
-
QuestionHow do I make Tor select a specific state in a country, like California?Community AnswerYou cannot. You can only select a specific country.
Tips
- While changing the exit and entry nodes to specific regions can effectively make certain websites show you content it wouldn't otherwise, it can prevent Tor from effectively protecting your anonymity. [6] X Research source If you're just watching videos this may not concern you. However, if you really need to stay anonymous, Tor recommends using their default settings.Thanks
- If you're having trouble connecting to websites, click the hamburger menu in the upper-right corner of Tor and select New Tor circuit for this site .Thanks
- If an exit or entry node is not accepting connections on the port you're using (for example, port 443 if you're connecting to a secure website), you won't be able to connect to that site.Thanks
References
- ↑ https://support.torproject.org/tbb/tbb-editing-torrc/
- ↑ https://tb-manual.torproject.org/uninstalling/
- ↑ https://communitydocs.accessnow.org/147-Tor_force_exit_nodes.html
- ↑ https://www.shellhacks.com/tor-browser-change-country-ip-address/
- ↑ https://www.shellhacks.com/tor-browser-change-country-ip-address/
- ↑ https://2019.www.torproject.org/docs/faq.html.en#ChooseEntryExit
About This Article
1. Open Tor at least once and then close it.
2. Open the "torrc" file in a text editor.
3. Add the code to specify specific countries.
4. Save the file and restart Tor.