Opened 4 years ago

Last modified 2 years ago

#17991 new enhancement

Handle non-127.0.0.1 IPv4 loopback addresses

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Minor Keywords: tor-client loopback weird-configuration ipv4 address
Cc: Actual Points:
Parent ID: Points: small/medium
Reviewer: Sponsor:

Description

In #17901, we identified some FreeBSD jails and OpenVZ VMs as having no 127.0.0.1. #17901 deals with those systems that have no loopback at all.

But some FreeBSD jails block access to 127.0.0.1, and have loopback on a valid yet unexpected address, like 127.0.0.2.

Tor could bind to any address in 127/8 (or ::1, see #11360) and be accessible locally.

One possible implementation is:

  • find all addresses on all loopback interfaces (#17949)
    • as a fallback, resolve localhost (#17953), and check that it's 127.0.0.0/8 or ::1
  • choose the address that's closest to 127.0.0.1
  • use that address as the bind address
  • If there is no 127.0.0.0/8 (or ::1) on the server, reject the *Port with a warning that tells the user to use AF_UNIX (if their system supports it), or supply an explicit IP address if they really want their *Port listening on a non-local address.

Operators can always specify an explicit bind address in the *Port line, so this isn't a serious usability issue.

Child Tickets

TicketTypeStatusOwnerSummary
#17949enhancementneeds_revisionrl1987Make loopback address search more accurate

Change History (7)

comment:1 Changed 4 years ago by teor

Milestone: Tor: 0.2.8.x-finalTor: 0.2.9.x-final

comment:2 Changed 4 years ago by nickm

Points: small/medium

comment:3 Changed 4 years ago by isabela

Milestone: Tor: 0.2.9.x-finalTor: 0.2.???

tickets market to be removed from milestone 029

comment:4 Changed 3 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:5 Changed 3 years ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:6 Changed 2 years ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:7 Changed 2 years ago by nickm

Keywords: tor-client loopback weird-configuration ipv4 address added
Note: See TracTickets for help on using tickets.