[TOR] How to control routing by choosing preferred countries.

Discussion in 'Application Software' started by Yen, May 25, 2018.

  1. Yen

    Yen Admin
    Staff Member

    May 6, 2007
    13,100
    14,044
    340
    Hi,

    when using TOR you might want to have control about where your TOR route should start and where it should end and which countries you do want to exclude for routing.

    There is a config file named torrc which is suitable for this to control.

    Important are the Nodes and far more the ExitNodes. (Where you leave to enter the internet and get your IP address).

    Each country has got a country code:

    Code:
    Country                               Code
    ASCENSION ISLAND                      {ac}
    AFGHANISTAN                           {af}
    ALAND                                 {ax}
    ALBANIA                               {al}
    ALGERIA                               {dz}
    ANDORRA                               {ad}
    ANGOLA                                {ao}
    ANGUILLA                              {ai}
    ANTARCTICA                            {aq}
    ANTIGUA AND BARBUDA                   {ag}
    ARGENTINA REPUBLIC                    {ar}
    ARMENIA                               {am}
    ARUBA                                 {aw}
    AUSTRALIA                             {au}
    AUSTRIA                               {at}
    AZERBAIJAN                            {az}
    BAHAMAS                               {bs}
    BAHRAIN                               {bh}
    BANGLADESH                            {bd}
    BARBADOS                              {bb}
    BELARUS                               {by}
    BELGIUM                               {be}
    BELIZE                                {bz}
    BENIN                                 {bj}
    BERMUDA                               {bm}
    BHUTAN                                {bt}
    BOLIVIA                               {bo}
    BOSNIA AND HERZEGOVINA                {ba}
    BOTSWANA                              {bw}
    BOUVET ISLAND                         {bv}
    BRAZIL                                {br}
    BRITISH INDIAN OCEAN TERR             {io}
    BRITISH VIRGIN ISLANDS                {vg}
    BRUNEI DARUSSALAM                     {bn}
    BULGARIA                              {bg}
    BURKINA FASO                          {bf}
    BURUNDI                               {bi}
    CAMBODIA                              {kh}
    CAMEROON                              {cm}
    CANADA                                {ca}
    CAPE VERDE                            {cv}
    CAYMAN ISLANDS                        {ky}
    CENTRAL AFRICAN REPUBLIC              {cf}
    CHAD                                  {td}
    CHILE                                 {cl}
    PEOPLE'S REPUBLIC OF CHINA            {cn}
    CHRISTMAS ISLANDS                     {cx}
    COCOS ISLANDS                         {cc}
    COLOMBIA                              {co}
    COMORAS                               {km}
    CONGO                                 {cg}
    CONGO (DEMOCRATIC REPUBLIC)           {cd}
    COOK ISLANDS                          {ck}
    COSTA RICA                            {cr}
    COTE D IVOIRE                         {ci}
    CROATIA                               {hr}
    CUBA                                  {cu}
    CYPRUS                                {cy}
    CZECH REPUBLIC                        {cz}
    DENMARK                               {dk}
    DJIBOUTI                              {dj}
    DOMINICA                              {dm}
    DOMINICAN REPUBLIC                    {do}
    EAST TIMOR                            {tp}
    ECUADOR                               {ec}
    EGYPT                                 {eg}
    EL SALVADOR                           {sv}
    EQUATORIAL GUINEA                     {gq}
    ESTONIA                               {ee}
    ETHIOPIA                              {et}
    FALKLAND ISLANDS                      {fk}
    FAROE ISLANDS                         {fo}
    FIJI                                  {fj}
    FINLAND                               {fi}
    FRANCE                                {fr}
    FRANCE METROPOLITAN                   {fx}
    FRENCH GUIANA                         {gf}
    FRENCH POLYNESIA                      {pf}
    FRENCH SOUTHERN TERRITORIES           {tf}
    GABON                                 {ga}
    GAMBIA                                {gm}
    GEORGIA                               {ge}
    GERMANY                               {de}
    GHANA                                 {gh}
    GIBRALTER                             {gi}
    GREECE                                {gr}
    GREENLAND                             {gl}
    GRENADA                               {gd}
    GUADELOUPE                            {gp}
    GUAM                                  {gu}
    GUATEMALA                             {gt}
    GUINEA                                {gn}
    GUINEA-BISSAU                         {gw}
    GUYANA                                {gy}
    HAITI                                 {ht}
    HEARD & MCDONALD ISLAND               {hm}
    HONDURAS                              {hn}
    HONG KONG                             {hk}
    HUNGARY                               {hu}
    ICELAND                               {is}
    INDIA                                 {in}
    INDONESIA                             {id}
    IRAN, ISLAMIC REPUBLIC OF             {ir}
    IRAQ                                  {iq}
    IRELAND                               {ie}
    ISLE OF MAN                           {im}
    ISRAEL                                {il}
    ITALY                                 {it}
    JAMAICA                               {jm}
    JAPAN                                 {jp}
    JORDAN                                {jo}
    KAZAKHSTAN                            {kz}
    KENYA                                 {ke}
    KIRIBATI                              {ki}
    KOREA, DEM. PEOPLES REP OF            {kp}
    KOREA, REPUBLIC OF                    {kr}
    KUWAIT                                {kw}
    KYRGYZSTAN                            {kg}
    LAO PEOPLE'S DEM. REPUBLIC            {la}
    LATVIA                                {lv}
    LEBANON                               {lb}
    LESOTHO                               {ls}
    LIBERIA                               {lr}
    LIBYAN ARAB JAMAHIRIYA                {ly}
    LIECHTENSTEIN                         {li}
    LITHUANIA                             {lt}
    LUXEMBOURG                            {lu}
    MACAO                                 {mo}
    MACEDONIA                             {mk}
    MADAGASCAR                            {mg}
    MALAWI                                {mw}
    MALAYSIA                              {my}
    MALDIVES                              {mv}
    MALI                                  {ml}
    MALTA                                 {mt}
    MARSHALL ISLANDS                      {mh}
    MARTINIQUE                            {mq}
    MAURITANIA                            {mr}
    MAURITIUS                             {mu}
    MAYOTTE                               {yt}
    MEXICO                                {mx}
    MICRONESIA                            {fm}
    MOLDAVA REPUBLIC OF                   {md}
    MONACO                                {mc}
    MONGOLIA                              {mn}
    MONTENEGRO                            {me}
    MONTSERRAT                            {ms}
    MOROCCO                               {ma}
    MOZAMBIQUE                            {mz}
    MYANMAR                               {mm}
    NAMIBIA                               {na}
    NAURU                                 {nr}
    NEPAL                                 {np}
    NETHERLANDS ANTILLES                  {an}
    NETHERLANDS, THE                      {nl}
    NEW CALEDONIA                         {nc}
    NEW ZEALAND                           {nz}
    NICARAGUA                             {ni}
    NIGER                                 {ne}
    NIGERIA                               {ng}
    NIUE                                  {nu}
    NORFOLK ISLAND                        {nf}
    NORTHERN MARIANA ISLANDS              {mp}
    NORWAY                                {no}
    OMAN                                  {om}
    PAKISTAN                              {pk}
    PALAU                                 {pw}
    PALESTINE                             {ps}
    PANAMA                                {pa}
    PAPUA NEW GUINEA                      {pg}
    PARAGUAY                              {py}
    PERU                                  {pe}
    PHILIPPINES (REPUBLIC OF THE)         {ph}
    PITCAIRN                              {pn}
    POLAND                                {pl}
    PORTUGAL                              {pt}
    PUERTO RICO                           {pr}
    QATAR                                 {qa}
    REUNION                               {re}
    ROMANIA                               {ro}
    RUSSIAN FEDERATION                    {ru}
    RWANDA                                {rw}
    SAMOA                                 {ws}
    SAN MARINO                            {sm}
    SAO TOME/PRINCIPE                     {st}
    SAUDI ARABIA                          {sa}
    SCOTLAND                              {uk}
    SENEGAL                               {sn}
    SERBIA                                {rs}
    SEYCHELLES                            {sc}
    SIERRA LEONE                          {sl}
    SINGAPORE                             {sg}
    SLOVAKIA                              {sk}
    SLOVENIA                              {si}
    SOLOMON ISLANDS                       {sb}
    SOMALIA                               {so}
    SOMOA,GILBERT,ELLICE ISLANDS          {as}
    SOUTH AFRICA                          {za}
    SOUTH GEORGIA, SOUTH SANDWICH ISLANDS {gs}
    SOVIET UNION                          {su}
    SPAIN                                 {es}
    SRI LANKA                             {lk}
    ST. HELENA                            {sh}
    ST. KITTS AND NEVIS                   {kn}
    ST. LUCIA                             {lc}
    ST. PIERRE AND MIQUELON               {pm}
    ST. VINCENT & THE GRENADINES          {vc}
    SUDAN                                 {sd}
    SURINAME                              {sr}
    SVALBARD AND JAN MAYEN                {sj}
    SWAZILAND                             {sz}
    SWEDEN                                {se}
    SWITZERLAND                           {ch}
    SYRIAN ARAB REPUBLIC                  {sy}
    TAIWAN                                {tw}
    TAJIKISTAN                            {tj}
    TANZANIA, UNITED REPUBLIC OF          {tz}
    THAILAND                              {th}
    TOGO                                  {tg}
    TOKELAU                               {tk}
    TONGA                                 {to}
    TRINIDAD AND TOBAGO                   {tt}
    TUNISIA                               {tn}
    TURKEY                                {tr}
    TURKMENISTAN                          {tm}
    TURKS AND CALCOS ISLANDS              {tc}
    TUVALU                                {tv}
    UGANDA                                {ug}
    UKRAINE                               {ua}
    UNITED ARAB EMIRATES                  {ae}
    UNITED KINGDOM (no new registrations) {gb}
    UNITED KINGDOM                        {uk}
    UNITED STATES                         {us}
    UNITED STATES MINOR OUTL.IS.          {um}
    URUGUAY                               {uy}
    UZBEKISTAN                            {uz}
    VANUATU                               {vu}
    VATICAN CITY STATE                    {va}
    VENEZUELA                             {ve}
    VIET NAM                              {vn}
    VIRGIN ISLANDS (USA)                  {vi}
    WALLIS AND FUTUNA ISLANDS             {wf}
    WESTERN SAHARA                        {eh}
    YEMEN                                 {ye}
    ZAMBIA                                {zm}
    ZIMBABWE                              {zw}
    INFO: Use capital country letters, some say it has to be capital.

    What you need:

    Specify the exit nodes you want to use: (Example)
    Code:
    ExitNodes {CH},{RU},{UA}
    StrictNodes 1
    You want to have Switzerland, Russia and Ukraine as countries from where you get your IP to enter the internet.
    Add StrictNodes 1 command.

    You want to have nodes excluded: (Example)
    Code:
    ExcludeNodes {FR},{DE},{US},{UK}
    This excludes France, Germany, US and the UK to be Nodes on your route.


    You want to have Exit Nodes excluded: (Example). THIS is the country you leave and enter the internet.
    Code:
    ExcludeExitNodes {US},{AU},{CA},{NZ},{GB},{FR},{DE},{UK}
    This means you do NOT get an IP address from the following countries:

    US, Australia, Canada, New Zealand, Great Britain, France, Germany, United Kingdom.

    Locate your torrc file of your TOR installation. The location depends on the OS and the kind of installation. If you don't find it search for it. Part of the path is usually TorBrowser/Data/Tor/ or on windows username\Application Data\tor\log\ or \Application Data\tor\log\

    Open it with an text editor and add the commands with your preferred routing. Separate your countries with a comma.:)

    When saving your edited torrc file make sure you do not add an extension like dot txt or something. Leave it original.
    At Linux use the plain text editor, at windows notepad++
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. m14lovely

    m14lovely MDL Novice

    Mar 26, 2018
    5
    2
    0
  3. ThomasMann

    ThomasMann MDL Expert

    Dec 31, 2015
    1,842
    310
    60
    When you avoid the suspect countries as a first contact, does the second server, even if it is in the US, actually have a possibility to get the original ISP?

    Plus, I am always puzzled by one thing.
    Clearly, the fastest speed you will get when you use a VPN in the country you actually are, any speed test will show that.

    Now, intuitivly this it not done, is there and actual reason for this? There are of course some countries like US, Australia, Canada, New Zealand, Great Britain, France, Germany, United Kingdom, where one better not risk it. But when you are f.e. in Switzerland is there a FACTUAL REASON not to use a VPN server in your country?
     
  4. bharath394

    bharath394 MDL Novice

    Feb 28, 2013
    16
    2
    0
    Thanks for Tutorial
     
  5. Wh!5t|eR

    Wh!5t|eR MDL Novice

    Oct 16, 2014
    12
    6
    0
    Nice tut, will try it out tonight and get back on.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. MonarchX

    MonarchX MDL Expert

    May 5, 2007
    1,732
    313
    60
    Thanks! I had no idea you could do that...
     
  7. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    7,897
    10,735
    240
    Hi Yen well I installed Tor here but I'm having some difficulties to configure it correctly and this post helped me a lot thank you very much :tankyou:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,070
    10
    #8 shewolf, Apr 24, 2020
    Last edited: Apr 27, 2020
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,070
    10
  10. jazi4641

    jazi4641 MDL Novice

    Oct 28, 2012
    41
    73
    0
    Translation starts at line 225 [Deutsch] in translation.ini.
     
  11. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,070
    10
  12. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,562
    15,646
    270
    Where's the repository, if any, at github?
    Or any official website?
     
  13. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,070
    10
    You came to break my balls again?
    Nothing repository nothing on GitHub, and this is the official website because I want it so!

    :eek:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,562
    15,646
    270
    roflao, I'll always come back to castrate you, always.
    I didn't know you were the author. Are you?
    If so, put a damn signal, phrase or anything saying so.
     
  15. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,070
    10
    #16 shewolf, Apr 30, 2020
    Last edited: May 30, 2020
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. gabox

    gabox MDL Novice

    Sep 8, 2013
    3
    0
    0
    Is it possible to change in Torbrowser Settings ? TIA
     
  17. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,070
    10
    #18 shewolf, Jun 2, 2020
    Last edited: Jul 19, 2020

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. shewolf

    shewolf MDL Senior Member

    Apr 16, 2015
    471
    1,070
    10
    #19 shewolf, Jul 29, 2020
    Last edited: Jul 30, 2020
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. BernieBro70

    BernieBro70 MDL Novice

    Apr 24, 2021
    2
    1
    0
    Greetings,
    Since ALL Stupid Questions are allowed....
    Do you need to close the browser in order to edit the torrc file or configure it in the TorControlPanel application?

    Thanks