From owner-freebsd-pf@FreeBSD.ORG Tue Aug 7 12:43:59 2007 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B48A516A421 for ; Tue, 7 Aug 2007 12:43:59 +0000 (UTC) (envelope-from nicolas.cornu@ch-st-julien.fr) Received: from smtp20.orange.fr (smtp20.orange.fr [193.252.22.31]) by mx1.freebsd.org (Postfix) with ESMTP id 0AD6B13C4A8 for ; Tue, 7 Aug 2007 12:43:58 +0000 (UTC) (envelope-from nicolas.cornu@ch-st-julien.fr) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2019.orange.fr (SMTP Server) with ESMTP id 8DB861C00094 for ; Tue, 7 Aug 2007 14:43:57 +0200 (CEST) Received: from relais.ch-st-julien.fr (LNeuilly-152-21-111-175.w193-253.abo.wanadoo.fr [193.253.48.175]) by mwinf2019.orange.fr (SMTP Server) with ESMTP id 538BC1C00082; Tue, 7 Aug 2007 14:43:57 +0200 (CEST) X-ME-UUID: 20070807124357342.538BC1C00082@mwinf2019.orange.fr Received: from relais.ch-st-julien.fr (localhost [127.0.0.1]) by relais-back.ch-st-julien.fr (Postfix::smtpd) with ESMTP id 3C7DC126E5A; Tue, 7 Aug 2007 15:43:52 +0200 (CEST) Received: from [172.16.0.41] (unknown [172.16.0.41]) by relais.ch-st-julien.fr (Postfix::smtpd) with ESMTP id 144D3126E57; Tue, 7 Aug 2007 15:43:52 +0200 (CEST) Message-ID: <46B86904.4080900@ch-st-julien.fr> Date: Tue, 07 Aug 2007 14:43:48 +0200 From: "nicolas.cornu" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070608 SeaMonkey/1.1.2 MIME-Version: 1.0 To: Gilberto Villani Brito , freebsd-pf@freebsd.org References: <46B2DB78.7090001@ch-st-julien.fr> <6e6841490708061110y1be829dbwf17424beb588492e@mail.gmail.com> In-Reply-To: <6e6841490708061110y1be829dbwf17424beb588492e@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on relais.ch-st-julien.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Cc: Subject: Re: PF and proxytunnel 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: Tue, 07 Aug 2007 12:43:59 -0000 Gilberto Villani Brito wrote: > On 03/08/07, nicolas.cornu wrote: > >> Hi, >> >> >> I'm quite new in the PF experience. I'm trying to set a rule which can >> permit me to log on my home machine from work by using ssh and >> proxytunnel (http://proxytunnel.sourceforge.net/) >> >> I can't make it work. Each time the firewall is up, my ssh connection is >> broken. I think it's a flag problem but I can't make it work. >> >> >> So, this is my rule (And I'm blocking everuthing by default) : >> >> " pass in quick log on $ext_if proto tcp from to $ext_if port 443 >> flags S/SA keep state " >> >> The thing is in a forum, a guy asked me to try with the flag S/SA but it >> doesn't work. i tried some other fags without any succes. >> >> I also got a log of the packets which are blocked : >> >> >> >> >> 16:10:12.437424 rule 0/0(match): block out on tun0: >> [home_ip_address].443 > [work_ip_address].58797: FP 0:112(112) ack 1 win >> 32844 >> 16:10:12.437433 rule 0/0(match): block out on tun0: >> [home_ip_address].443 > [work_ip_address].58797: FP 1:112(111) ack 1 win >> 32844 >> 16:10:12.497175 rule 0/0(match): block in on tun0: >> [work_ip_address].58797 > [home_ip_address].443: . ack 4294967056 win >> 32767 >> 16:10:12.506673 rule 0/0(match): block in on tun0: >> [work_ip_address].58797 > [home_ip_address].443: . ack 4294967104 win >> 32767 >> 16:10:12.516765 rule 0/0(match): block in on tun0: >> [work_ip_address].58797 > [home_ip_address].443: . ack 4294967200 win >> 32767 >> 16:10:12.524137 rule 0/0(match): block in on tun0: >> [work_ip_address].58797 > [home_ip_address].443: . ack 0 win 32767 >> >> 16:10:12.698154 rule 0/0(match): block out on tun0: >> [home_ip_address].443 > [work_ip_address].58797: FP 4294967008:112(400) >> ack 1 win 32844 > 97750028> >> 16:10:12.879724 rule 0/0(match): block in on tun0: >> [work_ip_address].58797 > [home_ip_address].443: P 1:49(48) ack 0 win >> 32767 >> 16:10:13.086087 rule 0/0(match): block out on tun0: >> [home_ip_address].443 > [work_ip_address].58797: FP 4294967008:112(400) >> ack 1 win 32844 > 97750028> >> 16:10:13.174156 rule 0/0(match): block in on tun0: >> [work_ip_address].58797 > [home_ip_address].443: P 1:49(48) ack 0 win >> 32767 >> 16:10:13.661987 rule 0/0(match): block out on tun0: >> [home_ip_address].443 > [work_ip_address].58797: FP 4294967008:112(400) >> ack 1 win 32844 > 97750028> >> 16:10:13.761762 rule 0/0(match): block in on tun0: >> [work_ip_address].58797 > [home_ip_address].443: P 1:49(48) ack 0 win >> 32767 >> 16:10:14.613849 rule 0/0(match): block out on tun0: >> [home_ip_address].443 > [work_ip_address].58797: FP 4294967008:112(400) >> ack 1 win 32844 > 97750028> >> 16:10:14.937784 rule 0/0(match): block in on tun0: >> [work_ip_address].58797 > [home_ip_address].443: P 1:49(48) ack 0 win >> 32767 >> 16:10:16.317606 rule 0/0(match): block out on tun0: >> [home_ip_address].443 > [work_ip_address].58797: FP 4294967008:112(400) >> ack 1 win 32844 > 97750028> >> 16:10:17.289307 rule 0/0(match): block in on tun0: >> [work_ip_address].58797 > [home_ip_address].443: P 1:49(48) ack 0 win >> 32767 >> 16:10:17.381429 rule 0/0(match): block out on tun0: >> [home_ip_address].443 > [work_ip_address].58797: FP 4294967008:112(400) >> ack 1 win 32844 > 97750028> >> 16:10:19.309147 rule 0/0(match): block out on tun0: >> [home_ip_address].443 > [work_ip_address].58797: FP 4294967008:112(400) >> ack 1 win 32844 > 97750028> >> 16:10:21.992459 rule 0/0(match): block in on tun0: >> [work_ip_address].58797 > [home_ip_address].443: P 1:49(48) ack 0 win >> 32767 >> 16:10:22.964584 rule 0/0(match): block out on tun0: >> [home_ip_address].443 > [work_ip_address].58797: FP 4294967008:112(400) >> ack 1 win 32844 > 97750028> >> 16:10:29.280630 rule 0/0(match): block in on tun0: >> [work_ip_address].58926 > [home_ip_address].443: S >> 3840383586:3840383586(0) win 5840 > 8 0,nop,wscale 0> >> 16:10:30.075509 rule 0/0(match): block out on tun0: >> [home_ip_address].443 > [work_ip_address].58797: FP 4294967008:112(400) >> ack 1 win 32844 > 97750028> >> 16:10:31.399531 rule 0/0(match): block in on tun0: >> [work_ip_address].58797 > [home_ip_address].443: P 1:49(48) ack 0 win >> 32767 >> 16:10:32.279624 rule 0/0(match): block in on tun0: >> [work_ip_address].58926 > [home_ip_address].443: S >> 3840383586:3840383586(0) win 5840 > 8 0,nop,wscale 0> >> 16:10:38.278752 rule 0/0(match): block in on tun0: >> [work_ip_address].58926 > [home_ip_address].443: S >> 3840383586:3840383586(0) win 5840 > 8 0,nop,wscale 0> >> 16:10:44.097373 rule 0/0(match): block out on tun0: >> [home_ip_address].443 > [work_ip_address].58797: FP 4294967008:112(400) >> ack 1 win 32844 > 97750028> >> 16:10:50.211598 rule 0/0(match): block in on tun0: >> [work_ip_address].58797 > [home_ip_address].443: P 1:49(48) ack 0 win >> 32767 >> 16:10:50.277124 rule 0/0(match): block in on tun0: >> [work_ip_address].58926 > [home_ip_address].443: S >> 3840383586:3840383586(0) win 5840 > 8 0,nop,wscale 0> >> 16:10:51.796096 rule 0/0(match): block in on tun0: >> [work_ip_address].58951 > [home_ip_address].443: S >> 3848980265:3848980265(0) win 5840 > 6 0,nop,wscale 0> >> 16:10:54.795329 rule 0/0(match): block in on tun0: >> [work_ip_address].58951 > [home_ip_address].443: S >> 3848980265:3848980265(0) win 5840 > 6 0,nop,wscale 0> >> 16:10:58.119242 rule 0/0(match): block out on tun0: >> [home_ip_address].443 > [work_ip_address].58797: FP 4294967008:112(400) >> ack 1 win 32844 > 97750028> >> 16:14:05.064569 rule 0/0(match): block out on tun0: >> [home_ip_address].443 > [work_ip_address].58951: P >> 939245923:939246035(112) ack 3848991638 win 32844 > 1877064567 597982693> >> >> >> >> >> >> >> >> >> I hope someone can help me. >> >> >> >> Regards, >> >> Nicolas >> >> >> _______________________________________________ >> freebsd-pf@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-pf >> To unsubscribe, send any mail to "freebsd-pf-unsubscribe@freebsd.org" >> >> > > I think you have a rule like: > block out $ext_if all > > Try add other rule like: > pass out quick log on $ext_if proto tcp from $ext_if port 443 to > flags S/SA keep state > > > thank you. It actually worked but I replaced the port from 443 to >1024. I thought the "keep state" could permit me to use one rule instead of two... Nicolas.