Init commit

This commit is contained in:
Mo 2022-08-05 13:49:01 +02:00
commit d651538014

35
scripts/server_setup.fish Executable file
View file

@ -0,0 +1,35 @@
#!/usr/bin/fish
set -l user admin
set -l user_home /home/$user
set -l user_config $user_home/.config
set -l fish_config $user_config/fish/config.fish
runuser -u $user -- nvim $fish_config
source $fish_config
set -l nvim_config_dir $user_config/nvim
runuser -u $user -- mkdir -p $nvim_config_dir
runuser -u $user -- nvim $nvim_config_dir/init.lua
dnf install -y \
firewalld
systemctl enable --now firewalld
echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf
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 --list-all
read -P "Continue " >/dev/null
firewall-cmd --runtime-to-permanent