<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr">Hi,</div><div dir="ltr"><br><blockquote type="cite">On 15 Apr 2020, at 01:45, Wilton Gorske <wilton@riseup.net> wrote:<br></blockquote></div><blockquote type="cite"><div dir="ltr"><span></span><br><span>Secondly, and mainly, I am working on setting up ten obsf4 bridge relays</span><br><span>on macOS and keep running into port issues, so I'm hoping to get some</span><br><span>general advice and guidance about how to set this up in the absence of</span><br><span>updated macOS tutorials online.</span><br></div></blockquote><div><br></div><div>Thanks for running Tor bridges!</div><br><blockquote type="cite"><div dir="ltr"><span>These bridge relays are going to run on one macOS server. Knowing that</span><br><span>they can each have their own dedicated IP address, could someone advise</span><br><span>how to best set up these multiple obsf4 bridge instances so each can be</span><br><span>run (tor -f /usr/local/etc/tor/torrc.1, torrc.2, torrc.3, etc...) under</span><br><span>one non-root user</span></div></blockquote><div><br></div><div>It's slightly safer to run each instance under its own user.</div><div><br></div><div>Then the keys for each instance aren't available to the other instances.</div><div><br></div><div>You might find Debian's tor-instance-create script useful:</div><div><a href="https://gitweb.torproject.org/debian/tor.git/tree/debian/tor-instance-create">https://gitweb.torproject.org/debian/tor.git/tree/debian/tor-instance-create</a></div><div><br></div><div>In particular, you can have a defaults torrc for each instance, and then</div><div>just change the addresses and ports in each instance's torrc.</div><br><blockquote type="cite"><div dir="ltr"><span>with only two public ports open on the data center</span><br><span>network (80 and 443)? I'm getting stuck at the port reachability phase,</span><br><span>and even more so when trying to run multiple instances with</span><br><span>forwarding/binding warnings.</span><br><span></span><br><span>The Application Level Firewall allows certain granted programs</span><br><span>(tor/tor-gencert/tor-print-ed-signing-cert/tor-resolve/torify/obfs4proxy)</span><br><span>the ability to open or accept a network socket. By editing the macOS</span><br><span>network system settings to route port 80 to 9005, and noting ORPort 80</span><br><span>NoListen ORPort 0.0.0.0:9005 NoAdvertise in the torrc, that works</span><br><span>correctly (including routing 443 for obfs4proxy). Running a second</span><br><span>instance is where it seems to break down. Is there a way to have</span><br><span>multiple tor instances sharing a port?</span><br></div></blockquote><div><br></div><div>No, tor doesn't support port multiplexing across multiple tor</div><div>processes,</div><div><br></div><div>Instead, tor automatically multiplexes multiple clients over the same</div><div>port, without any special configuration on the server.</div><br><blockquote type="cite"><div dir="ltr"><span>My guess is the main issue is that at the system routing level, I need a</span><br><span>way to note each IP and port so it goes to the right tor instance.</span><br><span>Currently, the forwarding is set up like:</span><br><span>rdr pass on en1 inet proto tcp from any to any port 80 -> 127.0.0.1 port</span><br><span>9005</span><br><span>I'm guessing I need some way to designate IP XX.XXX.XX.120 -> port 9005</span><br><span>(torrc.1), XX.XXX.XX.121 -> port 9006 (torrc.2), XX.XXX.XX.122 -> port</span><br><span>9007 (torrc.3), etc. Is that correct?</span><br></div></blockquote><div><br></div><div>Yes, that sounds sensible.</div><br><blockquote type="cite"><div dir="ltr"><span>A copy of my notes and configurations so far can be found here:</span><br><span>http://5jp7xtmox6jyoqd5.onion/p/ISjeXEW-vt8H1s89bwSW</span><br><span></span><br><span>Please feel free to make suggestions or edits directly in that etherpad.</span><br><span>I'm sure there are multiple ways to do this, but I definitely want to</span><br><span>make sure I am using the most secure method as opposed to the easiest or</span><br><span>quickest... Thanks for any help in advance.</span><br></div></blockquote><br><div>T</div><div><br></div></body></html>