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 |
If you are using bridged networking iptables don't act as you expect. Try searching "ebtables bridged networking"
|
But if the top command works fine, why doesn't the second one work the way it is meant to?
It has always worked for me ... And no, not using a bridged network setup |
All times are GMT -5. The time now is 06:55 PM. |