Opened 9 years ago

Closed 8 years ago

Last modified 7 years ago

#1857 closed enhancement (implemented)

ControlListenAddress ip:port vs. ControlPort settings

Reported by: kaner Owned by: nickm
Priority: Low Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version: Tor: 0.2.1.26
Severity: Keywords: small-feature
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When configuring Tor's control port, there are currently two ways to do this:

1) Just configure "ControlPort 9051" and have Tor listen on 127.0.0.1:9051 for control connections

2) Configure "ControlListenAddress 10.0.0.1:8051" and have Tor listen on 10.0.0.1:8051. Note that this also requires ControlPort to be configured, but not necessariliy for port 8051.

Approach 2) seems counter-intuitive. If I want Tor to listen for control connections via ControlListenAddress, it should be possible to do so by simply using the ControlListenAddress option and not require the ControlPort option to be set, too. The user will be confused if she configures ip:port and Tor then asks for a ControlPort to be present. If Tor *needs* ControlPort for some reason, it should read the port value of the ip:port combination used. If thats not possible, maybe the :port part of ControlListenAddress option should go.

Child Tickets

Change History (5)

comment:1 Changed 9 years ago by arma

For background, this is the same way that ORPort / ORListenAddress works. In that case, the ORPort is what port you should put in your descriptor -- that is, what you tell other people to use externally. What you bind to locally can be something different.

We definitely shouldn't take away the :port part of ControlListenAddress. You can listen on more than one socket at once, and you specify that by multiple ControlListenAddress lines in your torrc.

I wouldn't be opposed to a wrapper function listens_for_control_conns() or something that currently would just check options->ControlPort and in your new world would check either that or ControlListenAddress.

We could also do something like that for the options->ORPort check.

comment:2 Changed 9 years ago by nickm

Milestone: Tor: 0.2.3.x-final

We should do this in 0.2.3.x or not at all.

comment:3 Changed 8 years ago by nickm

Keywords: small-feature added
Owner: set to nickm
Status: newaccepted

This should actually be a trivial extension of my orport/socksport parsing enhancements

comment:4 Changed 8 years ago by nickm

Resolution: implemented
Status: acceptedclosed

Oh hey, looks like I already did this back when I implemented the IPv6 stuff for Tor 0.2.3.9-alpha. It looks like I didn't notice it had a ticket though.

(The implemented solution is that as of 0.2.3.x, FooListenAddress is now deprecated. You can just say ControlPort 10.0.0.1:8051 and get what you want.)

comment:5 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.