The CentOS5 series currently comes with iptables 1.3.5. if you need to use more new versions of iptables, you can manually upgrade it. here we use iptables1.4.9 as an example. 1. download wgethttp: // www.centoscn.com/tool/iptables-1.4.9.tar.bz2、to decompress the tarxjvfiptab
The CentOS 5 series currently comes with iptables 1.3.5. if you need to use more new versions of iptables, you can manually upgrade it. here we use iptables 1.4.9 as an example.
1. Download
wget http://www.centoscn.com/tool/iptables-1.4.9.tar.bz2
II. decompress
tar xjvf iptables-1.4.9.tar.bz2cd iptables-1.4.9
Run the preceding commands in SSH to decompress and enter the iptables directory.
3. follow the default settings and install
Yum-y install gcc-c ++ # install the components required for compilation./configuremake & make install
Run the preceding commands by using SSH.
The default installation path is/usr/local/sbin. we need to replace the installed file with/sbin, so that the iptables file can be upgraded and replaced.
IV. replacing files
Service iptables stop # First disable iptablescd/usr/local/sbin # enter the corresponding directory, and overwrite the cp/usr/local/sbin/iptables/sbin/cp/usr/local/sbin/iptables-restore/sbin/cp/usr/local/sbin/iptables- save/sbin/
Run the preceding commands by using SSH. If the message "cp: overwrite" is displayed, enter"YAnd press enter.
5. restart and verify whether the upgrade is successful
service iptables startiptables -V
Run the preceding commands by using SSH. Restart iptables and view the current version of iptables.
If the current version is v1.4.9, iptables is successfully upgraded!