Block specific IP addresses

Linode Staff

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

With UFW:

$ ufw deny from to any

With FirewallD:

$ firewall-cmd --add-rich-rule='rule family="ipv4" source address="" reject’

Good-ol' iptables:

$ iptables -A INPUT -s -j DROP


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct