about routing

Mike Bristow mike at urgle.com
Tue Sep 11 10:57:13 BST 2001


On Mon, Sep 10, 2001 at 11:54:41PM +0800, M.H.Hung wrote:
> I set an ip alias 203.74.57.5 for some reason, but this ip
> is not visibale outside anywhere, 

You should probably use one of the networks in RFC1918 for 
this.  

> I think when an ip packet
> come in to this ip, it's returning packet will go throuth
> default gateway, 

Yes.

> but I want this returning packet will go through
> another gateway 203.74.57.254 if the source packet come from the
> ip alias 203.74.57.5, can anybody tell me how to configure?

You'll need to setup ipfw and have a rule something like:

fwd 203.74.57.254 ip from 203.74.57.5 to any

among all the other standard firewall-ish rules you'll probably want.

See ipfw(8).

-- 
Mike Bristow, seebitwopie  




More information about the Ukfreebsd mailing list