allofphysicsgraph / proofofconcept

Physics Derivation Graph: mathematical connections among equations
https://derivationmap.net/
Other
20 stars 6 forks source link

prevent malicious users from consuming services like ssh and http and https #154

Open bhpayne opened 4 years ago

bhpayne commented 4 years ago

use fail2ban to limit resource use associated with both SSH and Nginx

https://www.digitalocean.com/community/tutorials/how-to-protect-ssh-with-fail2ban-on-ubuntu-14-04

https://www.digitalocean.com/community/tutorials/how-to-protect-an-nginx-server-with-fail2ban-on-ubuntu-14-04

https://www.google.com/search?&q=fail2ban+ubuntu+18.04

bhpayne commented 4 years ago

ran sudo apt-get install fail2ban iptables-persistent, then realized I am using ufw

https://askubuntu.com/questions/54771/potential-ufw-and-fail2ban-conflicts

This post is helpful https://zaiste.net/intro_fail2ban_with_ufw/

sudo fail2ban-client status
Status
|- Number of jail:  1
`- Jail list:   sshd
bhpayne commented 4 years ago

fail2ban is a full-fledged service and therefore belongs in a docker container as part of the docker-compose.yaml bundle

bhpayne commented 4 years ago

useful picture: https://www.the-lazy-dev.com/en/install-fail2ban-with-docker/

bhpayne commented 4 years ago

to see what IPs have been jailed, see

sudo cat /var/log/fail2ban.log | grep -i NOTICE

after editing /etc/fail2ban/jail.local

sudo fail2ban-client reload