From owner-freebsd-questions@freebsd.org Wed Mar 29 22:33:36 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC946D2340A for ; Wed, 29 Mar 2017 22:33:36 +0000 (UTC) (envelope-from dave.mehler@gmail.com) Received: from mail-wr0-x22c.google.com (mail-wr0-x22c.google.com [IPv6:2a00:1450:400c:c0c::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4307F18B8 for ; Wed, 29 Mar 2017 22:33:36 +0000 (UTC) (envelope-from dave.mehler@gmail.com) Received: by mail-wr0-x22c.google.com with SMTP id w43so35442425wrb.0 for ; Wed, 29 Mar 2017 15:33:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=VmGOxjNl5Y2p45/VOIJhNeLu2FG7ljGRY6gYP8WCSTo=; b=Rpl0MPWoG3+lm0uFed489QE6vSeoMXUdSakoqYGMWpdyTI07bQgiViNToEUOJq7BOe 3wamIJgXWY8pppvuvA2WZDkOLTHjqmb0Yq3rJTUrsOTCrF6sT0kDzgMbZG4eEFarvXP5 7fW3B07I6+Y52C9RVpRGRmjbtLxeF9/yeAiGxO05zLJUTdCvQMqamhM4eiBlYrtpKdSo zgnt7DCQccClKtKhR8Kd867jLoo7+aigAT/T3eTMaoRyNY0M+uxdOEzU8eU7b6hk4SUk Z+jsWuiB/rrE09Cw5n4Oad4JoFpZ2C9QLA2jsnfSYQapILbhuYTwZYezSEHhQl0YOpnP Rd0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=VmGOxjNl5Y2p45/VOIJhNeLu2FG7ljGRY6gYP8WCSTo=; b=WJrgoOiVaJfQybf15Jea2U/Zz0MDYJ+IqTB1CnVpSJDmGEr9X8CQuM2ow/igiQnTB0 5OUQ0XP2NVTQJ9X8vCCbwLadoL7g8yfNyHN2hlvALXY1u9bLEGY64i3wTyhWixYmGIIs 3h0KO8rAC7hobnUxqyR4a7crvI6u4aiR//kaiF07s45cIwKwUeKPBrid8/AI58gmT1KX GSf4iVHjVKv9Sqsik3TWZbOnJDgIBY5wcsEK2BN/N5h4h01ZKEce63ZeG2As5UIqnZKw +gcniaPwGCPGmLtcWhGYlbgyjxu0cu+XcM+h0A85lnEmnJykD4nufQWDpDulo3pgecGY hSRA== X-Gm-Message-State: AFeK/H3gJTCMpkFpld8mBsWO1Zz2ug2a0LtTJoQTGeQxIUi2e8GxUemklHz/2xtj5kEuN8bpblNnCDl/ao1wzQ== X-Received: by 10.223.129.4 with SMTP id 4mr2673343wrm.4.1490826813066; Wed, 29 Mar 2017 15:33:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.148.35 with HTTP; Wed, 29 Mar 2017 15:33:32 -0700 (PDT) In-Reply-To: References: From: David Mehler Date: Wed, 29 Mar 2017 18:33:32 -0400 Message-ID: Subject: Re: Two pf questions To: Kristof Provost Cc: freebsd-questions Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 22:33:36 -0000 Hello, Thank you. With a pass rule I was able to get it working. Thank you very much. Dave. Here's my config: # external redirect rdr on $ext_if inet proto tcp from any to any port 2220 -> $jssh1 port 2220 # internal nat reflection rdr on $int_if inet proto tcp from any to any port 2220 -> $jssh1 port 2220 # pass rules # external pass rule pass in inet proto tcp from any to $jssh1 port 2220 flags S/SA keep state (max-src-conn 15, max-src-conn-rate 5/3, overload flush global) # internal pass rule pass inet proto tcp from any to $jssh1 port 2220 flags S/SA keep state Thanks again. Dave. On 3/29/17, Kristof Provost wrote: > On 27 Mar 2017, at 16:37, David Mehler wrote: >> My second question is one of nat reflection is the term. I've got a >> jail running a service on port 8000. I've got external redirect rules >> and pass rules passing in the traffic. The problem is I've got need to >> get access to that machine port 8000 on the host machine. >> >> I try something like ssh user@xxx.xxx.xxx.xxx -p 8000 >> > > Presumably you=E2=80=99ve got a rule like this: > rdr on $ext_if proto tcp from any to any port 8000 -> $jail port 80 > > Add something like > rdr on $int_if proto tcp from $localnet to ($ext_if) port 8000 -> $jail > port 80 > > Regards, > Kristof >