---

How to block traffic from other countries in Linux

It’s a sad fact that the majority of malicious web traffic to US sites originates from the same handful of foreign countries. If your site doesn’t benefit from actual users living in those countries, you may resolve to block them from accessing your site entirely in order to prevent repeated attacks. Here’s how to blacklist entire countries under linux using iptables and ipset.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis