<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><br><div>On 19 Dec 2017, at 10:10, r1610091651 <<a href="mailto:r1610091651@telenet.be">r1610091651@telenet.be</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">I don't quite understand the last calculation.</div></div></blockquote><div><br></div><div>It's a slightly better approximation that my wild guess.</div><br><blockquote type="cite"><div><div dir="ltr"><div>"<span style="color:rgb(33,33,33)">if all 65535 connections on an IP were open" => I'm guessing you mean ports</span></div></div></div></blockquote><div><br></div><div>No, I mean:</div><div>"let's use 65535 as the approximate limit on connections from behind a NAT,</div><div>even though it could be larger or smaller depending on the bandwidth and</div><div>RAM available to the NAT"</div><div><br></div><div>The technical limit is the number of unique (source IP, source port,</div><div>destination IP, destination port) tuples, or 65535 per source IP to every</div><div>unique Tor ORPort. But that's hardly ever reached.</div><br><blockquote type="cite"><div><div dir="ltr"><div><span style="color:rgb(33,33,33)">"</span><span style="color:rgb(33,33,33)">the biggest Tor Guard has 0.91% Guard probability</span><span style="color:rgb(33,33,33)">" => percentage of all entries into the network handled by this guard</span></div><div><span style="color:rgb(33,33,33)"><br></span></div><div><span style="color:rgb(33,33,33)">=> 0.91% of all user connections</span></div><div><span style="color:rgb(33,33,33)">but how many user connections are there at a time?</span></div></div></div></blockquote><div><br></div><div>Let's assume there are at most 65535 connections at once time from every </div><div>source IP into the Tor network.</div><br><blockquote type="cite"><div><div dir="ltr"><div><span style="color:rgb(33,33,33)">and then don't understand how probability and ports availability can be combined?</span></div></div></div></blockquote><div><br></div><div>If there are 65535 connections open from a source IP, and they all go to</div><div>Tor Guards, and the clients weight connections according to Guard</div><div>probability, then the largest guard will have 0.91% of 65535 connections,</div><div>or approximately 597.</div><div><br></div><div>Most guards would see 10-200 connections per IP.</div><div><br></div><div>T</div><br><blockquote type="cite"><div><div class="gmail_quote"><div dir="ltr">On Mon, 18 Dec 2017 at 23:11 teor <<a href="mailto:teor2345@gmail.com">teor2345@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> On 19 Dec 2017, at 08:38, Toralf Förster <<a href="mailto:toralf.foerster@gmx.de" target="_blank">toralf.foerster@gmx.de</a>> wrote:<br>
><br>
> On 12/17/2017 10:24 PM, teor wrote:<br>
>> Using 256 per IP is probably reasonable.<br>
><br>
> Is this a rather arbitrary limit or does this limit fit the use of NATed addresses entirely ?<br>
<br>
That's an arbitrary safe upper bound.<br>
<br>
The number of active connections that can be NATed per IP address is<br>
limited by the number of ports: 65535. (Technically, it's 65535 per<br>
remote IP address and port, but most NATs don't have that much RAM<br>
or bandwidth.)<br>
<br>
Also, genuine users behind a NAT would likely have multiple Tor and<br>
non-Tor connections open. And spare ports are needed for NAT to manage<br>
port churn and the TCP delay wait state on connection close.<br>
<br>
To be more precise:<br>
* if all 65535 connections on an IP were open to the Tor network, and<br>
* the biggest Tor Guard has 0.91% Guard probability[0], then<br>
* it would expect to see 597 connections.<br>
<br>
Feel free to do the sums for your own guard's probability.<br>
<br>
(We are aware of the issue, and we are working on a more permanent fix.)<br>
<br>
[0]: <a href="https://atlas.torproject.org/#details/9844B981A80B3E4B50897098E2D65167E6AEF127" rel="noreferrer" target="_blank">https://atlas.torproject.org/#details/9844B981A80B3E4B50897098E2D65167E6AEF127</a><br>
<br>
<br>
T<br>
<br>
--<br>
Tim Wilson-Brown (teor)<br>
<br>
teor2345 at gmail dot com<br>
PGP C855 6CED 5D90 A0C5 29F6 4D43 450C BA7F 968F 094B<br>
ricochet:ekmygaiu4rzgsk6n<br>
xmpp: teor at torproject dot org<br>
------------------------------------------------------------------------<br>
<br>
<br>
<br>
_______________________________________________<br>
tor-relays mailing list<br>
<a href="mailto:tor-relays@lists.torproject.org" target="_blank">tor-relays@lists.torproject.org</a><br>
<a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays" rel="noreferrer" target="_blank">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays</a><br>
</blockquote></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>tor-relays mailing list</span><br><span><a href="mailto:tor-relays@lists.torproject.org">tor-relays@lists.torproject.org</a></span><br><span><a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays</a></span><br></div></blockquote></body></html>