oops syntax fix

master
dan 2020-12-11 00:04:44 +01:00
parent 9bd755b016
commit 42e5f7d97e
1 changed files with 31 additions and 38 deletions

View File

@ -2,9 +2,7 @@
## DNS ## DNS
DNS-zone presso il registrar DNS-zone presso il registrar, esempio: accroc.radio
esempio: accroc.radio
``` ```
* 10800 IN A 10.000.00.001 * 10800 IN A 10.000.00.001
@ -19,33 +17,31 @@ www 10800 IN CNAME accroc.radio.
Debian 10 Debian 10
> apt update ; apt upgrade ; apt clean apt update ; apt upgrade ; apt clean
> apt install sudo ssh screen net-tools htop strace ntp ufw figlet apg wipe apt install sudo ssh screen net-tools htop strace ntp ufw figlet apg wipe
> apt install curl git apt-transport-https tmux byobu man elinks grc dnsutils apt install curl git apt-transport-https tmux byobu man elinks grc dnsutils
> apt install fish tree zip nmap rsync mutt logwatch rkhunter apt install fish tree zip nmap rsync mutt logwatch rkhunter
## Hostname ## Hostname
> hostnamectl set-hostname croco hostnamectl set-hostname croco
> figlet: figlet cRoc > /etc/motd figlet: figlet cRoc > /etc/motd
## Firewall ## Firewall
``` ufw default deny incoming
ufw default deny incoming ufw default allow outgoing
ufw default allow outgoing ufw allow ssh
ufw allow ssh ufw allow 80 (e 443, 2022, 8000, 8005)
ufw allow 80, 443, 2022, 8000, 8005 ufw enable
ufw enable
```
Consigliato: cambiare porta sshd, abilitare ssh login passwordless Consigliato cambiare porta sshd, abilitare ssh login passwordless
## Time ## Time
> dpkg-reconfigure tzdata dpkg-reconfigure tzdata
Europe/Rome Europe/Rome
@ -71,30 +67,27 @@ set tabstospaces
## Mailserver ## Mailserver
> apt install postfix
Posta solo locale. Posta solo locale.
apt install postfix
Per riconfigurare: Per riconfigurare:
> dpkg-reconfigure postfix dpkg-reconfigure postfix
## SWAP ## SWAP
> free -h free -h
> fallocate -l 2G /swapfile fallocate -l 2G /swapfile
> ls -lh /swapfile chmod 600 /swapfile
> chmod 600 /swapfile mkswap /swapfile
> mkswap /swapfile swapon /swapfile
> swapon /swapfile swapon --show
> swapon --show sudo cp /etc/fstab /etc/fstab.bak
> sudo cp /etc/fstab /etc/fstab.bak echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
> echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab cat /proc/sys/vm/swappiness
> cat /proc/sys/vm/swappiness sysctl vm.swappiness=10
> sysctl vm.swappiness=10 echo vm.swappiness=10 >> /etc/sysctl.conf
> echo vm.swappiness=10 >> /etc/sysctl.conf cat /proc/sys/vm/vfs_cache_pressure
> cat /proc/sys/vm/vfs_cache_pressure sysctl vm.vfs_cache_pressure=50
> sysctl vm.vfs_cache_pressure=50 echo vm.vfs_cache_pressure=50 >> /etc/sysctl.conf
> echo vm.vfs_cache_pressure=50 >> /etc/sysctl.conf