How to change the first country in tor. Browser Tor, how to select an IP of a certain country, how to ban an IP of a certain country. Should Tor be used for illegal purposes or should such use be encouraged?

class="eliadunit">

Tor browser– a program for anonymous browsing of pages on the Internet. While on the Internet, this browser replaces the real IP address with another address specific to another country and region. According to experienced observations, the country is selected randomly when starting Tor again, as well as after some time while in it. In most cases, selecting a specific country is not necessary, but there are times when it simply cannot be avoided. For example, you need to access a resource from a Russian-speaking country, or a domain that is accessible to a specific country.

In such cases, there is a solution. After downloading and installing Tor (if this has not already been done), go to the addressTorBrowser\ Browser\ TorBrowser\ Data\ Tor and find the file torrc.

To access the Internet from a specific country or to prohibit specifying the IP address of one or more countries, the following text should be inserted and replaced into this document.

class="eliadunit">

# If non-zero, try to write to disk less frequently than we would otherwise.
AvoidDiskWrites 1
# Store working data, state, keys, and caches here.
DataDirectory.\Data\Tor
GeoIPFile .\Data\Tor\geoip
# Where to send logging messages. Format is minSeverity[-maxSeverity]
# (stderr|stdout|syslog|file FILENAME).
Log notice stdout
# Bind to this address to listen to connections from SOCKS-speaking
#applications.
SocksListenAddress 127.0.0.1
SocksPort 9150
ControlPort 9151
ExitNodes
StrictExitNodes 1
ExitNodes (ua),(md), (az), (am), (ge), (kz), (kg), (ly), (lt), (tm), (uz), (ee).
StrictExitNodes(),().

Lines that will need to be edited individually: ExitNodes And StrictExitNodes.

ExitNodes(“entry nodes”) – indicates from which countries entry is allowed.

StrictExitNodes(“exact entry nodes”) – a parameter that prohibits entry from the specified country.

In the above example, countries with Russian-speaking populations are printed, with the exception of Belarus and Russia. Countries must be indicated in parentheses, separated by commas. Country designations are indicated in the standard ISO 3166-1 alpha-2 (https://ru.wikipedia.org/wiki/ISO_3166-1), country domains are also written in the same standard. Now let's look a little at the examples. To prohibit the connection of Tor with Russian parameters, you need to go to the drain StrictExitNodes add { ru}. With these parameters, Tor will connect with the parameters of any country except Russia. If you need to log in only from Russia, then you should indicate { ru} after ExitNodes.

Something to remember! After updates, reinstallation, Tor browser file torrс change to standard. Therefore, we copy it to a separate place before updating or go to this site again website and copy new code for this file.

This guide will teach you everything you need to know about using Tor country codes to spoof your location on Windows, Mac or Linux.


Tor is one of the most important tools for surfing the Internet anonymously. While its default configuration is great for hiding your web activity, you'll have to make some changes if you want your data to pass through nodes in certain countries. This article will show you How to change Tor country codes on Windows, Mac and Linux.

Fortunately, this is not difficult to do. By the end of this guide, you will be able to send web traffic from Albania to Zambia without leaving your home.

Why you might need to change your country code in Tor?

When you run in normal mode, your web traffic enters the network at a random node, hops through many different relays, and leaves from a randomly selected end node to its destination. This process helps hide where the data comes from, giving internet users anonymity.

Good, but there are also situations where users want their data to travel through specific places. Some people want to fake their identity or location, which is where their data originates from.

For example, an activist in Guatemala might want their internet traffic to appear as if it was coming from someone living in Belgium to protect themselves and hide from the authorities. Likewise, a Cuban artist may pose as a New Zealander to circumvent certain government restrictions.

Changing country codes allows people in such situations to select the specific countries through which they want their data to be transferred. It's also absolutely no hassle to change settings, meaning anyone with an internet connection can do it.

Disadvantages of Using Tor Country Codes

If you target very specific countries, especially those that don't have a large number of Tor nodes, you may not be able to connect successfully. If you do succeed, the connection may be unstable and difficult to use. As a rule, The more you limit your selection of nodes, the worse your connection will be.

Which is better? Tor or VPN country codes to spoof your location

Changing Tor country codes can be in a great way spoofing your location, but this is not the only or most appropriate method in many situations. VPNs can be much more effective for many different use cases.

If your priority is , and you don't want to trust a third party such as a VPN provider, then Tor might be the best option for geo-spoofing. All this is certainly free, but it is usually quite slow, and it good choice for activism and related use cases.

If you want to spoof your location so you can, for example, watch location-restricted Netflix or something similar, you should instead of the Tor network. The first reason is practical - your connection will be much faster through a reliable VPN.

The other main problem is that the Tor network is an important tool for many activists, dissidents and other people who need the anonymity provided by Tor for their own safety. Tor is already under a lot of stress because there aren't enough nodes for the number of people who want to use it.

Many would consider it unethical if you put even more strain on an already strained network just so you can watch Game of Thrones. If that's the only reason you want to spoof your location, your best bet is to get a VPN.

How to change your country code in Tor on Windows, Mac or Linux

The process for changing your country codes will be different for each system, but once you do this, the country coding process will be the same on all systems.

Let's start with Windows

The first step to changing Tor country codes is to download and install

Hidden from guests

Before you start changing codes, you should make sure that you have run Tor at least once. This leads to the appearance torrc file, which is necessary to change the nodes that Tor traverses.

Once the installation is complete you will need double click on the Tor icon to open the browser, and then click "Connect" on the screen that appears. Once you are connected, torrc file will be available and you can proceed to the rest of the process as follows.

Regular Tor users (and those new users who have just connected to Tor) can start by searching torrc file. To find him double click the Browser folder, then double click the TorBrowser folder inside it.

In the TorBrowser folder there is another folder called Data. Double click on it. Here you will see another folder called Tor. Also double click on it. This will take you to torrc file:


Double click torrc file to open it. In the window that appears, you will be asked to choose which program you want to open the file with. Select Notebook which will open the following window:
Having done this, you can go to the section

How to change country codes on Mac

As with Windows, you'll need to make sure you've launched Tor at least once for it to appear. torrc file. If you haven't already, download Tor Browser and install it. Once configured, open your browser and click "Connect."

Once Tor has been connected at least once, you will need to find torrc file. First go to the tab "Go", then click "Go to menu" which appears in the submenu:


Find Tor folder with the following address:
Once you are inside the folder, find torrc file. Double click on it, then select TextEdit from options “Open With”:
This will open the following file:
From now on you can go to the section “Entering Tor country codes” in a text editor.

How to change country codes in Linux

Before you begin, you will need to set up Tor and run it at least once. You can download

Hidden from guests

From the Tor Project website and then run the installation. Open your browser, then click "Connect" to display torrc file

Once this is done you can find torrc file by opening the folder Tor Browser, then navigating from the subfolder Browser V TorBrowser, then in Browser and finally to the folder Tor.

Open torrc file in a regular text editor to move on to the next step. Here you can add the desired country codes. It will look roughly the same as the Notepad and TextEdit files shown in Windows partitions and Mac are higher, respectively. Once you've done this, you can move on to the next section.

Entering country codes Tor in a text editor

Now that you've opened the file (on Windows, Mac, or Linux), it's time to find the entry and exit nodes you'd like to use in Tor. Go to the following link in

Hidden from guests

To find codes for the countries you want to connect through. Each country code consists of two letters in brackets ():


As an example, the country code for Argentina is ar, and for Bangladesh - bd. In this guide, we will use the Netherlands (nl), Germany (de), USA (us), Singapore (sg) and Australia (au) as entry and exit nodes. For other country codes, scroll to the page linked above.

Once you've found the country codes you're looking for, go back to your Notepad file (Windows), Text Edit file (Mac), or whatever text editor you were using (if you're changing country codes on Linux ) that we discovered earlier. Left-click below the last line of text and enter the following (including spaces after "EntryNodes" and "ExitNodes", but no spaces between each country code):

EntryNodes (nl),(de),(us),(au),(sg) ExitNodes (nl),(de),(us),(au),(sg)

Code EntryNodes determines which entry nodes you want to use in Tor. Code ExitNodes does the same thing, but for output nodes. Keep in mind that with these Tor settings can still use nodes in other countries between entry and exit.

If Tor fails to connect correctly using any of the specified entry and exit nodes, it will fall back to other nodes, which may cause your data to travel through locations you don't want.

See the section at the end of the article if you want to see other options. These include codes that can be used to exclude nodes and those that can force Tor to only use certain nodes, even if this means that the connection will not be established otherwise.

On Windows it looks like this:


Or this way on Mac:
Remember to replace (nl), (de), (us), (au) and (sg) with the country codes of your choice.

When you are done with your selections, follow these steps:

  • On Windows - click "File" in the upper left corner "Notepad" then "Save as" In the window that appears, go to the option "File type" below and select "All files." Then click on torrc file, then click "Save" And "Yes":
  • Mac- press simultaneously Command And S to save the file, then close it .
  • Linux- save the file as usual (this will depend on what text editor you use).
Now that you have changed and saved torrc file, launch Tor Browser. Go to the site of your choice. In this case, we'll head to Wikipedia. To the left of the URL you will see a small icon with a circle i:
Click on it to see the diagram that your connection establishes. If you did everything correctly and Tor is able to connect through the countries you selected, you will see your traffic using the entry and exit nodes you selected. In this case, the Tor connection passes through Germany and the Netherlands.

As you can see, changing Tor country codes is a fairly simple process and makes it easy to spoof your location. In the settings above, you can select any nodes you like, and Tor will ideally send your traffic through those entry and exit nodes. If it cannot establish a stable connection using them, it will fall back to using other nodes.

Other useful Tor country codes

Applying the above settings is not ideal for every use case. In some situations, it may be better to exclude nodes that you don't want to use rather than installing nodes that you do want to include. For example, you might want to exclude only exit nodes in the United States.

Excluding nodes

To do this, follow the same process as above but instead of using the codes EntryNodes And ExitNodes from the previous ones, use ExcludeExitNodes. You must enter the following in torrc file in Notepad:

ExcludeExitNodes (us)

If you want to exclude multiple output nodes, you just need to separate them with commas like we did earlier. In other situations, you may want to exclude certain nodes from being used as entry points, exit points, or anywhere in between. To do this you use the ExcludeNodes code in the same way:

ExcludeNodes (us) StrictNodes

Using the codes above, you will still run into the problem that Tor may fall back to using excluded nodes if it fails to establish a stable connection in any other way. If you prefer not to connect at all instead of connecting through specific locations, you need to add the code StrictNodes. You can place it under any of the codes mentioned above.

If for the parameter StrictNodes given value 1 , Tor will only connect through the nodes you specify (and avoid the ones you exclude). If it cannot successfully connect through these specified nodes, it will not be able to fall back to the nodes that were excluded.

If for the parameter StrictNodes given value 0 ,Tor will avoid excluded nodes whenever possible. If it cannot establish a stable connection on the allowed nodes, it will fall back to other nodes to operate properly.

You can customize StrictNodes by entering any of the other codes we mentioned above ( EntryNodes, ExitNodes, ExcludeExitNodes, ExcludeNodes), V torrc file in Notepad and then select whichever country code you choose to include or exclude.

Then you enter StrictNodes to the next line with the value 1 , if you want only certain nodes to be used, even if this causes connection failures. If you'd rather keep Tor connected, even if it means using unwanted nodes, enter 0 .

For example, if you absolutely do not want Tor to use any nodes located in the United States, you would enter the following:

ExcludeNodes (us) StrictNodes 1

Tor's country code options are flexible, allowing you to connect in any way that suits your goals and risk profile. Some users will appreciate the ability to stay connected no matter what nodes are in use, while others may be concerned about their security if their traffic passes through certain locations. Luckily, you can easily customize Tor to suit your needs.

Hidden from guests

If you use the Tor browser, then most likely you had the need to access the site using the IP of a specific country. Tor selects IPs randomly, i.e. When you go online, your chain of nodes is constantly changing, and you can change the chain until the desired country appears at the end endlessly. But in Tor you can force set the country of access to the network.

How to force Tor to access the network through the IP address of a specific country

To set the country of access to the network in Tor, open the file torrc(Windows path: ) for editing and add the following lines to the end of the file:

ExitNodes (US) StrictExitNodes 1

Where (US)- country for accessing the network.

Before editing the file C:\Tor Browser\Browser\TorBrowser\Data\Tor\torrc make a backup copy of it

If you need to specify several countries, then list them separated by commas:

ExitNodes (US),(DE),(AT),(UA),(RU) StrictExitNodes 1

As a result, the torrc file will look something like this:

# This file was generated by Tor; if you edit it, comments will not be preserved # The old torrc file was renamed to torrc.orig.1 or similar, and Tor will ignore it DataDirectory C:\Tor Browser\Browser\TorBrowser\Data\Tor GeoIPFile C:\Tor Browser\Browser\TorBrowser\Data\Tor\geoip GeoIPv6File C:\Tor Browser\Browser\TorBrowser\Data\Tor\geoip6 ExitNodes (US),(DE),(AT),(UA),(RU) StrictExitNodes 1

After making changes, restart Tor and enjoy your work ;)

Tor, how to prohibit access to the network through the IP address of a certain country

Open the file for editing torrc(Windows path: C:\Tor Browser\Browser\TorBrowser\Data\Tor) and add the following line:

StrictExitNodes (MD)

Where (MD)- a country through which it is prohibited to access the Internet.

If you need to specify several countries to ban, then list them separated by commas:

StrictExitNodes (MD),(KZ)

If you are using ExitNodes(list of allowed countries), then set StrictExitNodes(list of prohibited countries) makes no sense.

After making changes, restart Tor.

Tor Browser via IP addresses of a specific country.

Recently, a friend knocked on my door asking me to help her with a delicate matter. She wanted to get votes in some girls' photo contest. I don’t understand who the hell needs this, people have nothing to do. If I were to receive some prizes (which is also not entirely fair), that’s what I understand, but doesn’t a naive RuNet user yet understand that participating in some kind of competitions or reposts on VKontakte with promising and flashy names like “Make a repost” “Press the like button”, “Spit over your right shoulder”, “And get a super-duper Video card” or “ Gaming mouse Will Razer Mamba give him the opportunity to get something for free?

Okay, I got carried away. So, one of the conditions of the competition was that voting people must be located on Russian territory. Those. The IP addresses of users who vote must be from Russia. And she lives in Ukraine. I thought for now I would give her a list of those checked out, and then use the Proxy Switcher program to solve this issue.

But then, after thinking a little, I decided to take a simpler route, nooo... and not because she’s blonde, I really love women and blondes in particular:)! Just like, I’m a little lazy person, I’m looking for something easier. After finishing it a little, I decided to send her our all-loved, slightly modified Tor Browser.

