0

I have a computer with two interfaces connected to two different networks:

  • wlan0 should not ever be used for tor traffic.
  • tor0 should be used for outgoing traffic, but the IP is dynamic, so I cannot use OutboundBindAddress.

Is there a way to set the outgoing interface and let Tor find out the address? If it were an option, it could be OutboundBindInterface.

I'm running Debian bookworm (current stable) with the Debian package. I could modify torrc when the IP changes and then restart tor but I hope there is a cleaner, safer way (so that no tor traffic could leak out during the change, since the default route is wlan0).

2
  • Is the tor process the only thing using the "tor0" network interface?
    – Steve
    Commented Oct 14, 2023 at 21:14
  • @steve no, there are some other processes. Commented Oct 14, 2023 at 22:02

1 Answer 1

0

it's done on a firewall level: Tor is OSI Layer 4 service, so it does not know a thing about interfaces - it operates with IP addresses

4
  • I get your point but the question is not to about using the interface directly, but the IP addresses (that Tor does work on) present on said interface. "and let Tor find out the address" Commented Oct 13, 2023 at 20:59
  • the thing is that an interface can have multiple addresses on it, so Tor will not be able to choose the right one for you. That's why you must specify it explicitly
    – Alexey Vesnin
    Commented Oct 13, 2023 at 23:24
  • Yes there could be many, see my comment above, "the ip addresses present...". I guess on could set an index or something or tor could skip an interface that has more than one for each IPV4/IPV6. Note that tor already handles multiple addresses (as "the right one") in OutboundBindAddress. Anyway, all in all it's probably something Tor should not have to be concerned about. I will try to solve it at the OS level. Commented Oct 14, 2023 at 17:31
  • Yes, you should solve it on OS level. IP addresses order on interface can not be relied on by the index: you have three addresses, 1,2 and 3 - and you delete 2nd, but you will have not elements 1 and 3 but 1 and 2 when you'll query the address list after. So - yes - solve it on OS level for a bulletproof stability
    – Alexey Vesnin
    Commented Oct 19, 2023 at 16:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .