From owner-freebsd-questions@freebsd.org Fri Apr 7 10:17:03 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 3A91ED320AE for ; Fri, 7 Apr 2017 10:17:03 +0000 (UTC) (envelope-from doug@mail.sermon-archive.info) Received: from mail.sermon-archive.info (sermon-archive.info [71.177.216.148]) by mx1.freebsd.org (Postfix) with ESMTP id 29B89C73 for ; Fri, 7 Apr 2017 10:17:02 +0000 (UTC) (envelope-from doug@mail.sermon-archive.info) Received: from [10.0.1.251] (unknown [10.0.1.251]) by mail.sermon-archive.info (Postfix) with ESMTPSA id D5F58114C453; Fri, 7 Apr 2017 03:11:22 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: FreeBSD firewall configuration From: Doug Hardie In-Reply-To: Date: Fri, 7 Apr 2017 03:11:22 -0700 Cc: "freebsd-questions@FreeBSD.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Miha Smrekar X-Mailer: Apple Mail (2.3273) X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean 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: Fri, 07 Apr 2017 10:17:03 -0000 > On 7 April 2017, at 01:47, Miha Smrekar = wrote: >=20 > Hello, >=20 > I started using your system and I have come to firewall configuration. = Can > you tell me how to configure firewall (pf) that I will be able to = connect > with the computer through SSH on port 1024. >=20 That depends on what else you are trying to accomplish. The simplest = approach is to change the Port parameter in /etc/ssh/sshd_config. Then = you don't need to do anything with pf. However, if you are filtering = other things with pf you might want to consider blocking port 22 in pf = and then redirecting port 1024 to port 22 on the local machine. The = best way depends on what else you plan on doing.