srv 050520


apt install openssh-server
ip a / if config (net-tools)
dmesg
hostname -f
------------------------------- /etc/hosts
/etc/hostname
-------------------------------
repos
nano /etc/apt/sources.list
strech/buster
deb http://ftp.us.debian.org/debian/ stretch main contrib non-free
deb-src http://ftp.us.debian.org/debian/ stretch main contrib non-free
deb http://security.debian.org/debian-security stretch/updates main contrib non-free
deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free
-----------------------------
dpkg-reconfigure dash
ls -la .bin/sh
-------------------------
apt-get install ntp
timedatectl status
--------------------------
apt-get install postfix postfix-mysql postfix-doc mariadb-client mariadb-server openssl getmail4 rkhunter binutils dovecot-imapd dovecot-pop3d dovecot-mysql dovecot-sieve dovecot-lmtpd sudo

mysql_secure_installation

Change the root password? [Y/n] YNew password: Geben Sie ein sicheres MariaDB/MySQL Passwort einRe-enter new password: Wiederholen Sie Ihr PasswortRemove anonymous users? [Y/n] YDisallow root login remotely? [Y/n] YRemove test database and access to it? [Y/n] YReload privilege tables now? [Y/n] Y

nano/etc/postfix/master.cf
submission inet n - - - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject

smtps inet n - - - - smtpd
-o syslog_name=postfix/smtps
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
service postfix restart
---
nano /etc/mysql/mariadb.conf.d/50-server.cnf
#bind address
sql-mode="NO_ENGINE_SUBSTITUTION"

echo "update mysql.user set plugin = 'mysql_native_password' where user='root';" | mysql -u root

nano /etc/mysql/debian.cnf
F├╝gen Sie Ihr MariaDB/MySQL Passwort an der passenden Stelle hinzu und starten mysql neu.
service mysql restart
netstat -tap | grep mysql
---
nano /etc/security/limits.conf
mysql TAB TAB soft TAB nofile TAB 65535
mysql hard nofile 65535

mkdir -p /etc/systemd/system/mysql.service.d
nano /etc/systemd/system/mysql.service

nano /etc/systemd/system/mysql.service.d/limits.conf
[Service]
LimitNOFILE=infinity

systemctl daemon-reload
systemctl restart mariadb
--------------------------
apt install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 arj nomarch lzop cabextract apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perllibdbd-mysql-perl postgrey

service spamassassin stop
systemctl disable spamassassin
----------------------------------------


https://phoenixnap.com/kb/ssh-to-connect-to-remote-server-linux-or-windows
https://help.ubuntu.com/community/ServersBehindNAT
.
. .