vps在被利用发送垃圾邮件的时候会被服务商判定为spam行为,导致vps被暂停,所以我们需要把邮件端口屏蔽。
此脚本基于debian系统。
#!/bin/bash #input rules iptables -A OUTPUT -p tcp -m multiport --dports 25,26,109,110,143,220,366,465,587,691,993,995,2710,6881 -j REJECT --reject-with tcp-reset iptables -A OUTPUT -p udp -m multiport --dports 25,26,109,110,143,220,366,465,587,691,993,995,2710,6881 -j DROP #save iptables-save > /etc/iptables touch /etc/network/if-pre-up.d/iptables chmod +x /etc/network/if-pre-up.d/iptables echo "#!/bin/sh" >> /etc/network/if-pre-up.d/iptables echo "/sbin/iptables-restore < /etc/iptables" >> /etc/network/if-pre-up.d/iptables iptables-save > /etc/iptables iptables -L
来自热闹集团CEO LOP的网站
评论前必须登录!
注册