Block specific IP addresses
I've had some issues with certain IP addresses attempting to DDoS my Linode. Can you block them for me?
2 Replies
I see that you're looking to blacklist a few IP addresses that have been trying to DDoS your website. As we are primarily an infrastructure provider, I do not have the ability to block IP addresses on your behalf, however this can be configured in your Linode by following the instructions in our guide on iptables, specifically the section on blacklisting/whitelisting by IP address. iptables can be a bit tricky to work with, so if you are not already familiar with it, you may find it to be much quicker and easier to use a iptables front-end tool to set the restrictions.
If the servers behind your NodeBalancer are running Ubuntu/Debian, or any other Linux distribution which is compatible with UFW, you may find this to be a bit more intuitive to use. If you are using CentOS 7, or any other distribution which uses FirewallD, then you can use the 'firewall-cmd' command. I've attached guides for both frontends and verified that they do each contain instructions on blocking by IP address. For UFW, you want the section on "Advanced Rules" and for FirewallD/firewall-cmd you want the section on "Rich Rules".
Here's a couple examples for blocking all traffic from specific IP addresses. Assuming the IP address you want to block is 8.8.8.8:
With UFW:
$ ufw deny from 8.8.8.8 to any
With FirewallD:
$ firewall-cmd --add-rich-rule='rule family="ipv4" source address="8.8.8.8" reject’
Good-ol' iptables:
$ iptables -A INPUT -s 8.8.8.8 -j DROP