想让局网输入的任何地址都转向1.2.3.4该如何写规则呀

由 风中追风 在 05-29-2004 21:59 发表:

想让局网输入的任何地址都转向1.2.3.4该如何写规则呀

请问:想让局网输入的任何地址都转向1.2.3.4,iptables该如何写规则呀

eth0为外网

eth1为内网

服务器有固定公网IP


由 Exit 在 05-30-2004 02:00 发表:


感觉这个可以用路由。用iptables实现不了。

路由学习的不是很多,不能解答你了。


由 Snoopy 在 05-30-2004 02:44 发表:


iptables实现得了,,具体你参考一下文章吧,


And then in the evening light, when the bars of freedom fall

I watch the two of you in the shadows on the wall

How in the darkness steals some of the choices from my hand

Then will I begin to under


由 Exit 在 05-30-2004 12:22 发表:


echo "1" > /proc/sys/net/ipv4/ip_forward

iptables -t nat -i eth0 -j DNAT --to-destination 1.2.3.4

iptables -t nat -o eth1 -j SNAT --to-source $本机ip

不知道这样可不可以。


由 风中追风 在 05-30-2004 12:42 发表:


还是没有成功,

麻烦哪位大虾帮忙把规则写出来!

文章都看过了,就是搞不清楚。


由 Snoopy 在 05-30-2004 16:05 发表:


iptables -t nat -A PREROUTING -i eth0 -j DNAT --to-destination 1.2.3.4

iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source $本机ip

试下


And then in the evening light, when the bars of freedom fall

I watch the two of you in the shadows on the wall

How in the darkness steals some of the choices from my hand

Then will I begin to under


由 风中追风 在 05-31-2004 12:56 发表:


顶!

都试过了,还是没有成功,大家继续出主意啊!


由 Snoopy 在 05-31-2004 14:56 发表:

回复: 想让局网输入的任何地址都转向1.2.3.4该如何写规则呀

> quote: > > * * * > > 最初由 风中追风 发表
>
> **请问:想让局网输入的任何地址都转向1.2.3.4,iptables该如何写规则呀
>
>
>
> eth0为外网< **

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus