新泰网站seo,公众号用什么软件做,python基础教程第二版,阿里企业的网站建设Linux下主机充当防火墙的巧妙应用之iptables!Linux下主机充当防火墙的巧妙应用之iptables!实验综合拓扑图:注意事项#xff1a;防火墙由Red Hat Linux 5.4 版本的机器充当#xff0c;eth0 使用Host-only (vmware 1)#xff0c;eth1 使用Bridge(本地连接),eth2(vmware 2)前期…Linux下主机充当防火墙的巧妙应用之iptables!Linux下主机充当防火墙的巧妙应用之iptables!实验综合拓扑图:注意事项防火墙由Red Hat Linux 5.4 版本的机器充当eth0 使用Host-only (vmware 1)eth1 使用Bridge(本地连接),eth2(vmware 2)前期工作iptables 仅能过滤网络层的内容例如协议、端口等等如果想要过滤应用层的需要打上七层协议的补丁包还需内核支持操作步骤如下一、重新编译内核1、合并kernellayer7补丁[rootgjp99 ~]# lltotal 48336-rw------- 1 root root 960 Aug 2 21:30 anaconda-ks.cfgdrwxr-xr-x 2 root root 4096 Aug 2 21:41 Desktop-rw-r--r-- 1 root root 35556 Aug 2 21:30 install.log-rw-r--r-- 1 root root 4062 Aug 2 21:30 install.log.syslog-rw-r--r-- 1 root root 435891 Aug 3 13:55 iptables-1.4.2.tar.bz2-rw-r--r-- 1 root root 128196 Aug 3 13:55 l7-protocols-2008-10-04.tar.gz-rw-r--r-- 1 root rootAug 3 13:55 linux-9.tar.bz2-rw-r--r-- 1 root root 174790 Aug 3 13:55 netfilter-layer7-v2.20.tar.gz[rootgjp99 ~]# cd /usr/src/[rootgjp99 src]# lltotal 24drwxr-xr-x 3 root root 4096 Aug 2 21:25 kernelsdrwxrwxr-x 21 root root 4096 Oct 23 2008 linux-9drwxr-xr-x 4 1000 1000 4096 Aug 22 2008 netfilter-layer7-v2.20drwxr-xr-x 7 root root 4096 Aug 2 21:27 redhat[rootgjp99 src]# cd linux-9/[rootgjp99 linux-9]# patch -p1 /usr/src/netfilter-layer7-v2.20/kernel-2.6.25-layer7-2.20.patchpatching file net/netfilter/Kconfigpatching file net/netfilter/Makefilepatching file net/netfilter/xt_layer7.cpatching file net/netfilter/regexp/regexp.cpatching file net/netfilter/regexp/regexp.hpatching file net/netfilter/regexp/regmagic.hpatching file net/netfilter/regexp/regsub.cpatching file net/netfilter/nf_conntrack_core.cHunk #1 succeeded at 208 (offset -2 lines).patching file net/netfilter/nf_conntrack_standalone.cpatching file include/net/netfilter/nf_conntrack.hpatching file include/linux/netfilter/xt_layer7.h2、配置新内核shell cp /boot/config-2.6.18-8.el5 .config //偷个懒沿用旧的内核配置shell make menuconfig//配置内核时在“Networking --- Networking Options --- Network Packet filtering framework (Netfilter) ”处主要注意两个地方1)