在centos中升级iptables
一般服务器或vps上yum安装的iptables,基本上版本都比较老,那么今天我来给大家讲解下怎么手动对iptables进行升级,好了,看教程吧.
系统:centos 5.5
需要的软件包:iptables-1.4.12.2.tar.bz2 (目前是最新的版本)
大家可以看到目前我这台服务器的iptables版本是1.3.5

1.下载iptables并解压
首先我们要先把iptables给停止
service iptables stop
然后开始下载
wget -c http://netfilter.org/projects/iptables/files/iptables-1.4.12.2.tar.bz2
tar jxf iptables-1.4.12.2.tar.bz2 && cd iptables-1.4.12.2
2.编译安装iptables
./configure
make && make install
这里要说一下,编译安装iptables的路径是在/usr/local/sbin里,我们需要把/usr/local/sbin里的文件替换到/sbin里.
3.开始升级iptables
cd /usr/local/sbin
\cp iptables /sbin
\cp iptables-restore /sbin/
\cp iptables-save /sbin/
替换后重启iptables,并检查版本
service iptables start
iptables -V
好了,可以看到我们的iptables已经升级成功.

系统:centos 5.5
需要的软件包:iptables-1.4.12.2.tar.bz2 (目前是最新的版本)
大家可以看到目前我这台服务器的iptables版本是1.3.5

1.下载iptables并解压
首先我们要先把iptables给停止
service iptables stop
然后开始下载
wget -c http://netfilter.org/projects/iptables/files/iptables-1.4.12.2.tar.bz2
tar jxf iptables-1.4.12.2.tar.bz2 && cd iptables-1.4.12.2
2.编译安装iptables
./configure
make && make install
这里要说一下,编译安装iptables的路径是在/usr/local/sbin里,我们需要把/usr/local/sbin里的文件替换到/sbin里.
3.开始升级iptables
cd /usr/local/sbin
\cp iptables /sbin
\cp iptables-restore /sbin/
\cp iptables-save /sbin/
替换后重启iptables,并检查版本
service iptables start
iptables -V
好了,可以看到我们的iptables已经升级成功.

评论: