mikadonic-iptables學習筆記

firewall
圖像化配置
[root@desktop0 ~]# firewall-config


iptabes -F
iptabes -X
iptabes -Z
先設置默認規則(最后防線)
[root@desktop0 ~]# iptables -P INPUT DROP&&iptables -P OUTPUT DROP&&iptables -P FORWARD DROP


iptables -A(增加)/I(插入) 鏈名稱(INPUT、OUTPUT、FORWARD) -i(數據包進入接口)/o(數據包出去接口)
-p(指定協議tcp\udp\icmp\all) -s(源地址/!+IP反選不接受) --sport22:30(端口范圍) -d (目的地址)-j
(動作DROP、ACCEPT、REGECT、LOG)

路由寫轉發

systemctl|grep fowrward |grep ipv4
寫入 /etc/sysctl.conf
systmctl -p (reload)

加路由
route add -net 172.25.0.0 netmask 255.255.255.0
route add -host 172.25.0.10 -i
gw 192.168.100.2

iptables規則
[root@desktop0 ~]# iptables -A INPUT -i eth1 -s 192.168.100.0/24 -j DROP
[root@desktop0 ~]# iptables -A INPUT -s 192.168.100.0/24 -p udp -j DROP

[root@desktop0 ~]# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT icmp -- 172.25.0.0/24 anywhere
DROP all -- 192.168.100.0/24 anywhere
DROP tcp -- 192.168.100.0/24 anywhere
DROP udp -- 192.168.100.0/24 anywhere

iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
[root@desktop0 ~]# iptables -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT

?

轉載于:https://www.cnblogs.com/MiKaDoNik/p/8046404.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/278826.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/278826.shtml
英文地址,請注明出處:http://en.pswp.cn/news/278826.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

如何組合救援磁盤以創建最終Windows修復磁盤

We’ve covered loads of different anti-virus, Linux, and other boot disks that help you repair or recover your system, but why limit yourself to just one? Here’s how to combine your favorite repair disks together to create the ultimate repair toolkit for…

WebService C#開發/調用

簡單描述C#開發WebService操作步驟以及調用方式 WebService開發 第一步:創建Web空項目 第二步:為創建的Web空項目添加Web服務 第三步:實現WebService方法(僅供參考) 運行WebService測試 第一步:運行WebService程序,略 …

南京鐵道學院計算機應用,南京鐵道職業技術學院交通運營管理專業怎么樣

開設課程:大學英語、高等數學、計算機應用、交通運輸學、國際貿易政策與實務、班輪租船業務、運籌學、城市軌道運營管理、交通運輸規劃原理、交通運輸信息技術、運輸市場營銷學、鐵路貨運組織管理、航空運輸業務、集裝箱運輸管理、港航商務管理、交通運輸專業英語、…

C語言第九次博客作業--指針

一、PTA實驗作業 題目1:兩個4位正整數的后兩位互換 1. 本題PTA提交列表 2. 設計思路 定義循環變量i,兩個數組a[4],b[4] for i0 to 3a[i]*p取各個位*p/10 end for i0 to 3b[i]*q取各個位*q/10 end 分別對*p和*q重新賦值 3.代碼截圖 4.本題調試過程碰到問題及PTA提交列…

使用CEOP增強的Internet Explorer 8幫助保護您的孩子

Do you want to make Internet Explorer safer and more helpful for you and family? Then join us as we look at the CEOP (Child Exploitation and Online Protection Centre) enhanced version of Internet Explorer 8. 您想使Internet Explorer對您和家人更安全&#xf…

如何保持進步

文章:今日頭條 CEO 張一鳴:面試了 2000 個年輕人,混得好的都有這 5 種特質轉載于:https://www.cnblogs.com/Tpf386/p/10033670.html

MAC--PPTP教程

第一步點擊DocK-系統設置 第二步點擊網絡,進入網絡設置 第三步點擊號-創建新服務,創建新的網絡連接 第四步接口-選-類型-選-PPTP服務名稱-選-然后點擊-創建 第五步進入設置頁面-服務器地址點擊查看虛擬IP列表賬戶名稱-輸入試用帳號或是你已充值開通的帳號…

2015計算機應用基礎平時作業答案,2015秋《計算機應用基礎》第一次作業

2015秋《計算機應用基礎》第一次作業 一、單項選擇題。本大題共50個小題,每小題 2.0 分,共100.0分。在每小題給出的選項中,只有一項是符合題目要求的。 1. 第一臺電子計算機是1946年在美國研制成功的,該機的英文縮寫名是______。 …

頁面置換算法及例題

一、頁面置換算法 不適當的算法可能會導致進程發生“抖動”:即剛被換出的頁很快又要被訪問,需要將他重新調入,此時又需要再選一頁調出。而此剛被調出的頁面很快又被訪問,又需將它調入,如此頻繁地更換頁面,以…

vista磁盤使用100%_如何在Windows 7或Vista中創建和使用密碼重置磁盤

vista磁盤使用100%Forgetting your password can be an extremely frustrating situation, and we’ve already shared how to reset your password with the Ultimate Boot CD as well as the System Rescue CD, but you can prevent the situation entirely by creating a pa…

Nginx服務狀態的監控

一、安裝Nginx 使用源碼編譯安裝,包括具體的編譯參數信息。 正式開始前,編譯環境gcc g 開發庫之類的需要提前裝好。 安裝make: yum -y install gcc automake autoconf libtool make 安裝g: yum install gcc gcc-c 一般我們都需要先裝pcre, zl…

計算機二級高級應用這么難,計算機二級考試越來越難的實錘!真實數據告訴你到底難在哪里?...

今年3月考試成績暫時未公布(預計在5月中旬發布),通過率暫時無法得知。但是根據考后后臺反饋情況,今年通過率可能再創新低。不管你是不是有感知,計算機二級通過率的確在逐年降低。近3年難度越來越大每次考試結束后后臺評論最多的就是“今年的考…

windows 系統監視器_使用Windows 7中的可靠性監視器對計算機問題進行故障排除

windows 系統監視器Windows Vista introduced us to the Reliability and Performance Monitor utility to help keep track of hardware and software crashes. It’s now a stand alone utility in Windows 7 and we will take a look at how to access and use it. Windows …

4-8 string

1、常用的string模塊 1 import string2 3 # 26個小寫字母4 print(string.ascii_lowercase) 5 # abcdefghijklmnopqrstuvwxyz6 7 # 26個大寫字母8 print(string.ascii_uppercase) 9 # ABCDEFGHIJKLMNOPQRSTUVWXYZ 10 11 # 10個數字 12 print(string.digits) # 0123456789 1…

powerpoint預覽_如何安排PowerPoint幻燈片的時間以進行更有效的演示

powerpoint預覽Delivering a presentation is not just about giving good slides, it is also about making sure that our presentation finishes by the time our audience wants to have their tea break—so practicing how long to speak for each slide is essential fo…

【小程序踩坑系列5】小程序內多重調用原生promise,無返回,無報錯,代碼卡住...

作者: 蔣歡 問題: 在部分IOS機型上,小程序內使用原生promise實現異步,在嵌套四層后,Promise的resolve和reject均無返回。 環境: 用戶機型:iPhone 7 系統版本:IOS 10.3.3 微信版本:6.…

計算機仿真技術的大學,大學計算機仿真技術結課論文

計算機仿真技術是電子與信息專業中重要的專業學科。下面是學習啦小編為大家整理的大學計算機仿真技術結課論文,供大家參考。大學計算機仿真技術結課論文篇一《 復雜系統計算機仿真研究 》現代社會發展中,復雜系統所涉及的領域包括軍事、醫療、政治、工程…

統計nginx日志里訪問次數最多的前十個IP

awk {print $1} /var/log/nginx/access.log | sort | uniq -c | sort -nr -k1 | head -n 10 轉載于:https://www.cnblogs.com/new-journey/p/10038056.html

thread線程棧size及局部變量最大可分配size【轉】

轉自:http://blog.csdn.net/sunny04/article/details/46805261 版權聲明:本文為博主原創文章,未經博主允許不得轉載。 進程是操作系統的最小資源管理單元, 線程是操作系統最小的執行單元。 一個進程可以有多個線程, 也…

在Windows XP中對系統文件(頁面文件和注冊表)進行碎片整理

In the pursuit for performance, making sure your drive isn’t fragmented is a regular task. The problem is that Windows XP doesn’t allow certain system files to be defragmented without commercial software. What about free solutions? 在追求性能時&#xff…