红旗linux 的iptables安装 设置NAT代理 笔记

1 安装iptables v1.4.7,下载iptables-1.4.7.tar.bz2
  #bzip2 -d iptables-1.4.7.tar.bz2
  #tar xf iptables-1.4.7.tar
  #cd iptables-1.4.7

  #./configure

  #make KERNEL_DIR=/usr/src/linux/include
  #make install  KERNEL_DIR=/usr/src/linux/include
 2. 配置Iptables
  #echo "1">/proc/sys/net/ipv4/ip_forward
  #iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

3.检查Iptables配置

  #iptables -L

4.检查服务器路由

  #route

原文地址:https://www.cnblogs.com/jifeng/p/1730917.html