Re: [tor-relays] Tor DDoS Mitigation iptables scripts update. Version 4.0.1

Hi Andres, Not at all. That's how I'm running my own relays. Just run the **combined.sh** on each individual VM and you'll be fine. As for the ORPort, yes, I agree. There are ways to read the torrc file and set the ORPort automatically. I will incorporate that into the scripts in future versions. My original intention was to put something simple together with minimum complexity that anyone with little or no expertise can understand and modify if necessary without breaking the code. I've also set up a [Discussion Board](https://github.com/Enkidu-6/tor-ddos/discussions) for the repository on github in case you have any questions, suggestions or simply need further help. On 12/1/2022 11:57 AM, Anders Trier Olesen wrote:

Hi Chris
Not at all. That's how I'm running my own relays. Just run the **combined.sh** on each individual VM and you'll be fine.
We do not run VMs. We run 12 Tor instances on a single host, and use ORPort + OutboundBindAddress to separate them. I.e: root@tor-exit:/etc/tor/instances# grep 'OutboundBindAddress\|ORPort' */torrc dotsrcExit1/torrc:ORPort 185.129.61.1:443 dotsrcExit1/torrc:ORPort [2001:67c:89c:702:1ce:1ce:babe:1]:443 dotsrcExit1/torrc:OutboundBindAddress 185.129.61.1 dotsrcExit1/torrc:OutboundBindAddress [2001:67c:89c:702:1ce:1ce:babe:1] dotsrcExit10/torrc:ORPort 185.129.61.10:443 dotsrcExit10/torrc:ORPort [2001:67c:89c:702:1ce:1ce:babe:10]:443 dotsrcExit10/torrc:OutboundBindAddress 185.129.61.10 dotsrcExit10/torrc:OutboundBindAddress [2001:67c:89c:702:1ce:1ce:babe:10] dotsrcExit2/torrc:ORPort 185.129.61.2:443 dotsrcExit2/torrc:ORPort [2001:67c:89c:702:1ce:1ce:babe:2]:443 dotsrcExit2/torrc:OutboundBindAddress 185.129.61.2 dotsrcExit2/torrc:OutboundBindAddress [2001:67c:89c:702:1ce:1ce:babe:2] dotsrcExit3/torrc:ORPort 185.129.61.3:443 dotsrcExit3/torrc:ORPort [2001:67c:89c:702:1ce:1ce:babe:3]:443 dotsrcExit3/torrc:OutboundBindAddress 185.129.61.3 dotsrcExit3/torrc:OutboundBindAddress [2001:67c:89c:702:1ce:1ce:babe:3] dotsrcExit4/torrc:ORPort 185.129.61.4:443 dotsrcExit4/torrc:ORPort [2001:67c:89c:702:1ce:1ce:babe:4]:443 dotsrcExit4/torrc:OutboundBindAddress 185.129.61.4 dotsrcExit4/torrc:OutboundBindAddress [2001:67c:89c:702:1ce:1ce:babe:4] dotsrcExit5/torrc:ORPort 185.129.61.5:443 dotsrcExit5/torrc:ORPort [2001:67c:89c:702:1ce:1ce:babe:5]:443 dotsrcExit5/torrc:OutboundBindAddress 185.129.61.5 dotsrcExit5/torrc:OutboundBindAddress [2001:67c:89c:702:1ce:1ce:babe:5] dotsrcExit6/torrc:ORPort 185.129.61.6:443 dotsrcExit6/torrc:ORPort [2001:67c:89c:702:1ce:1ce:babe:6]:443 dotsrcExit6/torrc:OutboundBindAddress 185.129.61.6 dotsrcExit6/torrc:OutboundBindAddress [2001:67c:89c:702:1ce:1ce:babe:6] dotsrcExit7/torrc:ORPort 185.129.61.7:443 dotsrcExit7/torrc:ORPort [2001:67c:89c:702:1ce:1ce:babe:7]:443 dotsrcExit7/torrc:OutboundBindAddress 185.129.61.7 dotsrcExit7/torrc:OutboundBindAddress [2001:67c:89c:702:1ce:1ce:babe:7] dotsrcExit8/torrc:ORPort 185.129.61.8:443 dotsrcExit8/torrc:ORPort [2001:67c:89c:702:1ce:1ce:babe:8]:443 dotsrcExit8/torrc:OutboundBindAddress 185.129.61.8 dotsrcExit8/torrc:OutboundBindAddress [2001:67c:89c:702:1ce:1ce:babe:8] dotsrcExit9/torrc:ORPort 185.129.61.9:443 dotsrcExit9/torrc:ORPort [2001:67c:89c:702:1ce:1ce:babe:9]:443 dotsrcExit9/torrc:OutboundBindAddress 185.129.61.9 dotsrcExit9/torrc:OutboundBindAddress [2001:67c:89c:702:1ce:1ce:babe:9] dotsrcRelay1/torrc:ORPort 130.225.244.90:443 dotsrcRelay1/torrc:ORPort [2001:878:346:1cf9:446a:c4eb:4548:7061]:443 dotsrcRelay1/torrc:OutboundBindAddress 130.225.244.90 dotsrcRelay1/torrc:OutboundBindAddress [2001:878:346:1cf9:446a:c4eb:4548:7061] dotsrcRelay2/torrc:ORPort 130.225.244.90:9001 dotsrcRelay2/torrc:ORPort [2001:878:346:1cf9:446a:c4eb:4548:7062]:9001 dotsrcRelay2/torrc:OutboundBindAddress 130.225.244.90 dotsrcRelay2/torrc:OutboundBindAddress [2001:878:346:1cf9:446a:c4eb:4548:7062] root@tor-exit:~# ip -br a lo UNKNOWN 127.0.0.1/8 ::1/128 eth0@if11 UP 130.225.244.90/30 130.225.254.114/27 185.129.61.1/24 185.129.61.2/24 185.129.61.3/24 185.129.61.4/24 185.129.61.5/24 185.129.61.6/24 185.129.61.7/24 185.129.61.8/24 185.129.61.9/24 185.129.61.10/24 2001:67c:89c:702:1ce:1ce:babe:10/48 2001:67c:89c:702:1ce:1ce:babe:9/48 2001:67c:89c:702:1ce:1ce:babe:8/48 2001:67c:89c:702:1ce:1ce:babe:7/48 2001:67c:89c:702:1ce:1ce:babe:6/48 2001:67c:89c:702:1ce:1ce:babe:5/48 2001:67c:89c:702:1ce:1ce:babe:4/48 2001:67c:89c:702:1ce:1ce:babe:3/48 2001:67c:89c:702:1ce:1ce:babe:2/48 2001:67c:89c:702:1ce:1ce:babe:1/48 2001:878:346::114/48 2001:878:346:1cf9:446a:c4eb:4548:7062/48 2001:878:346:1cf9:446a:c4eb:4548:7061/48 fe80::216:3eff:fed5:6809/64 root@tor-exit:~# ss -s Total: 139982 TCP: 148318 (estab 128481, closed 8757, orphaned 527, timewait 8744) Transport Total IP IPv6 RAW 1 0 1 UDP 247 193 54 TCP 139561 125849 13712 INET 139809 126042 13767 FRAG 0 0 0 It would be really nice if you could update the scripts to support this kind of setup! And maybe also consider using plain nftables instead of relying on the legacy iptables compatibility layer :) Best regards Anders On Thu, Dec 1, 2022 at 6:42 PM Chris <tor@wcbsecurity.com> wrote:

I see. I put together a script that will apply the rules to two addresses at a time. I suggest that you run it for two of your relays and see if it helps. If it does, all you have to do is change the IP Addresses and run the script again until all your addresses are covered. It won't conflict with the other rules. And if it doesn't do what you're looking for, the script makes a back up of your existing iptables rules. All you have to do is restore it and everything goes back to how it was without having to reboot. You should save that backup somewhere else as the second time you run the script, the original back up will be overwritten. you can get it here: https://raw.githubusercontent.com/Enkidu-6/tor-ddos/dev/multiple/multi-addr.... Please note that this script won't work for the relay that has two ORPorts. For that, you need to run the following script: https://github.com/Enkidu-6/tor-ddos/blob/dev/multiple/two-or.sh Let me know how it goes if you decide to have a go at it. Cheers. On 12/3/2022 6:29 AM, Anders Trier Olesen wrote:
participants (2)
-
Anders Trier Olesen
-
Chris