成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

netfilter/iptables系統的安裝

運維 系統運維
netfilter/iptables系統的安裝:在Linux中,提供了一個非常優秀的防火墻工具netfilter/iptables。netfilter/iptables是完全免費的,而且功能強大,使用靈活。netfilter/iptables可以對流入和流出的信息進行細化控制,且可以在一臺低配置機器上很好地運行。本文講述的是netfilter/iptables系統的安裝

  安裝netfilter/iptables 系統:

  因為 netfilter/iptables 的 netfilter 組件是與內核 2.4.x 集成在一起的,所以只需要下載并安裝 iptables 用戶空間工具。

  需求

  下面是安裝 netfilter/iptables 系統的需求:

  硬件:要使用 netfilter/iptables,需要有一個運行 Linux OS 并連接到因特網、LAN 或 WAN 的系統。

  軟件:帶有內核 2.4 或更高版本的任何版本的 Linux OS。可以從 http://www.kernel.org 下載最新版本的內核。還需要從 http://www.netfilter.org 下載 iptables 這個用戶空間工具,因為這個工具不是內核的一部分。但對于 RedHat Linux 版本 7.1 或更高版本,不需要下載此工具,因為在版本 7.1 或更高版本中,標準安裝中已經包含了此工具。

  用戶:至少對 Linux OS 有中等水平的了解,以及具備配置 Linux 內核的經驗。

  安裝前的準備

  在開始安裝 iptables 用戶空間工具之前,需要對系統做某些修改。首先,需要使用 make config 命令來配置內核的選項。在配置期間,必須通過將 CONFIG_NETFILTER 和 CONFIG_IP_NF_IPTABLES 選項設置為 Y 來打開它們,因為這是使 netfilter/iptables 工作所必需的。下面是可能要打開的其它選項:

  CONFIG_PACKET : 如果要使應用程序和程序直接使用某些網絡設備,那么這個選項是有用的。

  CONFIG_IP_NF_MATCH_STATE : 如果要配置 有狀態的防火墻,那么這個選項非常重要而且很有用。這類防火墻會記得先前關于信息包過濾所做的決定,并根據它們做出新的決定。我將在 netfilter/iptables 系統的優點一節中進一步討論這方面的問題。

  CONFIG_IP_NF_FILTER : 這個選項提供一個基本的信息包過濾框架。如果打開這個選項,則會將一個基本過濾表(帶有內置的 INPUT 、 FORWARD 和 OUTPUT 鏈)添加到內核空間。

  CONFIG_IP_NF_TARGET_REJECT : 這個選項允許指定:應該發送 ICMP 錯誤消息來響應已被 DROP 掉的入站信息包,而不是簡單地殺死它們。

  現在,可以準備安裝這個用戶空間工具了。

  安裝用戶空間工具

  在下載 iptables 用戶空間工具的源代碼(它類似于 iptables-1.2.6a.tar.bz2)之后,可以開始安裝。您需要以 root 身份登錄來執行安裝。 清單 1 給出了一個示例,它指出了安裝該工具所需的命令、其必要的次序及其說明。

  清單 1. 用戶空間工具安裝的示例

  1.   First, unpack the tool package into a directory:  
  2.  
  3.   # bzip2 -d iptables-1.2.6a.tar.bz2  
  4.  
  5.   # tar -xvf iptables-1.2.6a.tar  
  6.  
  7.   This will unpack the tool source into a directory named iptables-1.2.6a.  
  8.  
  9.   Now change to the iptables-1.2.6a directory:  
  10.  
  11.   # cd iptables-1.2.6a  
  12.  
  13.   The INSTALL file in this directory contains a lot of useful information  
  14.  
  15.   on compiling and installing this tool.  
  16.  
  17.   Now compile the userspace tool using the following command:  
  18.  
  19.   # make KERNEL_DIR=/usr/src/linux/  
  20.  
  21.   Here the KERNEL_DIR=/usr/src/linux/ specifies the path to the kernel's  
  22.  
  23.   directory. If the directory of kernel happens to be different on some  
  24.  
  25.   systems, the appropriate directory path should be substituted for  
  26.  
  27.   /usr/src/linux.  
  28.  
  29.   Now install the source binaries using the following command:  
  30.  
  31.   # make install KERNEL_DIR=/usr/src/linux/  
  32.  
  33.   Now the installation is complete.  
  34.  

  注:如果您有 RedHat Linux 版本 7.1 或更高版本,就不需要執行這里說明的前兩個步驟。正如我們所知道的,該 Linux 分發版(distribution)的標準安裝中包含了 iptables 用戶空間工具。但在缺省情況下,這個工具是關閉的。為了使該工具運行,需要執行以下步驟( 清單 2):

  清單 2. 在 RedHat 7.1 系統上設置用戶空間工具的示例

  1.   First you'll have to turn off the old ipchains module (predecessor of  
  2.  
  3.   iptables) available in this OS package.  
  4.  
  5.   This can be done using the following command:  
  6.  
  7.   # chkconfig --level 0123456 ipchains off  
  8.  
  9.   Next, to completely stop the ipchains module from running, so that it  
  10.  
  11.   doesn't conflict with the iptables tool, you will have to stop the ipchains  
  12.  
  13.   service using the following command:  
  14.  
  15.   # service ipchains stop  
  16.  
  17.   Now if you don't want to keep this old ipchains module on your system,  
  18.  
  19.   uninstall it using the following command:  
  20.  
  21.   # rpm -e ipchains  
  22.  
  23.   Now you can turn on the iptables userspace tool with the following command:  
  24.  
  25.   # chkconfig --level 235 iptables on  
  26.  
  27.   Finally, you'll have to activate the iptables service to make the userspace  
  28.  
  29.   tool work by using this command:  
  30.  
  31.   # service iptables start  
  32.  
  33.   Now the userspace tool is ready to work on a RedHat 7.1 or higher system.  
  34.  

  現在,一切都已妥當,并且 netfilter/iptables 系統應該正在運行,接下來(下一節講述),需要建立規則和鏈來過濾信息包

【編輯推薦】

Linux下Iptables防火墻的使用

iptables簡介與安裝命令

Squid+iptables代理配置

責任編輯:zhaolei 來源: IBM
相關推薦

2011-03-15 15:47:34

netfilteriptables

2011-03-15 12:47:11

netfilteriptables

2011-03-15 15:51:12

netfilteriptables

2011-03-15 10:00:01

NetfilterIPTables

2011-03-15 15:47:26

netfilteriptables

2021-04-14 20:10:50

Netfileter Iptables 源碼

2011-03-15 09:10:43

iptables防火墻

2010-12-07 09:51:43

Linux安全性netfilteriptables

2011-03-15 10:48:47

2011-03-15 09:59:54

2011-03-15 09:59:54

2011-07-05 14:34:23

2011-07-13 10:30:09

2022-10-27 20:31:19

iptablesnetfilter

2011-03-14 15:12:27

iptables安裝

2011-03-15 15:47:25

iptables安裝命令

2011-03-15 16:12:45

iptablesRed Hat

2018-10-10 10:37:03

2011-03-18 09:26:13

Iptables規則

2011-03-17 16:00:57

點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 在线观看国产wwwa级羞羞视频 | 精品在线观看入口 | 成人夜晚看av | 国产成人自拍av | 99热都是精品 | 99精品久久久国产一区二区三 | 国产精品夜色一区二区三区 | 精品无码久久久久国产 | 国产成人精品久久二区二区91 | 国产成人精品一区二区三区在线 | 成人在线视频观看 | caoporn国产精品免费公开 | 色天天综合 | 欧美日韩在线观看一区 | 欧美一区二区在线观看 | 久久五月婷 | 电影91久久久 | 天天躁日日躁xxxxaaaa | 国产精品自拍视频 | 欧美日韩精品一区二区三区四区 | 国产亚洲一区精品 | 亚洲欧美一区二区三区国产精品 | 国产精品国产三级国产aⅴ原创 | 国产精品美女久久久 | 91精品国产91久久久久久最新 | 日本免费在线观看视频 | av一二三区 | 欧美激情在线精品一区二区三区 | 欧美日韩在线免费观看 | 欧美一区 | 久久www免费人成看片高清 | 久久99精品国产99久久6男男 | 国产精品福利视频 | 亚洲精品一区二区三区在线 | 美女国内精品自产拍在线播放 | 久久精品一级 | 亚洲免费在线观看 | 天天操夜夜操 | 国产日韩欧美一区二区 | 久久久久久久香蕉 | 免费看黄视频网站 |