# Tor DDoS Mitigation iptables scripts update. Version 7.0.0

**URL:** https://forum.torproject.org/t/tor-ddos-mitigation-iptables-scripts-update-version-7-0-0/11847
**Category:** Relay Operator
**Created:** [March 8, 2024, 1:43am UTC](https://forum.torproject.org/t/tor-ddos-mitigation-iptables-scripts-update-version-7-0-0/11847 "2024-03-08T01:43:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Enkidu-6](https://forum.torproject.org/user_avatar/forum.torproject.org/enkidu-6/32/4573_2.png) [@Enkidu-6](https://forum.torproject.org/u/Enkidu-6)
#### Post date: [March 8, 2024, 1:43am UTC](https://forum.torproject.org/t/tor-ddos-mitigation-iptables-scripts-update-version-7-0-0/11847/1 "2024-03-08T01:43:39Z")

</div>

A New version of the tor-ddos iptables rules modified slightly to deal with the current ongoing attack is now available.

> **[GitHub - Enkidu-6/tor-ddos: iptables rules for Tor relay operators to...](https://github.com/Enkidu-6/tor-ddos)**
>
> iptables rules for Tor relay operators to mitigate ddos - Enkidu-6/tor-ddos

[Change log](https://github.com/Enkidu-6/tor-ddos/releases)

It is now easier for you to apply the rules by simply running:

```auto
bash <(curl -Ls https://raw.githubusercontent.com/Enkidu-6/tor-ddos/main/download.sh)

```

The script will do the rest by asking you a few questions, taking care of dependencies on Ubuntu and Debian, as they don’t come with ipset and conntrack by default - and then applying the rules. It will also give you the option to upgrade from previous versions.

Background:

A set of bash scripts used to apply iptables rules to fight the current  
DDoS attacks.

> **[Provide a recommended set of iptables/nftables rules to help in case of DoS...](https://gitlab.torproject.org/tpo/community/support/-/issues/40093)**
>
> A bunch of DoS attacks are essentially ongoing since June 2022 and we discussed a bunch of potential solution to improve things for our users. One thing folks...

---

<div class="post-metadata">

### Author: ![sunshinecowboy](https://forum.torproject.org/user_avatar/forum.torproject.org/sunshinecowboy/32/4558_2.png) [@sunshinecowboy](https://forum.torproject.org/u/sunshinecowboy)
#### Post date: [March 10, 2024, 10:03am UTC](https://forum.torproject.org/t/tor-ddos-mitigation-iptables-scripts-update-version-7-0-0/11847/2 "2024-03-10T10:03:50Z")

</div>

Just tried to run and line 28 in start.sh saying multi.sh is unable to execute so the install errors out.

When executing multi.sh I get a syntax error on line 3.

---

<div class="post-metadata">

### Author: ![Enkidu-6](https://forum.torproject.org/user_avatar/forum.torproject.org/enkidu-6/32/4573_2.png) [@Enkidu-6](https://forum.torproject.org/u/Enkidu-6)
#### Post date: [March 11, 2024, 8:18am UTC](https://forum.torproject.org/t/tor-ddos-mitigation-iptables-scripts-update-version-7-0-0/11847/3 "2024-03-11T08:18:24Z")

</div>

My apologies. I’d changed a setting and forgot to change it back and a few CRLF were inserted in the code. They are present in start.sh, multi.sh, update.sh

I’ve since fixed it and added a new line of code suggested by **[PacaAlpaca](https://github.com/PacaAlpaca)** as well. Please download the new version:

```auto
bash <(curl -Ls https://raw.githubusercontent.com/Enkidu-6/tor-ddos/main/download.sh)

```

Alternatively, as a quick fix, you can type:

```auto
sed -i -e 's/\r$//' scriptname.sh

```

Thanks for reporting it.
