Linux VPS防火牆指令碼 SS vp,n WEB MYSQL SSH

來源:互聯網
上載者:User

標籤:

iptables -F 
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -j ACCEPT   
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 222 -j ACCEPT

iptables -A INPUT -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -p gre -j ACCEPT
//這2條是pptp 扶牆的

iptables -A INPUT -p tcp --dport 40000:60000 -j ACCEPT
//ss開放連接埠


iptables -A INPUT -s 11.11.11.11 -p tcp --dport 3306 -j ACCEPT

iptables -A INPUT -s 101.199.100.150 -p udp --dport 161 -j ACCEPT
//snmpd監控

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
//屏蔽ss亂髮垃圾郵件

iptables -A INPUT -p icmp -j ACCEPT 
iptables -A OUTPUT -p icmp -j ACCEPT

iptables -A INPUT -j DROP   
/etc/init.d/iptables save 


iptables -A FORWARD -s 172.16.36.0/24 -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j TCPMSS --set-mss 1356
iptables -t nat -A POSTROUTING -s 172.16.36.0/24 -j SNAT --to-source 111.111.111.111
//這2條是pptp 扶牆轉寄的

Linux VPS防火牆指令碼 SS vp,n WEB MYSQL SSH

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.