Opened 5 months ago

Last modified 5 months ago

#30299 new enhancement

Switch network interface

Reported by: enriquejr99 Owned by:
Priority: Very Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor: 0.3.5.8
Severity: Normal Keywords: network, interface, vpn, torrc, dnsport
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I have standalone Tor client listening on localhost port 53 for DNS UDP packets on a Ubuntu 18.04 VM environment. This is the equivalent to setting on /etc/tor/torrc:

DNSPort 127.0.0.1:53

I also have a DNS rule on network manager set to redirect DNS packets to IP:

127.0.0.1

After following the standard OpenVPN configuration, I make a connection to the VPN server with:

openvpn --config /etc/openvpn/servers-conf/01.example.tcp.ovpn

The problem is Tor receives the DNS UDP packets, converts them to TCP packets and then attempts to send them through my main "naked" network interface to Tor relays, instead of using the secure tun0 interface. OpenVPN sees the TCP packet leaving the "naked" interface and thinks this is not safe and blocks them, which means I'm not able to resolve domain names as Tor's DNS TCP packets can't leave the system.

In order to fix this, I have to restart Tor using:

systemctl restart tor

This then updates Tor to connect to tun0 and everything works fine again however, it would make sense to have Tor update automatically or to have an option to specify a network interface order for Tor to connect to. Example:

InterfacePref: tun0, tun1, eth0

Similar to a bootloader selecting what to boot first, this means Tor would always try to connect to tun0 if available, if not it will try tun1 and else eth0. If at any time a better interface comes up Tor should switch to it automatically. A default value would still connect to the default interface as it does today.

Child Tickets

Change History (2)

comment:1 Changed 5 months ago by gk

Component: ApplicationsCore Tor/Tor
Severity: BlockerNormal

I am not convinced this is an applications bug. Maybe that's a Core Tor issue, though?

comment:2 Changed 5 months ago by nickm

Milestone: Tor: unspecified
Note: See TracTickets for help on using tickets.