[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Routing Problem



Doug MacFarlane schreibt:

On 11 Dec 2002, 11:57:01, mb@mmvi.de wrote:
On Server (with debian 3.0 ofcourse, kernel 2.4.20 ) has got two network-adapter. The ip's on this adapters are in seperated subnets. NIC A ist the def.gw. The machine is running two webservers (apache). A forwarding between the NIC should not be done.
Now the problem:
If i connect the webserver bound to NIC B, the packets recieves the apache but no packets returns to my client. I think, this is a routing-probelm. All packets will be send back using NIC A. The client's ip-stack will not recognize the packet with the ?wrong? ip-address.

I assume that your client and NIC B are on different subnets?  The reason this happens is that the
web-server looks at your client's IP address, and compares it to it's two
IP addresses for subnet-mask bits and determines that your client IP is NOT
on the same network as either NIC, so it sends it to the default gateway.

Right,
The client uses different ip addresses.
The ugly but simple way to fix this is with a Static Route
route add net client.ip.address.here mask whatever.is.appropriate.here gateway
ip.address.NICB.shoulduse
This will work fine for a small number of networks, but becomes a headache
if you can's specify the network NICB should route to efficiently.

Yes, if there are only a few clients with known ip's AND they are only using server-A or server-B (not both), this will work. In my senario, there are ca. 25.000 different (dial-in)ip's and they uses both webservers.

I want to do this because of security-reason. I dont want to use two (physikaly) servers but devide the two servers by using two nic's, two subnets and two apaches.
Greetz
Marc



Reply to: