centos1 发表于 2010-04-26 14:57
请教 redhat NAT 配置
[i=s] 本帖最后由 centos1 于 2010-04-26 15:39 编辑 [/i]
遇到的情况如下:
1.一个设备和 redhat 直连,reahat 开启了路由,现在从 redhat 上可以 ping 通我要到达的 IP。
2.从设备上可以 ping 通 redhat 的另一个网卡(不是直连的),但是从 redhat 上 ping 不通到达目的 IP 的下一条路由。
现在想请教,能不能做个 NAT ,让我的设备到达目的 IP。
再请教下面报错是什么意思?如何解决?[code][root@localhost ~]# iptables -A POSTROUTING -t nat -o eth0 -j MASQUEREAD
iptables v1.2.11: Couldn't load target `MASQUEREAD':/lib/iptables/libipt_MASQUEREAD.so: cannot open shared object file: No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
[root@localhost ~]# [/code]
chenyx 发表于 2010-04-26 15:00
可以做到.在论坛里面找个例子自己改造下
centos1 发表于 2010-04-26 15:16
[b]回复 [url=http://linux.chinaunix.net/bbs/redirect.php?goto=findpost&pid=7242310&ptid=1162596]2#[/url] [i]chenyx[/i] [/b]
请问一下您可以给个例子吗?
我对 redhat 不熟,谢谢。。。
programmerdd 发表于 2010-04-26 17:55
貌似你的命令写错了吧!
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
centos1 发表于 2010-04-26 18:39
[b]回复 [url=http://linux.chinaunix.net/bbs/redirect.php?goto=findpost&pid=7242439&ptid=1162596]4#[/url] [i]programmerdd[/i] [/b]
多谢,已经解决了,是命令写错了。