Mobile app version of vmapp.org
Login or Join
Heady270

: Do I have to do this using iptables? Using iptables is the best way to block traffic before it reaches Apache if you're certain that a particular address is malicious. If you're running

@Heady270

Do I have to do this using iptables?


Using iptables is the best way to block traffic before it reaches Apache if you're certain that a particular address is malicious. If you're running Ubuntu, some people find that uncomplicated firewall (UFW) simplifies firewall configuration.

To block a known <IP address> using iptables:

sudo iptables -A INPUT -s <IP address> -j DROP

To block it using UFW:

sudo ufw deny from <IP address>

Linode has a useful guide to configuring iptables, and Ubuntu has an introduction to UFW that may prove useful.


What other ways are there to alleviate this issue?


You could set up a hardware firewall on a separate machine, which would act as a traffic cop, filtering traffic you deem unsafe and sending only permitted requests on to the server running Apache.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Heady270

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme