You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sudo vi /etc/ssh/sshd_config
Port 22
PermitRootLogin no
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
PermitEmptyPasswords no
sudo systemctl restart sshd
exit
S
## Login as [USERNAME]```bash#repeat until no more updatessudo apt updatesudo apt upgradesudo apt-get updatesudo apt-get upgradesudo reboot
Login as [USERNAME]
install Linus
# https://github.com/CISOfy/lynis/
sudo apt-get install lynis
lynis show version
install CrowdSec
# https://github.com/crowdsecurity/crowdsec
sudo wget -O - https://packages.cisofy.com/keys/cisofy-software-public.key | sudo apt-key add -
# Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash
sudo apt-get update
sudo apt-get install crowdsec
sudo apt install crowdsec-firewall-bouncer-iptables
sudo npm install @crowdsec/express-bouncer
# https://docs.crowdsec.net/docs/bouncers/cloudflare/
sudo apt-get install crowdsec-cloudflare-bouncer
# auto-generate cloudflare src for provided space separated tokens
sudo crowdsec-cloudflare-bouncer -g <CLOUDFLARE_TOKEN1>,<CLOUDFLARE_TOKEN2> -o /etc/crowdsec/bouncers/crowdsec-cloudflare-bouncer.yaml
# this sets up IP lists and firewall rules at cloudflare for the provided src.
sudo crowdsec-cloudflare-bouncer -s
# the bouncer now syncs the crowdsec decisions with cloudflare components.
sudo systemctl start crowdsec-cloudflare-bouncer