-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from infstate/new-features-2
Added Security Folder
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters