ip6tables

centos 系統(tǒng)下iptables和ip6tables不能同時(shí)使用,使用iptables時(shí),應(yīng)保證ip6tables處于stop狀態(tài);使用ip6tables時(shí)同理。
啟停iptables/ip6tables命令:

service iptables/ip6tables start/stop/status

默認(rèn)啟動(dòng)設(shè)置

chkconfig --level 345 iptables on

添加入站規(guī)則:

指定ip地址

ip6tables -A INPUT -i sit+ -p tcp -s 2001:250:4000:2000::1/64 --dport 27017 -j ACCEPT

保存規(guī)則

service ip6tables save

所有ip地址

ip6tables -A INPUT -p tcp --dport xxx -j ACCEPT
ip6tables -A INPUT -m state --state NEW -p tcp --dport xxx -j ACCEPT

刪除規(guī)則

ip6tables -D INPUT|OUTPUT|FORWARD num

查看已添加的端口

ip6tables -L --line-numbers

查看當(dāng)前端口狀態(tài)數(shù)據(jù)包狀態(tài)

ip6tables -vnL --line-numbers
image.png
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 在中國各個(gè)地方有著不同的飲食文化。隨著現(xiàn)在人口流動(dòng)的加強(qiáng)和交通的便利,如今每個(gè)地方都能吃到全國各地的風(fēng)味菜肴。一個(gè)...
    趙瀾青閱讀 628評(píng)論 0 0
  • 最近工作的項(xiàng)目,用了三種顏色,黑白灰+橙色+藍(lán)色,有時(shí)候不知道藍(lán)色是主色調(diào)還是橙色是主色調(diào),經(jīng)常陷入糾結(jié)中,今天早...
    多少有理閱讀 360評(píng)論 0 0

友情鏈接更多精彩內(nèi)容