11 lines
455 B
Bash
11 lines
455 B
Bash
#!/bin/bash
|
|
|
|
apt install -y iperf3
|
|
|
|
if [ -f "/etc/iptables/rules.v4" ]; then
|
|
sed -i '/^-A INPUT -i lo -j ACCEPT.*/a -A INPUT -p udp -m udp --dport 5201 -m state --state NEW -j ACCEPT' /etc/iptables/rules.v4
|
|
sed -i '/^-A INPUT -i lo -j ACCEPT.*/a -A INPUT -p tcp -m tcp --dport 5201 -m state --state NEW -j ACCEPT' /etc/iptables/rules.v4
|
|
sed -i '/^-A INPUT -i lo -j ACCEPT.*/a # IPERF' /etc/iptables/rules.v4
|
|
iptables-restore /etc/iptables/rules.v4
|
|
fi
|