[tor-bugs] #7875 [Tor]: debian obfsproxies can't advertise ports under 1024

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu May 9 10:00:14 UTC 2013


#7875: debian obfsproxies can't advertise ports under 1024
------------------------+---------------------------------------------------
 Reporter:  arma        |          Owner:  asn             
     Type:  defect      |         Status:  new             
 Priority:  normal      |      Milestone:  Tor: unspecified
Component:  Tor         |        Version:                  
 Keywords:  tor-bridge  |         Parent:                  
   Points:              |   Actualpoints:                  
------------------------+---------------------------------------------------

Comment(by torvlnt33r):

 Replying to [comment:4 torvlnt33r]:
 > Replying to [comment:1 flaushy]:
 > > You can grant priviledges to do so via setcap. (included in
 libcap2-bin)
 > > setcap 'cap_net_bind_service=+ep' /path/to/obfsproxy
 > >
 > > After granting this capability you are able to run obfsproxy with user
 rights on ports <1024
 > >
 >
 > This is not working for me, maybe because obfsproxy is now (version
 0.2.1) a (Python) script (see caveat 2 in the first answer on
 http://stackoverflow.com/questions/413807/is-there-a-way-for-non-root-
 processes-to-bind-to-privileged-ports-1024-on-l ).
 >

 Ok, it works if you make a copy of the script interpreter and give it the
 capabilities, as described as workaround in above reference.

 On my system, python is a symbolic link to /usr/bin/python2.7. So:
 cp /usr/bin/python2.7 /path/to/copy/of/python2.7
 setcap 'cap_net_bind_service=+ep' /path/to/copy/of/python2.7

 and add the interpreter into the ServerTransportPlugin line in torrc:
 ServerTransportPlugin obfs2,obfs3 exec /path/to/copy/of/python2.7
 /usr/bin/obfsproxy managed

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7875#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list