- 資訊首頁(yè) > 互聯(lián)網(wǎng) > 經(jīng)驗分享 >
- centos關(guān)閉防火墻命令?
CentOS6關(guān)閉防火墻使用以下命令,
//臨時(shí)關(guān)閉 service iptables stop //禁止開(kāi)機啟動(dòng) chkconfig iptables off
CentOS7中若使用同樣的命令會(huì )報錯,
stop iptables.service Failed to stop iptables.service: Unit iptables.service not loaded.
這是因為CentOS7版本后防火墻默認使用firewalld,因此在CentOS7中關(guān)閉防火墻使用以下命令,
//臨時(shí)關(guān)閉 systemctl stop firewalld //禁止開(kāi)機啟動(dòng) systemctl disable firewalld Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
當然,如果安裝了iptables-service,也可以使用下面的命令,
yum install -y iptables-services //關(guān)閉防火墻 service iptables stop Redirecting to /bin/systemctl stop iptables.service //檢查防火墻狀態(tài) service iptables status Redirecting to /bin/systemctl status iptables.service iptables.service - IPv4 firewall with iptables Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled) Active: inactive (dead)
發(fā)布者:diyvm
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng )、來(lái)自本網(wǎng)站內容采集于網(wǎng)絡(luò )互聯(lián)網(wǎng)轉載等其它媒體和分享為主,內容觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如侵犯了原作者的版權,請告知一經(jīng)查實(shí),將立刻刪除涉嫌侵權內容,聯(lián)系我們QQ:712375056,同時(shí)歡迎投稿傳遞力量。
Copyright ? 2009-2022 56dr.com. All Rights Reserved. 特網(wǎng)科技 特網(wǎng)云 版權所有 特網(wǎng)科技 粵ICP備16109289號
域名注冊服務(wù)機構:阿里云計算有限公司(萬(wàn)網(wǎng)) 域名服務(wù)機構:煙臺帝思普網(wǎng)絡(luò )科技有限公司(DNSPod) CDN服務(wù):阿里云計算有限公司 百度云 中國互聯(lián)網(wǎng)舉報中心 增值電信業(yè)務(wù)經(jīng)營(yíng)許可證B2
建議您使用Chrome、Firefox、Edge、IE10及以上版本和360等主流瀏覽器瀏覽本網(wǎng)站