Added Security Folder

This commit is contained in:
infstate 2024-07-30 12:01:13 -07:00
parent f1fc19fed8
commit 29e257bf41
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,39 @@
#!/bin/sh -e
installPkg() {
echo "Install UFW if not already installed..."
if ! command_exists ufw; then
case ${PACKAGER} in
pacman)
sudo "${PACKAGER}" -S --noconfirm ufw
;;
*)
sudo "${PACKAGER}" install -y ufw
;;
esac
else
echo "UFW is already installed."
fi
echo -e "${GREEN}Using Chris Titus Recommended Firewall Rules${RC}"
sudo ufw limit 22/tcp
echo "Limiting port 22/tcp (UFW)"
sudo ufw allow 80/tcp
echo "Allowing port 80/tcp (UFW)"
sudo ufw allow 443/tcp
echo "Allowing port 443/tcp (UFW)"
sudo ufw default deny incoming
echo "Denying Incoming Packets by Default(UFW)"
sudo ufw default allow outgoing
echo "Allowing Outcoming Packets by Default(UFW)"
sudo ufw enable
echo -e "${GREEN}Enabled Firewall with Baselines!${RC}"
}
checkEnv
installPkg

View File

@ -99,6 +99,15 @@ impl CustomList {
command: "cargo run" command: "cargo run"
} }
}, },
ListNode {
name: "Security",
command: ""
} => {
ListNode {
name: "Firewall Baselines (CTT)",
command: with_common_script!("commands/security/firewall-baselines.sh"),
}
},
ListNode { ListNode {
name: "Titus Dotfiles", name: "Titus Dotfiles",
command: "" command: ""