手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆

虚拟机上iptables不支持nat转发?

首页 > 苹果相关 >

在虚拟机上尝试装ppptp的时候,发现一个问题,因为最后需要设置iptables,但是在执行的时候,报了这个错:
can’t initialize iptables table `nat’ ,后面还有一句我就不贴了。

找了很多资料,发现可能是在编译内核的时候,把nat去掉了。这样我就无法转发nat了。也就是说我的pptp是没有办法成功运行了。

再google了一下,发现一些问题,如果要加上这个nat,好象非得重新编译内核。否则无法装上。当然,也看到一篇文章说直接运行某句命令就OK了。【来源:http://pearlin.info/enable-nat-module-for-vps-cant-initialize-iptables-table-nat-table-does-not-exist/】
但好象我的虚拟机不是openVZ的。。。继续哭泣

XML/HTML代码
  1. I was getting the following error which configuring NAT on a VPS server.  
  2.   
  3. =========  
  4.   
  5. # iptables -t nat -nvL  
  6. iptables v1.3.5: can’t initialize iptables table `nat’: Table does not exist (do you need to insmod?)  
  7. Perhaps iptables or your kernel needs to be upgraded.  
  8.   
  9. =========  
  10.   
  11. You can fix this by using the following commands.  
  12.   
  13. vzctl set 115 –iptables “iptable_nat iptable_filter iptable_mangle ip_conntrack ipt_conntrack ipt_REDIRECT ipt_REJECT ipt_multiport ipt_helper ipt_LOG ipt_state” –save  
  14. Saved parameters for VE 115  
  15.   
  16. # vzctl restart 115  
  17. …  
  18. # vzctl enter 115  
  19. # iptables -t nat -nvL  
  20. Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)  
  21. pkts bytes target prot opt in out source destination  
  22.   
  23. Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)  
  24. pkts bytes target prot opt in out source destination  
  25.   
  26. Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)  
  27. pkts bytes target prot opt in out source destination   

不知道VPS的提供商能不能帮我装了。如果不行,那我可能就要換VPS了。。。痛苦啊。下次还是用UBUNTU吧。方便。。。。




本站采用创作共享版权协议, 要求署名、非商业和保持一致. 本站欢迎任何非商业应用的转载, 但须注明出自"易栈网-膘叔", 保留原始链接, 此外还必须标注原文标题和链接.

Tags: iptables, nat

« 上一篇 | 下一篇 »

只显示10条记录相关文章

Yii CDbCriteria的常用方法 (浏览: 57950, 评论: 5)

1条记录访客评论

不错,也看过广告。应该还可以

Post by 減肥 on 2011, April 25, 12:29 AM 引用此文发表评论 #1

看了演示视频,非常不错。激动人心的功能。

Post by yhustc on 2011, April 15, 9:53 AM 引用此文发表评论 #2

很方便的,我装上了,只不过没什么网站可以做的。

Post by 水月 on 2011, April 15, 9:12 AM 引用此文发表评论 #3


发表评论

评论内容 (必填):