Backtrack:  
 
by lunarg on April 21st 2015, at 09:30

To block traffic from/to a specific IPv4 address using iptables, you can use these commands:

iptables -A INPUT -s 1.2.3.4 -j DROP
iptables -A OUTPUT -d 1.2.3.4 -j DROP
Warning!
Do not use these commands when you are already running an iptables-based firewall as this may result in unexpected results.