summaryrefslogtreecommitdiffstats
path: root/core/modules/mgmt-sshd/data/opt/openslx/scripts/systemd-mgmt_sshd_fw
blob: 1e0758eeb1627b76b16538510c6f4b324bd4ca92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/ash

FILE="/opt/openslx/iptables/rules.d/99-mgmt-sshd"
[ -s "$FILE" ] && exit 0

. /opt/openslx/config

(
	for ip in $SLX_KCL_SERVERS; do
		echo "iptables -I ipt-helper-INPUT 1 -s $ip -p tcp --dport 9922 -j ACCEPT"
	done
	echo "iptables -A ipt-helper-INPUT -p tcp --dport 9922 -j REJECT"
) > "$FILE"
chmod +x "$FILE"

exit 0