Centos7.6如何用iptables禁止特定IP訪問
時(shí)間:2024/5/8 11:09:53 來源:米安網(wǎng)絡(luò) 作者:云主機(jī)配置專家 點(diǎn)擊:264次
在Centos7.6系統(tǒng)下如何用iptables禁止特定IP訪問呢?
1.輸入
iptables -I INPUT -s x.x.x.x -j DROP
,按回車鍵。其中x.x.x.x為禁止訪問的IP
2.輸入
iptables -nL
,按回車鍵可查看當(dāng)前具體iptables規(guī)則
3.若需要解除禁止則輸入
iptables -D INPUT -s x.x.x.x -j DROP
,按回車鍵。其中x.x.x.x為解除禁止訪問的IP
版權(quán)保護(hù): 本文「Centos7.6如何用iptables禁止特定IP訪問」由 云主機(jī)配置專家 原創(chuàng),轉(zhuǎn)載請(qǐng)保留鏈接: http://www.iqcg.cn/docs/system/1158.html