15 lines
436 B
Bash
15 lines
436 B
Bash
#!/bin/bash
|
|
|
|
apt install -y tang
|
|
|
|
# systemctl edit tangd.socket
|
|
# systemctl daemon-reload
|
|
systemctl enable tangd.socket
|
|
systemctl start tangd.socket
|
|
|
|
if [ -f "/etc/iptables/rules.v4" ]; then
|
|
sed -i '/^-A INPUT -i lo -j ACCEPT.*/a -A INPUT -p tcp -m tcp --dport 80 -m state --state NEW -j ACCEPT' /etc/iptables/rules.v4
|
|
sed -i '/^-A INPUT -i lo -j ACCEPT.*/a # TANGD' /etc/iptables/rules.v4
|
|
iptables-restore /etc/iptables/rules.v4
|
|
fi
|