[tor-bugs] #9612 [Tor]: Wrong IP used from /etc/hosts

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Aug 28 12:39:59 UTC 2013


#9612: Wrong IP used from /etc/hosts
--------------------+---------------------
 Reporter:  massar  |          Owner:
     Type:  defect  |         Status:  new
 Priority:  minor   |      Milestone:
Component:  Tor     |        Version:
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
--------------------+---------------------
 Be silly, miss-configure your /etc/hosts file, thus for a host named
 'wrongtest' (thus "hostname -a" == wrongtest.wrongdomain" matches that),
 have in /etc/hosts/

 {{{
 192.0.2.66 wrongtest.wrongdomain
 }}}

 Then have on the REAL interface (eth0) the real IP address 192.0.2.1.

 Put in torrc (next to other semi-standard things):
 {{{
 DirPort 192.0.2.1:993
 ORPort 192.0.2.1:443
 }}}

 Start tor using that, it will listen on the 192.0.2.1 IP (logs state that
 and netstat confirms), and then you will see:
 {{{
 [notice] Now checking whether ORPort192.0.2.66:443 and DirPort
 192.0.2.66:993 are reachable... (this may take up to 20 minutes -- look
 for log messages indicating success)
 [warn] Your server (192.0.2.66 :443) has not managed to confirm that its
 ORPort is reachable. Please check your firewalls, ports, address,
 /etc/hosts file, etc.
 }}}

 Yes, for some mysterious reason 192.0.2.66 is used (which is only to be
 found in /etc/hosts), even though you specified the other address...

 Now, stop tor. Fix /etc/hosts to the right IP (192.0.2.1) and restart Tor
 and everything works as it should.


 Something is causing /etc/hosts to be used which should not even be
 involved at all, might want to figure out why.

 (Of course I should not be silly and have old IPs in the configs left, but
 hey, can't blame me for that :)


 Version not selected in Trac as this pertains to the current (today/last
 hour) git version and there is no 'tor git' option in the list, but there
 are a 50 other which are very old, and nicely unsorted btw, might want to
 clean that up.

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


More information about the tor-bugs mailing list