Tim Wilson-Brown
E: twilsonb(a)mac.com
> Date: Mon, 18 Aug 2014 05:04:31 +0200
> From: Sebastian Hahn <mail(a)sebastianhahn.net>
> To: tor-relays(a)lists.torproject.org
> Subject: Re: [tor-relays] Dynamic IP
> Message-ID: <CD0E96E4-2BFA-4FAA-BC19-C3320AC46F08(a)sebastianhahn.net>
> Content-Type: text/plain; charset=us-ascii
>
> Hi Tim,
>
>> Sebastien, I run a relay on a machine that has an internal private IP, behind a NAT router with a public IP.
>>
>> In my experience, I need to specify the NAT router's public IP in the torrc, otherwise tor doesn't include it in the router descriptor it submits to the consensus.
>
> This shouldn't happen typically, Tor tries to learn its IP address by
> looking at the traffic it receives.
>
>> If that process isn't working for me, is this a bug I should report?
>
> Likely. Can you try again, noting the kind of log messages Tor might
> emit?
>
I apologise, Sebastien, it appears I was not waiting long enough for the router to connect to a directory, then use the headers to find its IP. I had always assumed that the first series of failures to find an IP (before any directories were contacted) was permanent.
This is the debug log output from a secondary test router that I configured on the same IP:
Aug 18 17:47:20.558 [info] {CONFIG} int resolve_my_address(int, const or_options_t *, uint32_t *, const char **, char **)(): Guessed local hostname 'REDACTED.local' resolves to a private IP address (192.168.REDACTED.REDACTED). Trying something else.
Aug 18 17:47:20.558 [info] {CONFIG} int resolve_my_address(int, const or_options_t *, uint32_t *, const char **, char **)(): Interface IP address '192.168.REDACTED.REDACTED' is a private address too. Ignoring.
Aug 18 17:47:20.558 [info] {CONFIG} int resolve_my_address(int, const or_options_t *, uint32_t *, const char **, char **)(): Address 'REDACTED.local' resolves to private IP address '192.168.REDACTED.REDACTED'. Tor servers that use the default DirAuthorities must have public IP addresses.
Aug 18 17:47:20.558 [info] {CONFIG} int router_pick_published_address(const or_options_t *, uint32_t *)(): Could not determine our address locally. Checking if directory headers provide any hints.
Aug 18 17:47:20.558 [info] {CONFIG} int router_pick_published_address(const or_options_t *, uint32_t *)(): Success: chose address '121.REDACTED.REDACTED.REDACTED'.
Once the test router appears in the consensus, I'll make similar changes to the primary router (and it will pick them up on the next restart!)
Tim