how can I route all my traffic through tor on debian 12.6?
from merompetehla@lemmy.ml to linux@lemmy.ml on 11 Jul 2024 21:10
https://lemmy.ml/post/17883707

back when I used ubuntu derivatives I used privoxy and edited the config file to route all my traffic through tor.

I just did the same on debian 12.6 and wonder if there’s a better alternative.

#linux

threaded - newest

[deleted] on 11 Jul 2024 21:16 next collapse

.

merompetehla@lemmy.ml on 11 Jul 2024 21:34 collapse

how does carburetor work? Do I simply activate it and that means all my traffic goes through tor? just like that? even if I open a terminal and sudo apt update, flatpak or yt-dlp something?

illectrility@sh.itjust.works on 11 Jul 2024 21:43 next collapse

(Not directly answering your question but) if it works like a VPN service then yeah. However, P2P connections might not be routed through TOR in that case. Be careful about that

[deleted] on 11 Jul 2024 21:56 next collapse

.

Steamymoomilk@sh.itjust.works on 12 Jul 2024 02:33 collapse

You run carburetor and use it has a proxy for your internet. Ie go to network settings and fill out the ports for your connections in proxy

just_another_person@lemmy.world on 11 Jul 2024 22:15 next collapse

You point your main active network interface gateway to a tor gateway or proxy.

merompetehla@lemmy.ml on 12 Jul 2024 08:14 collapse

You point your main active network interface gateway to a tor gateway or proxy.

Am I doing that editing the privoxy config file with this line?

‘forward-socks5t / 127.0.0.1:9050 .’

I now set up tor for firefox manually using www.wikihow.com/Use-Tor-with-Firefox. If the edited privoxy cofig file is the right way to go, didn’t I just double torify?

pinganini@mstdn.social on 11 Jul 2024 22:15 next collapse

@merompetehla

#Whonix is what you need, unless you find this solution too heavy

LodeMike@lemmy.today on 12 Jul 2024 03:36 next collapse

Install tor (from the official repo) then set up a proxy for SOCKS5 localhost port 9050

refalo@programming.dev on 12 Jul 2024 05:30 next collapse

orjail

makeasnek@lemmy.ml on 12 Jul 2024 05:46 next collapse

You may want to look into Qubes, it can natively route an entire OS through Tor. Note that routing all your traffic may hurt your anonymity. For example, there what if an app on your machine reaches out to somewhere and reports the serial number of a piece of hardware and it does it through your “anonymous” Tor connection? Virtualizing that hardware can help avoid that. Think through your threat model.

Turbo@lemmy.ml on 12 Jul 2024 10:51 next collapse

If you can, set this up on your router and then specify which devices should route through.

You may also want to use pihole for ad blogging and as your DNS server. and in pihole use your VPN server’s DNS such that you don’t have DNS leak.

And if the VPN is down, your computer won’t work until it comes back up.

Helpful if you run the network at your house

OsrsNeedsF2P@lemmy.ml on 13 Jul 2024 06:41 next collapse

Someone else mentioned Qubes, but that is also a rather advanced distro for journalists and other users with a high threat model.

If you want to be able to use your computer as normal, but have a session with maximum privacy and route through Tor, Whonix is your best bet.

If you want something that you cannot possibly mess up, even at the cost of less functionality on your computer, TAILS is your best bet.

Johnny123123@lemmy.ml on 17 Jul 2024 04:45 collapse

I don’t use tor that often but as my understanding tor is basically a socks5 proxy, which operates at application layer, so there is no way you can route all your traffic through tor, at least not the ICMP packets.

Some applications are willing to use your proxy settings like http_proxy and https_proxy environment variables, but some of them not, especially for udp based applications (most games). The workaround that i am aware of is to use a rule-based proxy program that supports TUN mode, such as Clash Meta (the link is a fork of clash meta called mihomo, which is the one that i am currently using). Basically it creates a virtual interface and traps all the higher layer traffic into this interface, so it can route them through the configured proxy (tor in your case), even for applications that don’t honor your proxy settings at all.

In Clash Meta you can use configurations such as this to route all your layer 5 and 4 traffic through tor, the important part is to enable the tun mode. After that you can simply use command mihomo -f config.yaml to start it.

port: 7890
socks-port: 7891
redir-port: 7892
mode: rule
tun:
  enable: true
  stack: gvisor
  auto-route: true
  auto-redirect: true
  auto-detect-interface: true
proxies:
  -
    name: 'tor'
    type: socks5
    server: localhost
    port: 9050
proxy-groups:
  -
    name: DEFAULT
    type: select
    proxies:
      - 'tor'
rules:
  - MATCH,DEFAULT