![sail with tor through the country we want](https://www.ikkaro.com/wp-content/uploads/2021/04/elegir-pais-tor.jpg)
Sometimes we want to navigate pretending that we are in a certain country, that is, hiding our real IP and using another from the country we choose.
We may want to do this for many reasons:
- browse anonymously,
- services that are only offered if you navigate from a certain country,
- offers when hiring services,
- check how a website that contains geolocated elements works.
In my case it was the last option. After implementing several plugins on a WordPress website, I needed to check that it displayed the data correctly to users in each country.
Various methods can be used to do this.
Browse through a proxy, use a VPN or use TOR forcing it to the last node to be from the country that interests us.
As I do not have a VPN, a proxy I am not going to search and test from each country and I have TOR already installed because I opted for this last method.
If you are here, I understand that you know what TOR is, and that it serves to anonymize and secure Internet browsing. For that we use the Tor browser. To improve our security and privacy, let’s say that you are jumping between nodes in different countries and that is the only thing you need to know to understand the change you are going to make.
How to force TOR to exit in the node of a certain country
I use Linux, but the procedure is the same in Linux, Windows and Mac, it only changes where the file that we have to edit is located and that it is torrc
The first thing is to look for it. We look for torrc and we find it in the path seen in the image inside Browser / TorBrowser / Data / Tor
![force tor to exit in a country node](https://www.ikkaro.com/wp-content/uploads/2021/04/torrc.jpg)
We open it with Gedit for example or with another text or code editor and we are going to add these 3 lines at the end.
EntryNodes {en}
ExitNodes {de}
Strict Nodes 1
![how to edit torrc](https://www.ikkaro.com/wp-content/uploads/2021/04/edit-torrc.jpg)
With EntryNodes {es} we tell it that the entry node must be from Spain, with ExitNodes {de} the exit node must be from Germany, and with StrictNodes 1 we force it to use those nodes. If not, he would try to catch it when it suits him, but we would not be guaranteed anything.
The codes in braces {} are ISO codes that define the countries. In this link you can find all ISO codes. Choose the ones that interest you
In many places they only recommend the last two lines, the ExitNodes and the StrictNodes, but this way sometimes it worked for me and sometimes it didn’t. While adding an EntryNodes has not failed me at the moment.
I also recommend that if you use it, open a website to locate your IP and check if you have really left in the country you have chosen.
![check ip](https://www.ikkaro.com/wp-content/uploads/2021/04/comprobar-tor-ip-1024x616.jpg)
There are a thousand of these services and this way you make sure that everything works correctly. That you have chosen the torrc file that was playing, etc.
If you have any questions, leave a comment.
More modifications on Nodes
More things we can do are
- ExitNodes {ua}, {ug}, {ie} StrictNodes 1 (define more than one exit node, multiple countries)
- ExcludeNodes {country_code}, {country_code} (never use those countries in the TOR circuit)
- ExcludeExitNodes {country_code}, {country_code} (never use those countries as exit node)
Countries without nodes
In some countries like Portugal it seems that there are no exit nodes. So here I have not been able to use the TOR method.
I have solved it by entering the webs that I had to review through a Portugal proxy.
There is always some solution to our problems 😉