On Thu, Oct 31, 2013 at 06:12:47PM -0700, Andy Isaacson wrote:
That's correct, it takes a deliberate action on the part of the
administrator to become a relay; and another deliberate action to become
an exit relay.
Actually, that second part isn't true. Once you decide to become a relay,
the default is to exit to most popular ports.
The main reason for this choice is the number of people who've told us
that they are only able to run exit relays because "it's what Tor does
when you run a relay", and their institution wouldn't let them do it if
it required a manual config change to become an exit.
Then again, that was a long time ago, and maybe it's gotten harder to
sustain exits these days?
I think the change is actually worth making as I have seen two users being surprised by the current default behaviour. People running an exit while not fully aware of what it means usually turn unhappy.
(In any cases, we can discuss and wontfix if the previous rationale still hold.)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
I'm inclined to agree with the idea -- first because the Internet abuse landscape has changed a lot since 'the old days', but mainly because I worry about the "slash and burn agriculture" approach to running Tor relays, where you set up an exit relay, and if anybody gets angry you move on to another ISP. That approach is really appealing since it's simple, but it assumes the Internet is infinite. If in fact we're destroying land without regard to sustainability, and we run out of land...
Today's interactions with ISPs influence Tor's future viability. So if people are accidentally exit relays without knowing it, I worry as much about the damage to the ISP's view of Tor as I do about the temporary hassle for the operator.
I've got no objection here. The discussion on tor-dev seems generally positive.
Do we want to concern ourselves with migration issues and try to make sure that anybody who intentionally is using the default policy now doesn't unwillingly turn into a non-exit?
Do we want to add a way to get the "default" exit policy, now that 'don't specify an exit policy' isn't sufficient?
To mitigate the surprise for such a change, we could go through the current policy of every exit nodes and write a personal email to the one that match the current default. That involves some work in a not-so-distant future, but it should not be unreasonable.
If we want to get fancier, we should look at exit policies which inherit the default exit policy, not just ones that match it exactly. For example, somebody whose current exit policy is "reject *:80" will still be influenced by this change.
I also think we'll want a log_notice for people who don't specify any exit policy lines. I haven't figured out exactly how we should do it though. For example, that approach would preclude putting an explicit "reject ." line in the sample torrc file (which would help people understand what the default is), since then we wouldn't be able to tell whether the user had written her own exit policy or what. Maybe we want a log_notice in any case if the state file was written by 0.2.4.x or earlier, to let the operator know if she happens to be looking at the logs for the one time that they upgrade happened. Hm.
Just realized working with the default policy via stem is a little clunky. I should fix that. Anyway, in practice policies seem to mostly stick to reject-all or the default...
from stem.descriptor import remote# prefix of the default policy that's staticSTATIC_DEFAULT = "reject 0.0.0.0/8:*, reject 169.254.0.0/16:*, reject 127.0.0.0/8:*, reject 192.168.0.0/16:*, reject 10.0.0.0/8:*, reject 172.16.0.0/12:*"def replace_default(policy): """ Quick and dirty method to replace the default exit policy with 'default'. Without this most policies are unique, since they include a reject clause for their own IP. """ policy_str = str(policy) static_prefix = policy_str.find(STATIC_DEFAULT) if static_prefix == -1: return policy_str elif static_prefix == 0: return 'default' else: return policy_str[:static_prefix] + 'default'policy_counts = {}for desc in remote.DescriptorDownloader().get_server_descriptors(): policy = replace_default(desc.exit_policy) policy_counts[policy] = policy_counts.setdefault(policy, 0) + 1 # exit policies sorted by their countcounts = sorted(policy_counts.values(), reverse = True)for count in counts: for policy, policy_count in policy_counts.items(): if count == policy_count: print "%i %s" % (count, policy)
I may be reading that code wrong, but if I'm not, it doesn't do the right thing. The STATIC_DEFAULT string there just encodes "reject private:*". The default exit policy, on the other hand, is
We could have a new "ExitNode" flag, defaulting to "auto", and say that:
if ExitNode is 1, you're an exit node.
If ExitNode is 0, you are definitely not.
If ExitNode is "auto" and you have a non-reject : exit policy set, you are an exit node, and we issue a warning.
Finally, if ExitNode is "auto" and you have no exit policy set, you are not an exit node.
This last case is one I don't like, since it would break all exit nodes using exactly the default exit policy. Are there very many such nodes?
From Damian's results, it appears that my design as written above would break about 516 exits. That's too many.
We could go with a different result:
if ExitNode is 'auto' and you are a relay and have no exit policy set, then we behave as currently, but warn you that you are being an exit node, and you should set ExitNode 1 or 0. In a later version, we make ExitNode off by default.
if ExitNode is 'auto' and you are a relay and have no exit policy set, then we behave as currently, but warn you that you are being an exit node, and you should set ExitNode 1 or 0. In a later version, we make ExitNode off by default.
I hope this makes it into a release soon... The default settings should be the safest (tor relay only) for least knowledgeable users. I knew what an exit relay was and knew I didn't want to run one, but I installed TOR and didn't realize it would be an exit node by default! I ran an exit node for a day without knowing it on my home IP!
Branch for review as "exitnode_10067" in my public repository. It takes the "add a warning, and warn that the default will change" approach discussed above.
Add the nickm-patch keyword to some needs_review tickets where I wrote or substantially revised the patch. This helps me find which tickets I should review and which I should find reviewers for.
In or.h, structure or_options_t, seems that this comment is misleading. If set to "1", the relay is an exit node and uses the configured exit policy or default one if none given? (but not always the default one). Sorry to be picky but I got confused since it does not match what the commit says.
+ /** Is this an exit node? This is a tristate, where "1" means "yes,+ * and use the default exit policy" and "0" means "no; exit policy is+ * 'reject *'" and "auto" (-1) means "same as 1, but warn the user."+ *+ * XXXX Eventually, the default will be 0. */
Apart from that, looks good and I've tested it also. ACK.