I have a server running CentOS 5.5 and acting as an OpenVZ host. One of the containers has been sending out spam and I need to block his ability to connect to outbound port 25. I've looked at http://wiki.openvz.org/Setting_up_an_iptables_firewall, but this setup is to prevent INCOMING traffic and I have not found a working IPTABLES rule that prevented a specific IP address from connecting to an OUTBOUND port.
I've tried:
iptables -I OUTPUT --source [CONTAINER_IP] --protocol tcp --destination-port 25 -j DROP
but that does not appear to actually block it. Any ideas would be appreciated.