Setup ufw
This commit is contained in:
parent
3f26447f1b
commit
bad66583d2
|
@ -131,6 +131,18 @@ increase_ulimit_n() {
|
||||||
echo "${ADMIN_USERNAME} hard nofile 100000" | sudo tee /etc/security/limits.conf >> /dev/null
|
echo "${ADMIN_USERNAME} hard nofile 100000" | sudo tee /etc/security/limits.conf >> /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setup_ufw() {
|
||||||
|
echo "=====> setup_ufw"
|
||||||
|
sudo sudo ufw enable
|
||||||
|
sudo ufw default deny incoming
|
||||||
|
sudo ufw allow 443
|
||||||
|
sudo ufw allow 8545
|
||||||
|
sudo ufw allow 22/tcp
|
||||||
|
sudo ufw allow 30303/tcp
|
||||||
|
sudo ufw allow 30303/udp
|
||||||
|
echo "<===== setup_ufw"
|
||||||
|
}
|
||||||
|
|
||||||
install_ntpd() {
|
install_ntpd() {
|
||||||
echo "=====> install_ntpd"
|
echo "=====> install_ntpd"
|
||||||
sudo timedatectl set-ntp no
|
sudo timedatectl set-ntp no
|
||||||
|
@ -447,6 +459,7 @@ main () {
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
|
||||||
prepare_homedir
|
prepare_homedir
|
||||||
|
setup_ufw
|
||||||
increase_ulimit_n
|
increase_ulimit_n
|
||||||
install_ntpd
|
install_ntpd
|
||||||
install_haveged
|
install_haveged
|
||||||
|
|
Loading…
Reference in New Issue