From owner-freebsd-net@FreeBSD.ORG Thu Sep 20 14:37:11 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 8047E106566C for ; Thu, 20 Sep 2012 14:37:11 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 082B58FC14 for ; Thu, 20 Sep 2012 14:37:10 +0000 (UTC) Received: by bkcje9 with SMTP id je9so1155260bkc.13 for ; Thu, 20 Sep 2012 07:37:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=m/eGrRXldRNek9aCLJRwrIIJBRIc0PVhCCp1wS38jOo=; b=Xb9b857/wReKBzdDZv2gJABN6CRaqIdKjhzIZiYB/F2NqT5JgUBJl2zqkDwHiq4CVB pHtfu5ZB0LmIaUgoYNsvpLDTezvwPrS8JkNHwevanqs5srin+CtYUTlizTxBMYg+gTgB kULStA+Z73enMMUecRPdC3KoATv1WG/RvOKahXdbjkXT9vZHwPPGkECcRFgvPgYv3k6q T3Gon6uiHa31wBCaWvuEPUCG2yK5BpeC18/VKSD11NC420yYJigK/g26Yaha+6M3Re1z lx/ZUUxa+WevBYE1e4ArQAnwmcC89ePG2kAeuupLqBQ4J0TjreWWENeKK3cboBHA9bF/ YIVg== Received: by 10.204.8.84 with SMTP id g20mr777293bkg.126.1348151824006; Thu, 20 Sep 2012 07:37:04 -0700 (PDT) Received: from [10.0.0.86] ([93.152.184.10]) by mx.google.com with ESMTPS id f7sm4505934bkv.1.2012.09.20.07.37.00 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Sep 2012 07:37:03 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\)) Content-Type: text/plain; charset=iso-8859-1 From: Nikolay Denev In-Reply-To: <505B2555.40704@doblej.net> Date: Thu, 20 Sep 2012 17:36:59 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <1A848DF9-53C7-4A06-85CD-81234EC85BF8@gmail.com> References: <505B2555.40704@doblej.net> To: =?iso-8859-1?Q?Juan_Jos=E9_S=E1nchez_Mesa?= X-Mailer: Apple Mail (2.1498) Cc: freebsd-net@freebsd.org 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 14:37:11 -0000 On Sep 20, 2012, at 5:16 PM, Juan Jos=E9 S=E1nchez Mesa = wrote: > Hi! >=20 > (sorry for my bad english) >=20 > I have a FreeBSD machine (8.2-RELEASE-p3). The machine has two = ethernet cards, configured in this way: >=20 > - Card A: internet IP address > - Card B: intranet IP address >=20 > Default route goes via card A. >=20 > 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. >=20 > 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. >=20 > There is a way to configure the network so that outgoing packets goes = to the card from where the incoming packets was arrived ? >=20 > Or is this impossible to configure ? >=20 > Thanks!!! >=20 > _______________________________________________ > 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" Hi, You will probably need the pf(4) firewall configured with the "reply-to" = keyword for this to work. Something like : pass in on $CARD_B reply-to ($CARD_B, $CARD_B_GW) from any to any Regards, Nikolay Denev