Added nftables rules

This commit is contained in:
Sun Knudsen 2022-02-19 11:24:21 -05:00
parent 563f791258
commit 158d5eefbc
No known key found for this signature in database
GPG Key ID: 02C43AD072D57783

View File

@ -94,13 +94,24 @@ apt install -y speedtest sysbench
### Benchmark network ### Benchmark network
Depending on iptables configuration, running the following commands may be required. > Heads-up: depending on iptables or nftables firewall configuration, running following commands may be required.
#### iptables
```shell ```shell
iptables -A OUTPUT -p tcp -m tcp --dport 8080 -m state --state NEW -j ACCEPT iptables -A OUTPUT -p tcp -m tcp --dport 8080 -m state --state NEW -j ACCEPT
ip6tables -A OUTPUT -p tcp -m tcp --dport 8080 -m state --state NEW -j ACCEPT ip6tables -A OUTPUT -p tcp -m tcp --dport 8080 -m state --state NEW -j ACCEPT
``` ```
#### nftables
> Heads-up: replace `firewall` if needed (see `nft list ruleset`).
```shell
nft add rule ip firewall output tcp dport http-alt accept
nft add rule ip6 firewall output tcp dport http-alt accept
```
```console ```console
$ speedtest $ speedtest