ptables的NAT功能设置和linux升级内核后遇到 can't initialize iptables table `nat': Table does not exist 问题
来源:互联网 发布:剑灵桐人捏脸数据 编辑:程序博客网 时间:2024/06/05 16:28
方法:
提示: 以下方法只适用于红帽企业版Linux 3 以上。
1、打开包转发功能:
echo "1" > /proc/sys/net/ipv4/ip_forward
2、修改/etc/sysctl.conf文件,让包转发功能在系统启动时自动生效:
# Controls IP packet forwarding
net.ipv4.ip_forward = 1
3、打开iptables的NAT功能:
/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
说明:上面的语句中ppp0是连接外网或者连接Internet的网卡. 执行下面的命令,保存iptables的规则: service iptables save
4、查看路由表:
netstat -rn 或 route -n
5、查看iptables规则:
iptables -L
查看nat表
iptables -t nat -L
编译好新内核后
# iptables -t nat -nL 提示
iptables v1.3.5: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
解决方法: 编译内核时加入以下模块
Linux Kernel Configuration
-> Networking support
-> Networking options
-> Network packet filtering framework(netfilter)
-> Core netfilter configuration
-> Netfilter connection tracking support
-> Netbios name service protocal support(new)
-> Netfilter Xtables support (required for ip_tables)
Linux Kernel Configuration
-> Networking support
-> Networking options
-> Network packet filtering framework(netfilter)
-> IP: Netfilter Configuration
-> IPv4 connection tracking support (require for NAT)
-> IP tables support (required for filtering/masq/NAT)
-> Full NAT
-> MASQUERADE target support
-> REDIRECT target support
make -j2
make -j2 all
make -j2 modules_install
make -j2 install
升级完成后重启重新配置nat即可。
参考:http://blog.sina.com.cn/s/blog_654a4e8b0100ii3y.html
- ptables的NAT功能设置和linux升级内核后遇到 can't initialize iptables table `nat': Table does not exist 问题
- iptables的NAT功能设置和linux升级内核后遇到 can't initialize iptables table `nat': Table does not exist 问题
- can't initialize iptables table `nat': Table does
- Android内核编译(支持netfilter/iptalbes)(can't initialize iptables table `filter': iptables who)
- linux-iptables设置NAT
- iptables的NAT设置
- 做NAT ip_conntrack: table full 的问题
- Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 问题的解决方法
- Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 问题的解决方法
- Mysql linux 安装时遇到 Can't open and lock privilege tables: Table 'mysql.user' doesn't exist 错误解决方案
- table or view does not exist -- oracle
- table or view does not exist
- [datapump] ORA-39034: Table TABLE_DATA:<table Name> does not exist.
- VM NAT 设置遇到的问题~~~
- 容器中使用iptables报错can't initialize iptables table Permission denied (you must be root)
- Linux下iptables的NAT功能实现路由器
- Linux下iptables的NAT功能实现路由器
- 关于linux做nat出现“table full”的终极解决办法。
- 编译后报错说 找不到 mysql.h
- Android平台上的进程调度探讨
- 【错误集】各种错误情况+解决办法(长期更新)
- 移动Web App流行框架比较分析
- Java编程中必备的十种技能
- ptables的NAT功能设置和linux升级内核后遇到 can't initialize iptables table `nat': Table does not exist 问题
- ubuntu下安装scrapy
- 升级vs2008后,区域设置不正常导致路径转换失败的问题
- DJANGO 上传 image
- Oracle游标属性介绍
- Android 项目出现红色感叹号解决方法
- 戴尔计划在未来3年削减20亿美元开支
- 联通定制版GALAXY S Ⅲ发布 选286套餐0元购机
- 如何在Oracle中释放flash_recovery_area(粗鲁的方法)