Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Aug 2013 09:15:20 -0400
From:      Michael Sierchio <kudzu@tenebras.com>
To:        Jos Chrispijn <kernel@webrz.net>
Cc:        "freebsd-questions@FreeBSD.org" <freebsd-questions@freebsd.org>
Subject:   Re: ipfw gateway rerouting
Message-ID:  <CAHu1Y72oE2zKR_Y=MkpLuFchr2fqYcfN-ekU1w3ro_nAu_vw5Q@mail.gmail.com>
In-Reply-To: <52111D47.1060903@webrz.net>
References:  <52111D47.1060903@webrz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
# my kernel has
# options         ROUTETABLES=16

GATEWAY_0="10.3.255.0"
GATEWAY_1="10.3.255.1"

setfib 0 route add default $GATEWAY_0
setfib 1 route add default $GATEWAY_1

ipfw table 1 add $NET_0 0
ipfw table 1 add $NET_1 0
ipfw table 1 add $NET_2 1
ipfw table 1 add $NET_3 0

ipfw add 00500 setfib tablearg ip from any to any in lookup src-ip 1

rule 500 will cause traffic from NET_2 to go out a different gateway (if
it's not destined for a local net - presumably other rules will handle
those cases)

# man setfib
# man ipfw (see the section on the setfib action)




On Sun, Aug 18, 2013 at 3:15 PM, Jos Chrispijn <kernel@webrz.net> wrote:

> Can someone please hint me to to good explanatory site that explains how
> to reroute a network server to different/non standard network gateway(s)
> with ipfw?
>
> thanks,
> Jos Chrispijn
> ______________________________**_________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions<http://lists.freebsd.org/mailman/listinfo/freebsd-questions>;
> To unsubscribe, send any mail to "freebsd-questions-**
> unsubscribe@freebsd.org <freebsd-questions-unsubscribe@freebsd.org>"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHu1Y72oE2zKR_Y=MkpLuFchr2fqYcfN-ekU1w3ro_nAu_vw5Q>