Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 833
    • Issues 833
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 34
    • Merge requests 34
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #17991

Closed
Open
Created Jan 04, 2016 by teor@teor

Handle non-127.0.0.1 IPv4 loopback addresses

In legacy/trac#17901 (moved), we identified some FreeBSD jails and OpenVZ VMs as having no 127.0.0.1. legacy/trac#17901 (moved) 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 legacy/trac#11360 (moved)) and be accessible locally.

One possible implementation is:

  • find all addresses on all loopback interfaces (legacy/trac#17949 (moved))
    • as a fallback, resolve localhost (legacy/trac#17953 (moved)), 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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking