歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux防火牆之Netfilter

Linux防火牆之Netfilter

日期:2017/2/28 15:44:32   编辑:Linux教程

Netfilter簡介

  Linux下的包過濾防火牆,可以運行在2.4,2.6內核上;集成在內核中,不是系統的一個守護進程;對OSI模型中2,3,4層進行處理;只能對數據包頭進行處理;可以用iptables命令來進行規則的配置;代替了ipchains;可以從http://www.netfilter.org查到更多資源。

基本的Netfilter編譯選項

  為了運行iptables,需要在內核配置期間,選擇以下一些選項,不管你用make config或其他命令。
在內核配置文件中要啟用一些較重要的選項包括Netfilter連接跟蹤、日志記錄和包過濾。(請記住iptables通過用由Netfilter提供的內核中框架來建立一個策略)。
在Network Packet Filtering Framework(Netfilter)中還有兩個額外的配置選項――Core Netfilter Configuration(核心Netfilter配置)和IP:Netfilter Configuration(IP:Netfilter配置)。

核心Netfilter配置

  核心Netfilter配置選項中包含的一些得要選項都應該被啟用:
Comment match support(comment匹配支持);
FTP support(FTP協議支持);
Length match support(數據包長度匹配支持);
Limit match support(Limit匹配支持);
MAC address match support(MAC地址匹配支持);
MARK target support(MARK目標支持);
Netfilter connection tracking support(Netfilter連接跟蹤支持);
Netfilter LOG over NFNETLINK interface(Netfilter通過NFNETLINK接口記錄日志);
Netfilter netlink interface(Netfilter netlink接口);
Netfilter Xtables support(Netfilter Xtables支持);
State match support(state匹配支持);
String match support(string匹配支持);

IP:Netfilter配置

  ECN target support(ECN目標支持);
Full NAT(完整NAT支持);
IP address range match support(ip地址范圍匹配支持);
IP tables support(IP tables支持,filtering/masq/NAT需要);
IPv4 connection tracking support(IPv4連接跟蹤支持,NAT需要);
LOG target support(LOG目標支持);
MASQUERAD target support(MASQUERAD目標支持);
Owner match support(owner匹配支持);
Packet filtering(包過濾支持);
Packet mangling(包修改支持,常用於改變包的路由);
Raw table support(RAW表支持,NOTRACK/TRACE需要);
Recent match support(recent匹配支持);
REJECT target support(REJECT目標支持);
TOS match support(TOS匹配支持);
TOS target support(TOS目標支持);
TTL match support(TTL匹配支持);
TTL target support(TTL目標支持);
ULOG target support(ULOG目標支持);

Copyright © Linux教程網 All Rights Reserved