OpenVZ Forum - RDF feed
type: channel
items: iptables Blocking for ALL VEs
items: Re: iptables Blocking for ALL VEs

iptables Blocking for ALL VEs
type: item
description: If anyone needs to do firewalling from the host node to affect all VEs, this is the way you can handle it: iptables -A FORWARD -i eth0 -s 65.254.39.146 -j DROP Assuming eth0 is your primary network device, this will drop IP 65.252.39.146 on all of your VEs. This is nothing cosmetic, I just wanted to point out that you should drop them on the FORWARD chain to affect all the VEs. Good luck,
creator: phpfreak
date: 2006-02-01T16:02:32-00:00

Re: iptables Blocking for ALL VEs
type: item
description: to make life easier, I put this into /usr/local/sbin/vzdrop: #!/bin/bash iptables -A FORWARD -i eth0 -s $1 -j DROP iptables -A FORWARD -i eth1 -s $1 -j DROP iptables -A INPUT -i eth0 -s $1 -j DROP iptables -A INPUT -i eth1 -s $i -j DROP chmod +x /usr/local/sbin/vzdrop Then to drop an IP: vzdrop 65.252.39.146 And you've blocked the attacker.
creator: phpfreak
date: 2006-02-07T04:42:26-00:00