From owner-freebsd-pf@FreeBSD.ORG Thu Nov 23 19:21:30 2006 Return-Path: X-Original-To: freebsd-pf@freebsd.org Delivered-To: freebsd-pf@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 548EF16A416 for ; Thu, 23 Nov 2006 19:21:30 +0000 (UTC) (envelope-from jsimola@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4458B43D69 for ; Thu, 23 Nov 2006 19:20:20 +0000 (GMT) (envelope-from jsimola@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so494482uge for ; Thu, 23 Nov 2006 11:20:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eQWviV8emJPQUTCTcGxOwNu7Bu9M/oa9IwR5iHf1vh93EaynF83fdksSpSRQPL90coN2t1qn5jdv479ACn0dLadGBv1Fm2zNdcL9D28VZ/pr1DgCYKDnd7pYLLaXr5/82EhQ2pKEY3ngP3/Sd70TeSH9LzviEF1Ru+k7VRnZ4jY= Received: by 10.78.183.15 with SMTP id g15mr5646157huf.1164309654093; Thu, 23 Nov 2006 11:20:54 -0800 (PST) Received: by 10.78.153.10 with HTTP; Thu, 23 Nov 2006 11:20:53 -0800 (PST) Message-ID: <8eea04080611231120x56f393e5r41a43a98a2f5a082@mail.gmail.com> Date: Thu, 23 Nov 2006 11:20:53 -0800 From: "Jon Simola" To: "fwun@bigpond.net.au" In-Reply-To: <16201878.1164245885264.JavaMail.root@web03sl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <16201878.1164245885264.JavaMail.root@web03sl> Cc: freebsd-pf@freebsd.org Subject: Re: how to route to a local server thru PF router X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Nov 2006 19:21:30 -0000 On 11/22/06, fwun@bigpond.net.au wrote: > The current NAT rules in the PF router setup as: > > # pfctl -a NATRULES -sn > nat on sis0 inet from 192.168.1.0/24 to any -> (sis0) round-robin > nat on sis0 inet from 172.17.3.0/24 to any -> (sis0) round-robin > nat on sis0 inet from 10.1.10.0/24 to any -> (sis0) round-robin > > I m connected to the 172.17.3.0/24 network. The local freebsd server is connected to 10.1.10.0/24 network. > > And the PF router is already setup as a default gateway. > > How can I modify the PF rules so that I can login from 172.17.3.0/24 to 10.1.10.0/24 network? Your connection attempt will match the second nat rule. A quick way to avoid that would be adding a nat rule such as below first (nat rules are always first match): no nat from 172.17.3.0/24 to 10.1.10.0/24 -- Jon