19. 知识准备
编译和升级 Linux 内核
Linux 下软件的安装
Linux 网络的配置
( 我们这里的安装以 netfilter/iptables 为例)
www.chinaunix.net
20. Linux 内核的编译
使用 wget 从网站获取最新的内核源码包
cp linux-2.4.18.tar.gz /usr/src
cd /usr/src
tar zxvf linux-2.4.18.tar.gz
cd /usr/src/linux
make menuconfig
make dep
make clean
make bzImage
make modules
make modules_install
www.chinaunix.net
21. Linux 内核 netfilter 的配置
[*] Network packet filtering (replaces ipchains)
<M> Connection tracking (required for masq/NAT)
<M> FTP protocol support
<M> IRC protocol support
<M> Userspace queueing via NETLINK (EXPERIMENTAL)
<M> IP tables support (required for filtering/masq/NAT)
<M> limit match support
<M> MAC address match support
<M> netfilter MARK match support
<M> Multiple port match support
<M> TOS match support
<M> tcpmss match support
www.chinaunix.net
22. Linux 内核 netfilter 的配置
<M> Connection state match support
<M> Packet filtering
<M> REJECT target support
<M> Full NAT
<M> MASQUERADE target support
<M> REDIRECT target support
<M> Packet mangling
<M> TOS target support
<M> MARK target support
<M> LOG target support
<M> TCPMSS target support
<M> ARP tables support
<M> ARP packet filtering
www.chinaunix.net
23. 安装 netfilter
下载 netfilter (http://www.netfilter.org)
RPM 方式:
• rpm –ivh netfiter.0.1.18.i386.rpm
源码安装:
• tar zxvf netfilter-0.1.18.tar.gz
• cd netfilter
• ./configure
• make
• make install
www.chinaunix.net
24. 安装 iptables
下载 iptables (http://www.netfilter.org)
RPM 方式:
• rpm –ivh iptables-1.2.7a-1.i386.rpm
源码安装:
• tar zcvf iptables-1.2.7a.tar.gz
• cd iptables-1.2.7a
• ./configure
• make
• make install
www.chinaunix.net