1) vultr.com 防火牆使用的不是iptables,需要手動更換
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall開機啓動
firewall-cmd --state #查看默認防火牆狀態(關閉後顯示notrunning,開啓後顯示running)
#開啓iptables
yum install iptables #(根據centOS7的版本和內核,有些版本已經裝過,可以跳過此命令)
yum install iptables-services
service iptables restart
#開機自啓
chkconfig iptables on
#或者
systemctl enable iptables.service
2)安裝好BBR以後,再安裝應用服務。
我折騰了好幾遍,最後放棄了。不裝BBR了。
3)設置防火牆:SSH 22, http 80, HTTPS 443
手工更改配置最靠譜,vi /etc/sysconfig/iptables命令
4)其他幾個命令:
#保存更改
service iptables save
#若提示服務不存在,則執行
iptables-save
#若提示命令不存在,則執行
/sbin/iptables-save
#若還是找不到命令,重新確認iptables安裝路徑。
#查看iptables現有規則
iptables -L -n
#開放443端口(HTTPS)加了這個之後ss還是無法連接,顯示超時
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
#將所有iptables以序號標記顯示
iptables -L -n --line-numbers
#######################然後可以找到INPUT裏開頭爲 REJECT 的規則刪除掉
#刪除INPUT裏序號爲8的規則
iptables -D INPUT 8