From owner-freebsd-net@FreeBSD.ORG Thu Sep 20 15:01:28 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8975B106566B for ; Thu, 20 Sep 2012 15:01:28 +0000 (UTC) (envelope-from misho@elwix.org) Received: from x0r.aitnet.org (unknown [IPv6:2a00:e40:deba:1::5]) by mx1.freebsd.org (Postfix) with ESMTP id E68908FC08 for ; Thu, 20 Sep 2012 15:01:27 +0000 (UTC) Received: from localhost (unknown [127.0.0.1]) by x0r.aitnet.org (Postfix) with ESMTP id B741C3F704 for ; Thu, 20 Sep 2012 18:01:20 +0300 (EEST) X-Virus-Scanned: amavisd-new at aitnet.org Received: from x0r.aitnet.org ([127.0.0.1]) by localhost (x0r.aitnet.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ohAFRp-G726g for ; Thu, 20 Sep 2012 18:01:15 +0300 (EEST) Received: from pi.batmbg.com (unknown [212.116.129.162]) by x0r.aitnet.org (Postfix) with ESMTPSA id 9C4D43F731 for ; Thu, 20 Sep 2012 18:01:15 +0300 (EEST) Date: Thu, 20 Sep 2012 18:01:15 +0300 From: Michael Pounov To: freebsd-net@freebsd.org Message-Id: <20120920180115.ede9a2b8.misho@elwix.org> In-Reply-To: <505B2555.40704@doblej.net> References: <505B2555.40704@doblej.net> Organization: ELWIX X-Mailer: Sylpheed 3.1.4 (GTK+ 2.24.6; i386-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: Multiroute question X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 15:01:28 -0000 Hi, Juan Use pf like in that simple example: $dsl_if = "CardA" $int_if = "CardB" $dsl_addr = "_dsl_if_ip_" $int_addr = "_int_if_ip_" $dsl_gw = "_dsl_gw_ip_" $int_gw = "_int_gw_ip_" set state-policy if-bound .... blah blah blah whatever rules ... pass out on $dsl_if route-to ($int_if $int_gw) from $int_if no state pass out on $int_if route-to ($dsl_if $dsl_gw) from $dsl_if no state # End pf example ;) On Thu, 20 Sep 2012 16:16:53 +0200 Juan José Sánchez Mesa wrote: > Hi! > > (sorry for my bad english) > > I have a FreeBSD machine (8.2-RELEASE-p3). The machine has two ethernet > cards, configured in this way: > > - Card A: internet IP address > - Card B: intranet IP address > > Default route goes via card A. > > Now, on the intranet I have a "normal" DSL router. Then, using NAT i've > forewarded a simple port from the DSL to the intranet IP of this machine. > > The incoming packets from the DSL comes ok to the machine (via card B), > but the outgoing packet goes to card A, due to the default route. > > There is a way to configure the network so that outgoing packets goes to > the card from where the incoming packets was arrived ? > > Or is this impossible to configure ? > > Thanks!!! > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" -- Best Regards, Michael Pounov ELWIX - embedded lightweight unix - WWW: http://www.elwix.org/ EMail: misho@elwix.org Skype: mpunov XMPP: misho@aitnet.org Phone: +359 888 737358; +359 899 737358