[tor-bugs] #4696 [Tor Relay]: add OutboundBindInterface option to torrc

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Tue Dec 13 17:07:17 UTC 2011

#4696: add OutboundBindInterface option to torrc
 Reporter:  mr-4         |          Owner:                  
     Type:  enhancement  |         Status:  new             
 Priority:  normal       |      Milestone:  Tor: unspecified
Component:  Tor Relay    |        Version:  Tor:   
 Keywords:               |         Parent:                  
   Points:               |   Actualpoints:                  

Comment(by mr-4):

 Replying to [comment:1 arma]:
 > Sounds nice. Does it come with a patch, or are you hoping somebody will
 write one? :) One challenge will be to learn how to look up the interface
 address in a portable way.
 Quick 'n' dirty shell script function:

 find_first_interface_address() { # $1 = interface, $IP contains the full
 path & name of the "ip" program
   addr=$(${IP:-ip} -f inet addr show $1 2> /dev/null | grep 'inet .*
 global' | head -n1)
   [ -n "$addr" ] || startup_error "Can't determine the IP address of $1"
     # Strip off the trailing VLSM mask (or the peer IP in case of a P-t-P
     # along with everything else on the line
     echo $addr | sed 's/\s*inet //;s/\/.*//;s/ peer.*//'

 I can't claim credit for this as it was initially designed by Thomas
 Eastep (the creator of Shorewall -> shorewall.org). Doing something
 similar, internally, by Tor would be nice...

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

More information about the tor-bugs mailing list