streisand icon indicating copy to clipboard operation
streisand copied to clipboard

Use random ports for Tor ORPort and obfs4 port

Open nickgnazzo opened this issue 4 years ago • 1 comments

This is my attempt to address the issue raised in #101 to mitigate Streisand Tor bridges being discoverable by Internet-wide scans on ports 9443/8443 by randomizing Tor's listening ports. The original issue and dev post to the mailing list mostly talks about port 9001 which is apparently the most commonly used ORPort (Tor recommends changing it in their obfs4 setup guide). These days whenever I see public Tor bridges I'm usually seeing 9443, 8443, or 443 in many cases too. I wrote these changes to avoid using any of those ports (it chooses a random port between 1024-32768, while excluding commonly used ports and Streisand's services ports) and hopefully discourage at least some percentage of Internet-wide scans checking for Tor bridges on those ports. Though I'd imagine a scan/fingerprinting is still feasible, it'd be at least somewhat more cost-prohibitive since you'd have a much larger list of ports to probe, especially if you're only targeting "Tor" bridges and not "A-Streisand-Server-possibly-running-Tor".

Thinking about something like this more longterm though, I thought about maybe making changes to (optionally?) randomize all of Streisand's ports (SSH, VPNs/tunnels, etc.) to try and reduce the overall "Streisand" fingerprint even more, and perhaps make that a prompt/option for users. I don't know if such an option would be desired but I'm more than happy to take a stab at it if anyone has any thoughts around that!

nickgnazzo avatar Jul 24 '19 17:07 nickgnazzo

bump since this was modified after approval. i'd really like this change merged:). @Frichetten ping?

genevera avatar Feb 01 '20 20:02 genevera