From owner-freebsd-questions@freebsd.org Mon Apr 18 08:20:16 2016 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 C1DFFB11B53 for ; Mon, 18 Apr 2016 08:20:16 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (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 5BF921D56 for ; Mon, 18 Apr 2016 08:20:16 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: by mail-wm0-x235.google.com with SMTP id n3so112214629wmn.0 for ; Mon, 18 Apr 2016 01:20:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=sFbT2aJs0jazVDJIwFfLgZUCN3YhrmgkxQW40d5X640=; b=YNUQ72yLIgbLPnpPrrWgHYWr4CM1SsQjEt+ku+PAtXHxDy30LlV/hSScnTG4SgSklL Z5L5oEiXGeOlcl3pn9BX/Mg6rna+MkoGq98mcLtVFixAKQoo1lV72WXWTqbFb+IVQ9KZ 1GPoEUoetSmKdLlqZQocXGk78IdAsMwGTwWavHTP8bJX0NvLa6ACHc2kKj1kqpbtaTqu qwVyaQqPfcmgTJLpmNuTxrLqwcTwMUxY2uNotjKIbb0yTEKVVY0XNFoMpYhMDBJbdtuB A7cTBcvBXMbnUGRajPBEfnm0UbMyxeiAn3/N8STzPWJ9hvkg6VQA9ZraKWdsbgyUAcHj zMPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=sFbT2aJs0jazVDJIwFfLgZUCN3YhrmgkxQW40d5X640=; b=VtltXd2gHNPWquMu8eETmxVCBJo3nED8MikDQkHMbQ3bC5sv0Kj2s0AH+XKztYoCV1 X/TBrv6Mh/5rOXNckwm6GEFZMDpVq1DV8rgBOlyC3xXBDfTZteG7u28oo8iy6qa8TLSQ KkYyoq4a4POistL1jWTh/sOmnHQENRWl5+l5v7UpmLKI2+jcAFUyoKjc25OLfEZmMQ09 6PK1CikWFAKUxVh/yHTWQh7BpasJFfBE7UnpYw6j29t7yo61/5ESpAp1vOKVP3WY3ZvM ezlDPOuwiTW2A716hVQOpRxXguTo6gGwBnabLDA9gBqDVQVrr9/i6csNiimBu968Pi6b 896A== X-Gm-Message-State: AOPr4FXkFHaLgbGzbni2E+wuHa2i50lvWQIq09NbsrHX0nX7nVaT8ZFSR9MTXmsszSPEFLsaXgKZKXUoIf+cIA== MIME-Version: 1.0 X-Received: by 10.194.175.168 with SMTP id cb8mr34684068wjc.56.1460967614986; Mon, 18 Apr 2016 01:20:14 -0700 (PDT) Received: by 10.28.46.67 with HTTP; Mon, 18 Apr 2016 01:20:14 -0700 (PDT) In-Reply-To: References: Date: Mon, 18 Apr 2016 09:20:14 +0100 Message-ID: Subject: Re: Convert ipfw rule to pf From: krad To: Matthias Fechner Cc: "freebsd-questions@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2016 08:20:16 -0000 you need the relevant pass rules as well as the rdrs On 17 April 2016 at 10:22, Matthias Fechner wrote: > Dear all, > > I use sslh to have a transparent proxy for ssh/https in place. > The transparent proxy support of sslh requires ipfw rules to work. > > I'm not sure if sslh is doing something in the background and that is the > reason why it is not working with pf. > > Maybe we have here a pf guru on the list that can ensure the the rule > itself is correct. > > The ipfw rule looks like: > # https > ipfw add 20000 fwd 192.168.0.251,443 log tcp from 192.168.0.251 8443 to > any out > ipfw add 20001 fwd 192.168.200.6,443 log tcp from 192.168.200.6 8443 to > any out > # ssh > ipfw add 20003 fwd 192.168.200.6,443 log tcp from 192.168.200.6 22 to any > out > > In pf they look like: > rdr pass log inet proto tcp from 192.168.0.251 port 8443 to any -> > 192.168.0.251 port 443 > rdr pass log inet proto tcp from 192.168.200.6 port 8443 to any -> > 192.168.200.6 port 443 > rdr pass log inet proto tcp from 192.168.200.6 port 22 to any -> > 192.168.200.6 port 443 > > Thanks. > > Gru=C3=9F > Matthias > > -- > > "Programming today is a race between software engineers striving to > build bigger and better idiot-proof programs, and the universe trying to > produce bigger and better idiots. So far, the universe is winning." -- > Rich Cook > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org"