From owner-freebsd-questions@FreeBSD.ORG Mon Aug 19 13:15:22 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 261C2792 for ; Mon, 19 Aug 2013 13:15:22 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: from mail-oa0-f46.google.com (mail-oa0-f46.google.com [209.85.219.46]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E53B42DB1 for ; Mon, 19 Aug 2013 13:15:21 +0000 (UTC) Received: by mail-oa0-f46.google.com with SMTP id l10so951919oag.19 for ; Mon, 19 Aug 2013 06:15:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Dhh8dB4koXLcxb1XeIRRvFzqXhuF3fT0/EWg/R6MfoQ=; b=mCUVrhonK0XtSOSHjqPLSqeKXAaRRn9c8m6g3CnixJhGudPFN9D8M5oA1AYomlnpxy WwuErKrqVCA+e1YIcE5VwanYhVQT0ZBu5JLXWn6rvb4gkwB7DuC3wNTtuXYX04A9nMXF aSWcUrl5ydyYWOmyBBrA/CPUxP/XP5IhuGhTQXzZTNlHZ4TnKKL2acfn2+zI7NVXDPtJ d5lLq1FRq/d6qgavzdPbbD44RziTzO0SgG5KgKpd/GOjkCqbhFS+Ho1/8E5P92njIKIM l83EEamtyQG/np+7pmlVun4x485BPYP66SvgJd1/CwLx1KazZsu9iKk/7KAib4FURoxt XTrw== X-Gm-Message-State: ALoCoQnh7PQ/0xWtrn/I5ci6NGmr/Z4kIt1bhKkhPYScA0VPg9BqdMA07GRJEc06HA5nGjSs9SmE MIME-Version: 1.0 X-Received: by 10.60.144.230 with SMTP id sp6mr320070oeb.102.1376918120736; Mon, 19 Aug 2013 06:15:20 -0700 (PDT) Received: by 10.60.21.69 with HTTP; Mon, 19 Aug 2013 06:15:20 -0700 (PDT) In-Reply-To: <52111D47.1060903@webrz.net> References: <52111D47.1060903@webrz.net> Date: Mon, 19 Aug 2013 09:15:20 -0400 Message-ID: Subject: Re: ipfw gateway rerouting From: Michael Sierchio To: Jos Chrispijn Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-questions@FreeBSD.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 13:15:22 -0000 # 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 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 > To unsubscribe, send any mail to "freebsd-questions-** > unsubscribe@freebsd.org " >