Add ports loops

This commit is contained in:
Mo 2022-08-20 21:04:58 +02:00
parent d651538014
commit 8a8a0e04ef

View file

@ -1,5 +1,8 @@
#!/usr/bin/fish
dnf remove -y \
jq
set -l user admin
set -l user_home /home/$user
set -l user_config $user_home/.config
@ -22,12 +25,26 @@ sysctl -p
firewall-cmd --remove-service mdns
firewall-cmd --remove-forward
firewall-cmd --add-service http
firewall-cmd --add-service https
firewall-cmd --add-masquerade
firewall-cmd --add-forward-port=port=80:proto=tcp:toport=8000:toaddr=134.93.62.232
firewall-cmd --add-forward-port=port=443:proto=tcp:toport=4430:toaddr=134.93.62.232
firewall-cmd --add-forward-port=port=2222:proto=tcp:toport=2222:toaddr=134.93.62.232
firewall-cmd --add-forward-port=port=80:proto=tcp:toport=8000:toaddr=134.93.62.232 # HTTP
firewall-cmd --add-forward-port=port=443:proto=tcp:toport=4430:toaddr=134.93.62.232 # HTTPS
# TCP
for port in \
# Git SSH
2222 \
# Rustdesk
(seq 21115 21119)
firewall-cmd --add-forward-port=port=$port:proto=tcp:toport=$port:toaddr=134.93.62.232
end
# UPD
for port in \
# Rustdesk
21116
firewall-cmd --add-forward-port=port=$port:proto=udp:toport=$port:toaddr=134.93.62.232
end
firewall-cmd --list-all
read -P "Continue " >/dev/null