免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: GumpIQ
打印 上一主题 下一主题

求一条iptables规则 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2004-05-16 18:53 |只看该作者

求一条iptables规则

  1. iptables -t nat -l POSTROUTING -j MASQUERADE
  2. iptables v1.2.7a: Unknown arg `-l'
  3. Try `iptables -h' or 'iptables --help' for more information.
复制代码


我不知道是 L的小写还是数字 1?

见笑了。

论坛徽章:
0
12 [报告]
发表于 2004-05-16 18:56 |只看该作者

求一条iptables规则

hijk的i,大写

论坛徽章:
0
13 [报告]
发表于 2004-05-16 18:57 |只看该作者

求一条iptables规则

谢谢。
我够衰的。

  

论坛徽章:
0
14 [报告]
发表于 2004-05-16 19:01 |只看该作者

求一条iptables规则


其实我还不知道是不是可以那。。。

论坛徽章:
0
15 [报告]
发表于 2004-05-16 19:01 |只看该作者

求一条iptables规则

但是,我在我的这个虚拟环境没有成功:仍然得到两个不同的页面。

  1. iptables -L -t nat
  2. Chain PREROUTING (policy ACCEPT)
  3. target     prot opt source               destination         
  4. DNAT       tcp  --  anywhere             192.168.0.1      tcp dpt:http to:192.
  5. 168.1.1:80

  6. Chain POSTROUTING (policy ACCEPT)
  7. target     prot opt source               destination         
  8. MASQUERADE  all  --  anywhere             anywhere           

  9. Chain OUTPUT (policy ACCEPT)
  10. target     prot opt source               destination      
复制代码


  1. cat /proc/sys/net/ipv4/ip_forward
  2. 1
复制代码


  1. lsmod|grep ip
  2. ipt_MASQUERADE          2200   1  (autoclean)
  3. iptable_filter          2412   0  (autoclean) (unused)
  4. iptable_nat            21720   1  (autoclean) [ipt_MASQUERADE]
  5. ip_conntrack           26976   1  (autoclean) [ipt_MASQUERADE iptable_nat]
  6. ip_tables              15096   5  [ipt_MASQUERADE iptable_filter iptable_nat]
复制代码

论坛徽章:
0
16 [报告]
发表于 2004-05-16 19:45 |只看该作者

求一条iptables规则

up一下。
是否我在本机使用单网卡双ip有问题?
但是,我无论使用域名还是ip都可以正确打开规定的页面。

论坛徽章:
0
17 [报告]
发表于 2004-05-16 20:53 |只看该作者

求一条iptables规则

再次顶上来。
明天要和领导交代啊。

论坛徽章:
0
18 [报告]
发表于 2004-05-16 21:18 |只看该作者

求一条iptables规则

晕。。。我帮不上忙了。。。

论坛徽章:
0
19 [报告]
发表于 2004-05-16 22:26 |只看该作者

求一条iptables规则

支持

论坛徽章:
0
20 [报告]
发表于 2004-05-16 22:54 |只看该作者

求一条iptables规则

不知道楼上的兄弟支持什么?呵呵。

又找了iptables的书仔细看了看,发觉 wd 兄提供的方案应该是可行的。
但是我的没有执行是否是因为我虚拟了ip呢?
或者,是我的某些功能没有打开?
希望明天在单位尝试的时候可以成功。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP