Block Port 25 On SolusVM/Xen With IPtables
SolusVM (at the time of this writing) has no internal method for firewalling customers containers. I find it often necessary to restrict ports on customers (normally port 25) and after trial and error came up with some rules for IPtables to facilitate this at the hardware node level. SolusVM uses the FORWARD chain inside of IPtables so all you need to do is:
iptables -I FORWARD 1 -d $ip -p tcp -m tcp --dport 25 -j DROP
iptables -I FORWARD 1 -s $ip -p tcp -m tcp --dport 25 -j DROP
...where $ip is the IP you are restricting port traffic on. The above rules prevent all IN/OUT port 25 traffic to a particular host.
port 25 block, vps port block, vps iptables, linux iptables
Safest granular way to do this is through IPTables / Firewall. Block port by source and destination IP address on the slave nodes, where the source and destination will be the IP address of the VPS you need to block from traversing traffic through port 25, either inbound or outbound.
I'm assuming you're having or want to avoid spam problems? If you're using OpenVZ you can check out nodewatch: http://vpsantiabuse.com/
You can use it to monitor how many SMTP connections each VM has and even set parameters to automatically suspend VM's with X amount of SMTP connections. We're using this on all of our OpenVZ nodes and have seen great results in cutting down spam and abusers in general.