OpenVZ/Centos Port FIltering (Host Node)
On my openvz host node, I have blocked port 25 using the following command ..
iptables -A FORWARD -j DROP -p tcp --destination-port 25
This is fine, but it blocks the port for all the containers.
Therefore, I have tried something like this, although it is listed in iptables -L, the connection cant be made. (Tried to check via telnet)
iptables -I FORWARD --source 7.5.4.7 --protocol tcp --destination-port 25
OR
iptables -I FORWARD --source 7.5.4.7 --protocol tcp --destination-port 25 -j ACCEPT
Any idea what is wrong?
PS. The block command is in the end, and nothing is below it. So this shouldn't be a problem. And if there is a way to block instead of allow, that will be fine too.
Thanks
papa2ae
Last edited by papa2ae; 08-30-2012 at 06:15 AM.
|