Agnello George wrote:
A VZ_INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A VZ_INPUT -m tcp -p tcp --dport 25 -j ACCEPT -A VZ_INPUT -p udp -m udp --sport 53 -j ACCEPT -A VZ_INPUT -p tcp -m tcp --sport 80 --dport 1023:65535 -j ACCEPT -A VZ_OUTPUT -p tcp -m tcp --sport 22 -j ACCEPT -A VZ_OUTPUT -p udp -m udp --sport 1023:65535 --dport 53 -j ACCEPT -A VZ_OUTPUT -p tcp -m tcp --dport 80 -j ACCEPT COMMIT
This is what I use. Modify as per your requirements.
iptables -A INPUT -i lo -j ACCEPT iptables -A INPUT -i eth0 -j ACCEPT iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -m state --state NEW -p tcp --dport 22 -j ACCEPT iptables -A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT iptables -A INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT