PDF download Download Article PDF download Download Article

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

  1. Open the “torrc” file in a text editor.
  2. Type in EntryNodes {} StrictNodes 1 below the last line of text.
  3. Add ExitNodes {} StrictNodes 1 onto the following line.
  4. Enter your country’s entry and exit codes into the blank {}.
  5. Click save and exit, then open Tor when you visit a website.
  1. 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]
    • 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.
  2. 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] 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] Click Go to open the folder.
    Advertisement
  3. 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]
    • Mac: Just double-click the Tor folder.
  4. 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).
  5. 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.

  6. Type in ExitNodes {} StrictNodes 1 onto the next line.
  7. 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]
    • 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.
  8. 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
  9. 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 with StrictNodes 0 to ensure that Tor can still use other countries' codes if those specified aren't working.
  10. 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.
  11. 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.
  12. 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.
  13. Advertisement

Community Q&A

Search
Add New Question
  • Question
    What about Linux?
    Community Answer
    Edit /etc/tor/torrc.
  • Question
    How do I make the last IP in the node be from a specific country?
    Community Answer
    Open 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}.
  • Question
    How do I make Tor select a specific state in a country, like California?
    Community Answer
    You cannot. You can only select a specific country.
See more answers
Ask a Question
      Advertisement

      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] 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.
      • 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 .
      • 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.
      Show More Tips
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!
      Advertisement

      About This Article

      Article Summary X

      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.

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 1,135,264 times.

      Is this article up to date?

      Advertisement