<div dir="ltr"><div dir="ltr"><div dir="ltr">On Thu, 24 Sep 2020 at 13:33, Vasil Dimov <<a href="mailto:vd@freebsd.org">vd@freebsd.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
Which creates a hidden service addrwhatever.onion. Later somebody<br>
connects to addrwhatever.onion:8333 and the tor daemon opens a TCP<br>
connection like <a href="http://127.0.0.1:46153" rel="noreferrer" target="_blank">127.0.0.1:46153</a> -> <a href="http://127.0.0.1:8333" rel="noreferrer" target="_blank">127.0.0.1:8333</a>. Next, some other<br>
application (not the tor daemon) connects directly to <a href="http://127.0.0.1:8333" rel="noreferrer" target="_blank">127.0.0.1:8333</a><br>
and that is <a href="http://127.0.0.1:52490" rel="noreferrer" target="_blank">127.0.0.1:52490</a> -> <a href="http://127.0.0.1:8333" rel="noreferrer" target="_blank">127.0.0.1:8333</a>.<br>
<br>
What if the application running at <a href="http://127.0.0.1:8333" rel="noreferrer" target="_blank">127.0.0.1:8333</a> wants to distinguish<br>
incoming tor connections from the rest? From its point of view the<br>
connections from the example above are just TCP connections coming from<br>
<a href="http://127.0.0.1:46153" rel="noreferrer" target="_blank">127.0.0.1:46153</a> and <a href="http://127.0.0.1:52490" rel="noreferrer" target="_blank">127.0.0.1:52490</a>.<br></blockquote><div><br></div><div>I describe a useful workaround for this issue by using virtual IP addresses, in this document but especially in this section:</div><div><br></div><div>  <a href="https://github.com/alecmuffett/the-onion-diaries/blob/master/basic-production-onion-server.md#how-this-works">https://github.com/alecmuffett/the-onion-diaries/blob/master/basic-production-onion-server.md#how-this-works</a><br></div><div><br></div><div>...which also has the benefit of providing better auditability.</div><div><br></div><div>- alec</div><div><br></div><div> </div></div>-- <br><div dir="ltr" class="gmail_signature"><a href="http://dropsafe.crypticide.com/aboutalecm" target="_blank">http://dropsafe.crypticide.com/aboutalecm</a><br></div></div></div>