Linux防火墙之Netfilter


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目标支持);

  • 1
  • 2
  • 3
  • 下一页

相关内容