Git Product home page Git Product logo

tor-router's Introduction

TOR Router

Tor Router allow you to use TOR as a transparent proxy and send all your trafic under TOR INCLUDING DNS REQUESTS, the only that you need is: a system using systemd (if you want to use the service) and tor.

TOR router doesn't touch system files as the rest of tools for routing your taffic does and the reason is: there isn't needed to move files for routing traffic, also moving files is a bad idea since that a fail in the script/tool can break your system connection without you knowing what has happened.

Note: Tor-router doesn't route UDP packets because TOR doesn't support it: https://2019.www.torproject.org/docs/faq.html.en#TransportIPnotTCP

Script to install on distros using SystemD only

If you are using BlackArch Linux (https://blackarch.org) you can install the script from the repos using the following command: # pacman -S tor-router

To install from source:

Note that you need BASH, not sh

~$ git clone https://github.com/edu4rdshl/tor-router.git && cd ./tor-router && sudo bash install.sh

Usage

In distros using systemd, you should consideer using the install.sh script, anyways the process to install/configure tor-router is described here.

It script require root privileges

  1. Open a terminal and clone the script using the following command:
~$ git clone https://github.com/edu4rdshl/tor-router.git && cd tor-router/files
  1. Put the following lines at the end of /etc/tor/torrc
# Seting up TOR transparent proxy for tor-router
VirtualAddrNetwork 10.192.0.0/10
AutomapHostsOnResolve 1
TransPort 9040
DNSPort 5353
  1. Restart the tor service
  2. Execute the tor-router script as root
# sudo ./tor-router
  1. Now all your traffic is under TOR, you can check that in the following pages: https://check.torproject.org and for DNS tests: https://dnsleaktest.com
  2. In order to automate the process of the script, you should add it to the SYSTEM autostart scripts according that the init that you are using, for systemd we have a .service file in the files folder.

Uninstalling/Stoping

Delete the tor-router configuration lines in /etc/tor/torrc, disable the tor-router.service using systemctl (if you used the install.sh script), remove /usr/bin/tor-router, /etc/systemd/system/tor-router.service and restart your computer.

Considerations

  1. Tor-router actually only support IPv4 traffic, support for IPv6 traffic will be added soon. (See #1)

Proof of concept

After of run the script, follow the next steps to ensure that all is working as expected:

Alt text

  • Checking DNS Leaks: Visit https://dnsleaktest.com and make a extended test to see what are your DNS. You shloud get some like it:

Alt text

Distros using the script

BlackArch Linux: https://github.com/BlackArch/blackarch/blob/master/packages/tor-router

tor-router's People

Contributors

edu4rdshl avatar faultiersp avatar mullerhx avatar rasooll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tor-router's Issues

Some websites can still get the original IP

Hi

Thanks for this project, it works nicely. But when trying to check the IP in whatsmyip.com, the original public IP is still shown up. That is weird, because in most of the other checking IP website it works anonymously. Do you know why?

Thanks

Firewall rules

You might want to consider moving your rules in it's own table and use a jump from the main table.
That way you can enable/disbale your rules using a simple one line rule add/remove that jumps to your rules.
That way you won't interfere with current rules of the machine...

Lines in question: tor-router#L25-L42 and tor-router.service#L9

can't conncet: iptables RULE_APPEND failed (no such file or directory): rule in chain OUTPUT

Eventhough nothing wrong was indicated by the install script, tor-router doesn't work here, according to https://check.torproject.org/ it can't connect:

$ sudo tor-router Warning: Extension owner revision 0 not supported, missing kernel module? iptables v1.8.9 (nf_tables): RULE_APPEND failed (No such file or directory): rule in chain OUTPUT Warning: Extension udp revision 0 not supported, missing kernel module? Warning: Extension REDIRECT revision 0 not supported, missing kernel module? iptables v1.8.9 (nf_tables): RULE_APPEND failed (No such file or directory): rule in chain OUTPUT Warning: Extension tcp revision 0 not supported, missing kernel module? Warning: Extension REDIRECT revision 0 not supported, missing kernel module? iptables v1.8.9 (nf_tables): RULE_APPEND failed (No such file or directory): rule in chain OUTPUT Warning: Extension state revision 0 not supported, missing kernel module? iptables v1.8.9 (nf_tables): RULE_APPEND failed (No such file or directory): rule in chain OUTPUT Warning: Extension owner revision 0 not supported, missing kernel module? iptables v1.8.9 (nf_tables): RULE_APPEND failed (No such file or directory): rule in chain OUTPUT

Routing with Tor

Hola Eduardo:

Mi nombre es Daniel y estoy intentando enrutar el trafico a través la de la red Tor. He probado con varios programas TorGhostNG y alguno más, incluso con tor + iptables directamente y ahora con Tor-router. Todo funciona ok pero no hace lo que quiero. Lo que yo quiero es que no solo la máquina lleve todo el tráfico a la red tor sino que haga de router con dos interface y todo lo que le venta por cualquiera de ellas vaya a la red Tor y eso es lo que me falla. Me enruta a tor si salgo con el linux que tiene Tor o Tor-router pero tengo otra máquina conectada en otra red y sale a Internet pero normal, sin redirigir el tráfico a Tor. ¿Alguien tiene la misma necesidad que yo? ¿Pueden aydudarme?

Gracias de antemano
Saludos
Dani

Hi Eduardo:

My name is Daniel and I am trying to route traffic through the Tor network. I have tried with several TorGhostNG programs and some more, even with tor + iptables directly and now with Tor-router. Everything works ok but it doesn't do what I want. What I want is for the machine not only to carry all the traffic to the tor network but to act as a router with two interfaces and everything that is sold through any of them goes to the Tor network and that is what fails me. It routes me to tor if I go out with the linux that has Tor or Tor-router but I have another machine connected to another network and it goes to the Internet but normal, without redirecting the traffic to Tor. Does anyone have the same need as me? Can you help me?

Thanks in advance
Greetings
Dani

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.