Opened 15 years ago

Last modified 8 years ago

#244 closed enhancement (Implemented)

please detect your Tor server's IP address through NAT too

Reported by: weasel Owned by:
Priority: Low Milestone: 0.2.0.x-final
Component: Core Tor/Tor Version:
Severity: Keywords:
Cc: weasel, arma, nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


A user wrote:

One request is the ability of tor to
discover by himself the public IP when natted without me edit the torrc or
the /etc/hosts...maybe some functions that run every once that check and
maybe change the address...this is useful if you have the server running all
day but the connection is not so reliable.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (14)

comment:1 Changed 15 years ago by nickm

This would be lovely. Does anybody have any ideas on how to do it?

comment:2 Changed 14 years ago by nickm

Looks like we've scheduled this for 0.1.2:

  • dir answers include a your-ip-address-is header, so we can break our dependency on dyndns.

comment:3 Changed 14 years ago by arma

This works in current svn trunk now.

But the real answer is to put it inside the NETINFO cells that we have
planned for 0.1.3, since the directory answers are unauthenticated so
all sorts of bad things could happen.

So leaving the flyspray open until we've got the better answer implemented.

comment:4 Changed 14 years ago by keybounce

Odd that you say it works with the current version -- I'm running 23, with vidalia, and even when I check "update automatically" I still need to go back in with vidialia and re-update it.

My network: I'm behind a DSL NAT gateway, that knows to forward tor traffic to my machine inside the network. My local IP is always a 192.168.1.n, and my external IP changes after anywhere from 8 hours to one week.

comment:5 Changed 14 years ago by arma

Michael: I'm not sure what version "23" is, but I doubt it's the current SVN. :)

Try instead.

Also, Vidalia doesn't know about this feature yet, so you're probably better off
unchecking whatever "auto detect" boxes it has, for now, if you're using a new
enough Tor version.

comment:6 Changed 14 years ago by nickm

This is implemented, right? Can we close this?

comment:7 Changed 14 years ago by arma

There are two flaws:

A) It's not authenticated. Need to use the NETINFO cells above. Not for 0.1.2.x though.

B) As we move to tunnelling dir connections, servers never do any plaintext HTTP
requests, so they never hear any guesses about their IP address, so this feature
becomes moot.

I suppose we can close this flyspray with intent to open a new one later. :)

comment:8 Changed 14 years ago by nickm

To be fair, point B in the previous comment is now moot: on BEGIN_DIR cells, we set
dir_conn->_base.address (which in turn sets the value given for X-Your-Address-Is) to
the address of the connection from which we received the connection in the first place.
Thus, if we tunneled the connection only a single hop, we can use the value as-is.

comment:9 Changed 14 years ago by phobos

This functionality appears to work fine in It even seems to detect external IP address changes successfully.

comment:10 Changed 13 years ago by phobos

Shall we consider this as implemented and working?

comment:11 Changed 13 years ago by nickm

Roger: any reason not to consider this implemented?

comment:12 Changed 13 years ago by arma

Closing, since it's good enough for now. We still do need to do the NETINFO thing,
but we know that, and an old flyspray entry won't really influence that.

comment:13 Changed 13 years ago by arma

flyspray2trac: bug closed.

comment:14 Changed 8 years ago by nickm

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