From owner-freebsd-net@FreeBSD.ORG Thu Feb 5 05:08:22 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A4225DB; Thu, 5 Feb 2015 05:08:22 +0000 (UTC) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EA011C2; Thu, 5 Feb 2015 05:08:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id t1558FBO061675; Thu, 5 Feb 2015 16:08:17 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Thu, 5 Feb 2015 16:08:15 +1100 (EST) From: Ian Smith To: Lev Serebryakov Subject: Re: does "nat redirect_port tcp" works for you on -CURRENT? In-Reply-To: <54D2A7E1.2020902@FreeBSD.org> Message-ID: <20150205160544.D38620@sola.nimnet.asn.au> References: <54D29A21.2080006@FreeBSD.org> <54D2A7E1.2020902@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-ipfw@freebsd.org, freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 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, 05 Feb 2015 05:08:22 -0000 On Thu, 5 Feb 2015 02:14:41 +0300, Lev Serebryakov wrote: > On 05.02.2015 01:16, Lev Serebryakov wrote: > > > I have such rules in my firewall: > > > > nat 9 config redirect_port tcp 192.168.134.2:16881 16881 > > redirect_port udp 192.158.134.2:16881 16881 redirect_port tcp > > 192.168.134.2:22 22222 > > > > nat 1 config ip $EXT_IP same_ports > One more datapoint: if I merge this to one NAT (and change rules > accordingly), redirect work as expected. > > But I have TWO different NATs in full config (for two ISPs) and don't > want to duplicate all redirection specifications, but want to use > third "common" NAT config. And such usage is shown in ipfw(8)! Just curious .. what's your value of net.inet.ip.fw.one_pass? And does all of this really need cross-posting to net@ as well as ipfw@? cheers, Ian