Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I have a small Ubuntu 16.04 server set up on DigitalOcean, and I’m working on securing it as much as I can. As there’s no reason anyone from outside the country should be accessing it, I’ve been slowly gathering unwanted IP’s from various sources (IPdeny, Spamhaus, and so on), putting them in an ipset block set, and adding that set to iptables with a DROP action. So far, so good, right?
Well, I’m also running psad for a bit of extra security, and here’s where I notice potential issues. Despite my ipset lists that are supposedly set up properly, psad still regularly gets hits from IP addresses that should be blocked. I am not sure if it’s picking up something that’s already been blocked by ipset, or if it’s something that made it through my blocklists somehow.
Would someone mind doing a sanity check on my iptables settings and tell me if I’ve got everything in the right place? The relevant parts are below - thanks!
root@m:~# iptables -S -P INPUT DROP -P FORWARD ACCEPT -P OUTPUT DROP -N MYBLOCKS -N PSAD_BLOCK_FORWARD -N PSAD_BLOCK_INPUT -N PSAD_BLOCK_OUTPUT … <<default ufw -N rules>> … -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A INPUT -j MYBLOCKS -A INPUT -j PSAD_BLOCK_INPUT … <<default ufw -A rules>> … -A INPUT -j LOG --log-prefix "[IPTABLES] " --log-tcp-options -A FORWARD -j PSAD_BLOCK_FORWARD … <<default ufw forward rules>> … -A FORWARD -j LOG --log-prefix "[IPTABLES] " --log-tcp-options … <<default ufw output rules>> … -A MYBLOCKS -p tcp -m set --match-set myblockset1 src -j DROP -A MYBLOCKS -p tcp -m set --match-set myblockset2 src -j DROP -A MYBLOCKS -p tcp -m set --match-set myblockset3 src -j DROP -A MYBLOCKS -p tcp -m set --match-set myblockset4 src -j DROP … <<PSAD autoblocked IPs>> … <<remaining default UFW rules>>
56bd8300516443db8f6e925c6721b4
affiliatetrading
admin
saeeddarabi
djanym
skeddtemp
gebelo
martinjameslynn
Brenda Morales
d02e0b7b59c2429cb46fcbb782