Linux 防火牆埠設定

2021-06-04 01:13:55 字數 488 閱讀 6366

搭建好伺服器後,本機可以正常訪問,外部機器無法正常訪問,防火牆問題: 

1.在/etc/sysconfig/iptables裡新增 

-a rh-firewall-1-input -m state --state new -m tcp -p tcp --dport 8080:8082 -j accept
-a rh-firewall-1-input -m state --state new -m tcp -p tcp --dport 1521 -j accept

2.重啟iptables

[root@localhost ~]# /etc/init.d/iptables restart

3.看下狀態

[root@localhost ~]# /etc/init.d/iptables status

Linux防火牆埠設定

開放8080埠 root centos7 firewall cmd zone public add port 8080 tcp permanent 查詢埠號8080 是否開啟 root centos7 firewall cmd query port 80 tcp 重啟防火牆 root centos7...

linux防火牆 埠檢視設定

防火牆1 firewalld.server 一般是linux系統自帶的系統服務,usr lib systemd system 在 usr lib systemd system下的服務,可以使用systemctl指令去操作 2 iptables 服務一般是需要自己手動安裝 上面兩種都是啟到防火牆的作用...

Linux關閉防火牆 設定埠

1 重啟後生效 開啟 chkconfig iptables on 關閉 chkconfig iptables off 驗證防火牆是否關閉 chkconfig list grep iptables 2 即時生效,重啟後失效 開啟 service iptables start 關閉 service ip...