iptables -F
iptables -X SNE_TCP_BMP
iptables -N SNE_TCP_BMP
for one_port in ${all_port}
do
iptables -A INPUT -p tcp --dport ${one_port} -j SNE_TCP_BMP
done
if [ "X${local_ip}" != "X${service_ip}" ]; then
iptables -A SNE_TCP_BMP -d ${service_ip} -j ACCEPT
fi
iptables -A SNE_TCP_BMP -d ${local_ip} -j ACCEPT
iptables -A SNE_TCP_BMP -d 127.0.0.1 -j ACCEPT
iptables -A SNE_TCP_BMP -p tcp -j REJECT --reject-with tcp-reset
iptables -X SNE_TCP_BMP
iptables -N SNE_TCP_BMP
for one_port in ${all_port}
do
iptables -A INPUT -p tcp --dport ${one_port} -j SNE_TCP_BMP
done
if [ "X${local_ip}" != "X${service_ip}" ]; then
iptables -A SNE_TCP_BMP -d ${service_ip} -j ACCEPT
fi
iptables -A SNE_TCP_BMP -d ${local_ip} -j ACCEPT
iptables -A SNE_TCP_BMP -d 127.0.0.1 -j ACCEPT
iptables -A SNE_TCP_BMP -p tcp -j REJECT --reject-with tcp-reset