We wrote in detail about Tor in this article ““. If you are not yet familiar with this secure browser based on an anonymous network, I advise you to read it.

Tor works through IP addresses of a specific country

The Tor network works randomly, i.e. accesses the network through a constantly changing chain of nodes, and each time your computer is assigned a different IP address different countries. But we only need Russian!

So, how to configure Tor so that it always receives the IP of a certain country. For this we will need if you don’t already have it. In the drop-down menu you can select the interface language. There is also Russian!

Turn on Thor. If you see a green onion and the words “Connected to the Tor network,” move on.

In the same window, click on the Settings button

In the window that appears, go to the Additional tab. Click on the button Edit current torrc. In the torrc editing window, at the very bottom, at the end, add the line ExitNodes (ru). Put a tick Apply selected and click OK

Now let's restart the browser. After launching Tor Browser from all possible IPs, it will select only Russian IP addresses, and change only to Russian ones when you press the button Change identity.

This way you can customize the browser to your taste. For example:

  • Work across any country
    ExitNodes (country code)
  • Work only through specified countries (several countries).
    ExitNodes (ua),(ug),(kp),(ru)
  • Block work through a specific country.
    ExcludeExitNodes (de)

Download for free
Country codes for working with the Tor browser

Well, now you know how to make Tor work through IP addresses of a specific country. If you liked the article, click the button social network! And don’t forget to subscribe to us on VKontakte, Odnoklassniki, Twitter and Facebook, so as not to miss the news and be always up to date.

When I downloaded the browser, I was left with this folder on my desktop

You need to go into it and select the folder Browser =>TorBrowser =>Data =>Tor.





In this Tor folder, we are only interested in the torrc file; you need to open it using Notepad and enter a command in it so that the output always contains one or more countries that you need.


Since I don’t need the whole world to work, but just our homeland, I changed the settings of my browser by entering the command in this way. I only added the last line. ExitNodes (ru), for me it looks like this.


But this is the case if you need one country, and if you need several, then they need to be written separated by commas and always in such curly brackets. Next, start saving. In my case, ru is the designation for Russia. Designations and letter codes of countries around the world can be found on the Internet; I look at them on the website [link] in a column of 2 letters. Well, in order to select a specific city, you just need to click on the onion and then the cities will change only from the list of those countries that you need. In order to check the city you are in at the moment configured you need to enter the command in search bar browser [link] and configure the browser to the desired city manually.


After entering the command and saving, the browser works as it should.

And now not much about the disadvantages that I see in it for myself:

  • not all forums and sites allow entry from such a browser (for example, Flamp cannot be fooled in this way)
  • It works slowly, but this is due to the constant change of nodes in the chain
  • Sometimes the IP address changes too quickly and at the wrong time.
  • After updating the browser, you need to re-enter the logins and passwords of the pages you were currently on, log in mailbox For example

Still, I like this browser and use it. It opens up a lot of possibilities. And if I learn anything new about him, I’ll be sure to let you know.