1 accept all related and established states 2 accept all packets from the icmp protocol (ping etc.) 3 accept everything coming to the loopback interface (lo) 4 accept ssh traffic – port 22 on the tcp protocol 5 accept http traffic – port 80 on the tcp protocol 6 accept https traffic – port 443 on the tcp protocol 7 drop all other packets.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Those IPs are in private IP space, so I doubt it. How did you determine they are “attacking” you?
You could do this with Digital Ocean’s firewall service.
https://www.digitalocean.com/community/tutorials/an-introduction-to-digitalocean-cloud-firewalls