Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Apr 2006 08:18:56 +0200 (MET DST)
From:      Helge Oldach <helge.oldach@atosorigin.com>
To:        lk@tempest.sk (Ludovit Koren)
Cc:        freebsd-net@freebsd.org
Subject:   Re: Routes for interface
Message-ID:  <200604250618.IAA00144@galaxy.hbg.de.ao-srv.com>
In-Reply-To: <87k69f0ydi.fsf@lk107.tempest.sk> from Ludovit Koren at "Apr 24, 2006  5:47: 5 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Ludovit Koren:
>is there any possibility to set the routing statically on a multi-homed
>host so, that the packet is sent back via the same interface, as it has
>came from?

ipfw(4) is your friend, for example on a box with addresses
192.168.20.31 and 172.16.164.54 with respective gateways 192.168.21.254
and 172.16.164.1:

00100   31716   3368679 allow ip from 192.168.20.31 to 192.168.20.0/23
00200  671653  64044345 fwd 192.168.21.254 ip from 192.168.20.31 to any
00300   59889   3353166 allow ip from 172.16.164.54 to 172.16.164.0/22
00400     317     28628 fwd 172.16.164.1 ip from 172.16.164.54 to any
00500 7075682 948430737 allow ip from any to any
65535       0         0 deny ip from any to any

Helge



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604250618.IAA00144>