On Sat, Aug 05, 2000 at 11:50:12AM -0600, George Sexton wrote:
> I guess I don't understand.
> 
> Here are the interfaces again:
> 
> Eth0 - aaa.bbb.ccc.ddd (Valid IP Address)
> Wan0 - 192.168.104.2 <--> ISP IF 192.168.104.1 <--> Internet
> 
> Packets originating from the machine with a non-local destination are
> assigned the address from the Wan0 interface.
> 
> Forwarding is turned on and packets coming in the Eth0 interface go out the
> Wan0 interface. This part works.
> 
> > 1. Configure it on loopback.
> 
> How would this work?
> 
> > 2. Or configure alias on Wan0 with address, which you desire to use
> >    and route to internet through this alias.
> 
> I don't think this solves the problem that packets originating from that
> host are assigned the address of the Wan0 interface.

I think, yes. We have a similar situation, and the following should do it for
a 2.2 kernel

ifconfig wan0:0 aaa.bbb.ccc.ddd netmask 255.255.255.255 broadcast 255.255.255.255
route add -host 192.168.104.1 dev wan0:0                # l1
route add default gw 192.168.104.1 dev wan0:0           # x1
route del -host 192.168.104.1 dev wan0:0                # l2

l1 and l2 are only needed because route seems not to accept a gateway route
over a special device if there is no route to the gateway to that device.
I don't know if it is the kernel or route itself which does this check - but
adding a host route and then deleting it works for us.

With the above: if a application lets choose the kernel the ip-address
it will use aaa.bbb.ccc.ddd if the default route applies.

Wolfgang Walter
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to