1
0
Fork 0

ftp ssh ufw

This commit is contained in:
VirtuBox 2019-08-06 17:23:42 +02:00
parent 8e88c41cb2
commit 4485677faa
Signed by: virtubox
GPG Key ID: 22EB296C97BAD476
1 changed files with 42 additions and 0 deletions

View File

@ -470,6 +470,46 @@ _APT_BIONIC_KERNEL() {
fi
}
_FTP_ADD() {
ftpaccountpass="$(date +%s | sha256sum | base64 | head -c 32)"
echo "$ftpaccountpass"
sudo adduser --home /var/www/mz-mz.net/htdocs --shell /bin/false --ingroup www-data "$1"
}
_UFW_MINIMAL() {
ufw logging low
ufw default allow outgoing
ufw default deny incoming
ufw limit 22
ufw limit 10022
ufw allow 53
ufw allow http
ufw allow https
ufw allow 68
ufw allow 655
ufw allow 873
ufw allow 123
ufw allow 22222
ufw allow from 144.76.159.118 to any port 35621
ufw allow from 144.76.159.118 to any port 35622
ufw allow from 144.76.159.118 to any port 35623
ufw allow from 159.69.0.216 to any port 10050
}
_SSH_SECURE() {
wget https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/ssh/sshd_config -O /etc/ssh/sshd_config
if [ -n "$1" ]; then
sed -i "s/Port 22/Port $1/" /etc/ssh/sshd_config
else
sed -i "s/Port 22/Port 10022/" /etc/ssh/sshd_config
fi
}
# enable color support of ls and also add handy aliases
# some more ls aliases
#alias wp='/usr/bin/wp --allow-root'
@ -534,3 +574,5 @@ alias rsyslog-ufw=_RSYSLOG_UFW
alias start-ssh=_START_SSH_AGENT
alias apt-repo-ubuntu=_APT_REPO_UBUNTU
alias apt-bionic-kernel=_APT_BIONIC_KERNEL
alias ufw-minimal=_UFW_MINIMAL
alias ssh-secure=_SSH_SECURE