双IP,双网关的共享服务器设置

由 ihqv 在 07-17-2004 02:19 发表:

双IP,双网关的共享服务器设置

这个网络材用两个公网IP(有两条光纤)

这台服务器要做的是,局域网内的客户端分成两部份,分别通过两个公网IP代理上网(四块网卡, 两个公网IP两块,两个网关两块)

两个网关分别为:192。168。0。1和192。168。1。1

这样的服务器应该怎么设置,请高手帮忙


由 smile787 在 07-17-2004 14:50 发表:

回复: 双IP,双网关的共享服务器设置

> quote: > > * * * > > 最初由 ihqv 发表
>
> **(四块网卡, 两个公网IP两块,两个网关两块)
>
> 两个网关分别为:192。168。0。1和192。168。1。1
>
> ** > > * * *

不用四块啊!三块就好了!买个好点的网卡!

基本上你说的这些很容易做!论坛有讨论过.

建议:装上redhat 9或者更高(容易得到),加载iptables脚本就可以了!

iptables -t nat POSTROUTING -s 192.168.0.0/24 -o eth0 -j SNAT --to internetIP

iptables -t nat POSTROUTING -S 192.168.1.0/24 -o eht1 -j SNAT --to internetIP2

很久没写脚本.


由 ihqv 在 07-18-2004 18:06 发表:


iptables -t nat POSTROUTING -s 192.168.0.0/24 -o eth0 -j SNAT --to internetIP

iptables -t nat POSTROUTING -S 192.168.1.0/24 -o eht1 -j SNAT --to internetIP2

这样的话, /etc/sysconfig/network和ifcfg-eth2(就是内网网关的IP)这里怎么设置啊


由 Snoopy 在 07-18-2004 21:17 发表:


不是在设置ip的配置文件里添加,你可以在命令行完成它,或是启动时需要加到/etc/rc.local,或是做个脚本都可以


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


由 Snoopy 在 07-19-2004 16:46 发表:


你的是这样对吧,

eth0 公网IP1

eth1 192.168.0.1

eth2 公网IP2

eth3 192.168.1.1

iptables -t nat POSTROUTING -s 192.168.0.0/24 -o eth0 -j SNAT --to 公网IP1

iptables -t nat POSTROUTING -S 192.168.1.0/24 -o eht3 -j SNAT --to 公网IP2

参考: http://www.linuxsir.org/bbs/showthr...;threadid=80653


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


由 ihqv 在 07-20-2004 00:10 发表:


虽然好多看不懂,,

谢谢老大


由 zonzi 在 07-20-2004 14:06 发表:


> quote: > > * * * > > 最初由 ihqv 发表
>
> **虽然好多看不懂,,
>
> 谢谢老大 ** > > * * *

不用看懂的,只要用root打开一个终端,输入以上东西就好了......


菜鸟想回帖~有心也无力,| 本人菜鸟 做菜刚好,

勉强来回帖~滥竽来充数,| 抽空回帖 质量难保

欲要问题解~大侠自来也, | 偶尔失误 肯定不少

用了我的帖~后果请自负. |如要追查 我——撒腿就跑

对rpm一窍不通


由 kuxila 在 07-20-2004 17:41 发表:


基本上你们说的方法都行不通

敢问大侠们?你们没想到他说的是有两个公网ip吗?那么是不是需要设置两个网关?如果设置了两个网关的话,路由表里会出现两条缺省路由,那么实际上计算机就只能选则其中的一条缺省路由发送数据包,那有两个公网ip又有什么用?!

如果非要用两个公网ip的话,楼主只能牺牲个人时间,将某些静态路由一条一条的输入到计算机里,要么就在网上找找负载均衡的软件才行!


由 ihqv 在 07-20-2004 23:29 发表:


对啊,缺省路由怎么办啊


由 smile787 在 07-21-2004 00:23 发表:


四个网关都可以,看你的主板支持!肯定行的通!


由 spblue 在 07-23-2004 20:35 发表:


我的情况和搂主差不多 只是我想一个网卡绑定两个IP 这样可以节省

一个网卡~ 我用的是debian 但我按网上找来的资料 都无法实现的

都郁闷两个星期了


由 smile787 在 07-24-2004 00:

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