Iptables

1. iptables防火牆簡介

Iptables也叫netfilterLinux下自帶的一款免費且優秀的基於包過濾的防火牆工具,它的功能十分強大,使用很是靈活,能夠對流入、流出、流經服務器的數據包進行精細的控制。iptablesLinux2.42.6內核中集成的模塊。服務器

2. Iptables服務相關命令

1.查看iptables狀態工具

service iptables statusspa

2.開啓/關閉iptablesblog

service iptables startip

service iptables stoptable

3.查看iptables是否開機啓動原理

chkconfig iptables --listiptables

4.設置iptables開機啓動/不啓動service

chkconfig iptables on防火牆

chkconfig iptables off

3. iptables原理簡介

3.1. iptables的結構

iptables中有四張表,分別是filternatmangleraw每個表中都包含了各自不一樣的鏈,最經常使用的是filter表。

 

 

filter表:

filteriptables默認使用的表,負責對流入、流出本機的數據包進行過濾,該表中定義了3個鏈:

INPOUT  負責過濾全部目標地址是本機地址的數據包,就是過濾進入主機的數據包。

FORWARD 負責轉發流經本機但不進入本機的數據包,起到轉發的做用。

OUTPUT 負責處理全部源地址是本機地址的數據包,就是處理從主機發出去的數據包。

相關文章
相關標籤/搜索