mirror of
https://github.com/tommytran732/Linux-Setup-Scripts
synced 2024-11-25 02:31:34 -05:00
Update modprobe url and bug fixes
This commit is contained in:
parent
e04febb0fe
commit
d96f5a70da
@ -62,13 +62,14 @@ sudo chmod 644 /etc/ssh/sshd_config.d/10-custom.conf
|
||||
unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/ssh/ssh_config.d/10-custom.conf | sudo tee /etc/ssh/ssh_config.d/10-custom.conf > /dev/null
|
||||
sudo chmod 644 /etc/ssh/ssh_config.d/10-custom.conf
|
||||
sudo mkdir -p /etc/systemd/system/sshd.service.d/
|
||||
sudo chmod 755 /etc/systemd/system/sshd.service.d/
|
||||
unpriv curl -s https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/systemd/system/sshd.service.d/local.conf | sudo tee /etc/systemd/system/sshd.service.d/override.conf > /dev/null
|
||||
sudo chmod 644 /etc/systemd/system/sshd.service.d/override.conf
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart sshd
|
||||
|
||||
# Security kernel settings
|
||||
unpriv curl -s https://raw.githubusercontent.com/secureblue/secureblue/live/config/files/usr/etc/modprobe.d/blacklist.conf | sudo tee /etc/modprobe.d/server-blacklist.conf > /dev/null
|
||||
unpriv curl -s https://raw.githubusercontent.com/secureblue/secureblue/live/files/system/usr/etc/modprobe.d/blacklist.conf | sudo tee /etc/modprobe.d/server-blacklist.conf > /dev/null
|
||||
sudo chmod 644 /etc/modprobe.d/server-blacklist.conf
|
||||
unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/sysctl.d/99-server.conf | sudo tee /etc/sysctl.d/99-server.conf > /dev/null
|
||||
sudo chmod 644 /etc/sysctl.d/99-server.conf
|
||||
@ -162,6 +163,7 @@ else
|
||||
fi
|
||||
|
||||
# Setup networking
|
||||
sudo systemctl enable --now firewalld
|
||||
sudo firewall-cmd --permanent --remove-service=cockpit
|
||||
sudo firewall-cmd --reload
|
||||
sudo firewall-cmd --lockdown-on
|
||||
|
@ -67,7 +67,7 @@ sudo chmod 644 /etc/ssh/ssh_config.d/10-custom.conf
|
||||
if [ "${virtualization}" = 'parallels' ]; then
|
||||
unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Kernel-Module-Blacklist/main/etc/modprobe.d/workstation-blacklist.conf | sudo tee /etc/modprobe.d/workstation-blacklist.conf > /dev/null
|
||||
else
|
||||
unpriv curl -s https://raw.githubusercontent.com/secureblue/secureblue/live/config/files/usr/etc/modprobe.d/blacklist.conf | sudo tee /etc/modprobe.d/workstation-blacklist.conf > /dev/null
|
||||
unpriv curl -s https://raw.githubusercontent.com/secureblue/secureblue/live/files/system/usr/etc/modprobe.d/blacklist.conf | sudo tee /etc/modprobe.d/workstation-blacklist.conf > /dev/null
|
||||
fi
|
||||
sudo chmod 644 /etc/modprobe.d/workstation-blacklist.conf
|
||||
unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/sysctl.d/99-workstation.conf | sudo tee /etc/sysctl.d/99-workstation.conf > /dev/null
|
||||
@ -241,6 +241,7 @@ else
|
||||
fi
|
||||
|
||||
# Setup networking
|
||||
sudo systemctl enable --now firewalld
|
||||
sudo firewall-cmd --set-default-zone=block
|
||||
sudo firewall-cmd --permanent --add-service=dhcpv6-client
|
||||
sudo firewall-cmd --reload
|
||||
|
@ -37,7 +37,8 @@ systemctl restart chronyd
|
||||
curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/ssh/sshd_config.d/10-custom.conf | tee /etc/ssh/sshd_config.d/10-custom.conf > /dev/null
|
||||
sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config.d/10-custom.conf
|
||||
curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/ssh/ssh_config.d/10-custom.conf | tee /etc/ssh/ssh_config.d/10-custom.conf > /dev/null
|
||||
mkdir -p /etc/systemd/system/ssh.service.d
|
||||
sudo mkdir -p /etc/systemd/system/sshd.service.d/
|
||||
sudo chmod 755 /etc/systemd/system/sshd.service.d/
|
||||
curl -s https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/systemd/system/sshd.service.d/local.conf | tee /etc/systemd/system/ssh.service.d/override.conf > /dev/null
|
||||
systemctl daemon-reload
|
||||
systemctl restart sshd
|
||||
@ -73,7 +74,7 @@ proxmox-boot-tool refresh
|
||||
###
|
||||
|
||||
# Kernel hardening
|
||||
curl -s https://raw.githubusercontent.com/secureblue/secureblue/live/config/files/usr/etc/modprobe.d/blacklist.conf | tee /etc/modprobe.d/server-blacklist.conf > /dev/null
|
||||
curl -s https://raw.githubusercontent.com/secureblue/secureblue/live/files/system/usr/etc/modprobe.d/blacklist.conf | tee /etc/modprobe.d/server-blacklist.conf > /dev/null
|
||||
curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/sysctl.d/99-server.conf | tee /etc/sysctl.d/99-server.conf > /dev/null
|
||||
sysctl -p
|
||||
|
||||
|
@ -56,12 +56,14 @@ unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Script
|
||||
sudo chmod 644 /etc/ssh/sshd_config.d/10-custom.conf
|
||||
unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/ssh/ssh_config.d/10-custom.conf | sudo tee /etc/ssh/ssh_config.d/10-custom.conf > /dev/null
|
||||
sudo chmod 644 /etc/ssh/ssh_config.d/10-custom.conf
|
||||
sudo mkdir -p /etc/systemd/system/sshd.service.d/
|
||||
sudo chmod 755 /etc/systemd/system/sshd.service.d/
|
||||
unpriv curl -s https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/systemd/system/sshd.service.d/local.conf | sudo tee /etc/systemd/system/sshd.service.d/override.conf > /dev/null
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart sshd
|
||||
|
||||
# Security kernel settings
|
||||
unpriv curl -s https://raw.githubusercontent.com/secureblue/secureblue/live/config/files/usr/etc/modprobe.d/blacklist.conf | sudo tee /etc/modprobe.d/server-blacklist.conf > /dev/null
|
||||
unpriv curl -s https://raw.githubusercontent.com/secureblue/secureblue/live/files/system/usr/etc/modprobe.d/blacklist.conf | sudo tee /etc/modprobe.d/server-blacklist.conf > /dev/null
|
||||
sudo chmod 644 /etc/modprobe.d/server-blacklist.conf
|
||||
unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/sysctl.d/99-server.conf | sudo tee /etc/sysctl.d/99-server.conf > /dev/null
|
||||
sudo chmod 644 /etc/sysctl.d/99-server.conf
|
||||
@ -184,6 +186,7 @@ else
|
||||
fi
|
||||
|
||||
# Setup networking
|
||||
sudo systemctl enable --now firewalld
|
||||
sudo firewall-cmd --permanent --remove-service=cockpit
|
||||
sudo firewall-cmd --reload
|
||||
sudo firewall-cmd --lockdown-on
|
||||
|
@ -60,7 +60,7 @@ if [ "${virtualization}" = 'parallels' ]; then
|
||||
unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Kernel-Module-Blacklist/main/etc/modprobe.d/workstation-blacklist.conf | sudo tee /etc/modprobe.d/workstation-blacklist.conf > /dev/null
|
||||
sudo chmod 644 /etc/modprobe.d/workstation-blacklist.conf
|
||||
else
|
||||
unpriv curl -s https://raw.githubusercontent.com/secureblue/secureblue/live/config/files/usr/etc/modprobe.d/blacklist.conf | sudo tee /etc/modprobe.d/workstation-blacklist.conf > /dev/null
|
||||
unpriv curl -s https://raw.githubusercontent.com/secureblue/secureblue/live/files/system/usr/etc/modprobe.d/blacklist.conf | sudo tee /etc/modprobe.d/workstation-blacklist.conf > /dev/null
|
||||
sudo chmod 644 /etc/modprobe.d/workstation-blacklist.conf
|
||||
fi
|
||||
sudo chmod 644 /etc/modprobe.d/workstation-blacklist.conf
|
||||
|
@ -55,14 +55,15 @@ unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Script
|
||||
sudo chmod 644 /etc/ssh/sshd_config.d/10-custom.conf
|
||||
unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/ssh/ssh_config.d/10-custom.conf | sudo tee /etc/ssh/ssh_config.d/10-custom.conf > /dev/null
|
||||
sudo chmod 644 /etc/ssh/ssh_config.d/10-custom.conf
|
||||
sudo mkdir -p /etc/systemd/system/ssh.service.d
|
||||
sudo mkdir -p /etc/systemd/system/sshd.service.d/
|
||||
sudo chmod 755 /etc/systemd/system/sshd.service.d/
|
||||
unpriv curl -s https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/systemd/system/sshd.service.d/local.conf | sudo tee /etc/systemd/system/ssh.service.d/override.conf > /dev/null
|
||||
sudo chmod 644 /etc/systemd/system/ssh.service.d/override.conf
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart ssh
|
||||
|
||||
# Security kernel settings
|
||||
unpriv curl -s https://raw.githubusercontent.com/secureblue/secureblue/live/config/files/usr/etc/modprobe.d/blacklist.conf | sudo tee /etc/modprobe.d/server-blacklist.conf > /dev/null
|
||||
unpriv curl -s https://raw.githubusercontent.com/secureblue/secureblue/live/files/system/usr/etc/modprobe.d/blacklist.conf | sudo tee /etc/modprobe.d/server-blacklist.conf > /dev/null
|
||||
sudo chmod 644 /etc/modprobe.d/server-blacklist.conf
|
||||
unpriv curl -s https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/sysctl.d/99-server.conf | sudo tee /etc/sysctl.d/99-server.conf > /dev/null
|
||||
sudo chmod 644 /etc/sysctl.d/99-server.conf
|
||||
|
Loading…
Reference in New Issue
Block a user