From owner-freebsd-pf@FreeBSD.ORG Sun Jul 31 01:49:02 2005 Return-Path: X-Original-To: pf@freebsd.org Delivered-To: freebsd-pf@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9D8316A41F for ; Sun, 31 Jul 2005 01:49:02 +0000 (GMT) (envelope-from gpt@tirloni.org) Received: from srv-03.bs2.com.br (srv-03.bs2.com.br [200.203.183.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B34443D45 for ; Sun, 31 Jul 2005 01:49:02 +0000 (GMT) (envelope-from gpt@tirloni.org) Received: from localhost (localhost.bs2.com.br [127.0.0.1]) by srv-03.bs2.com.br (Postfix) with ESMTP id 9C9944AEAB; Sat, 30 Jul 2005 22:49:30 -0300 (BRT) Received: from [200.181.213.227] (unknown [200.181.213.227]) by srv-03.bs2.com.br (Postfix) with ESMTP id 2EF5F4AEA7; Sat, 30 Jul 2005 22:49:30 -0300 (BRT) Message-ID: <42EC2DCE.4090009@tirloni.org> Date: Sat, 30 Jul 2005 22:47:58 -0300 From: "Giovanni P. Tirloni" User-Agent: Mozilla Thunderbird 1.0.2-1.4.1.centos4 (X11/20050323) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Abu Khaled References: <42E8D3D5.4030300@tirloni.org> <200507281458.56534.max@love2party.net> <42E8DBC6.6060907@tirloni.org> <42EB7A2A.3080701@tirloni.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: pf@freebsd.org Subject: Re: rdr not working for transparent http - 5.4-stable 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: Sun, 31 Jul 2005 01:49:02 -0000 Abu Khaled wrote: > On 7/30/05, Giovanni P. Tirloni wrote: > >>Giovanni P. Tirloni wrote: >> >>>Max Laier wrote: >>> >>> >>>>One thing comes to my mind: What does >>>> $sysctl net.inet.ip.forwarding >>>>say? >>> >>> >>># sysctl net.inet.ip.forwarding >>>net.inet.ip.forwarding: 1 >>> >>>I had some tweaks in /etc/sysctl but disabling them didn't help either. >>> >>>#net.inet.ip.check_interface=1 >>>#net.inet.tcp.blackhole=2 >>>#net.inet.udp.blackhole=1 >>> >> >> I forgot to mention this box had ipfw+dummnyet (with two queues) >>activated. I disabled ipfw in the kernel and pf rdr worked again! Just >>removing the ipfw rules didn't work. >> >> Weird enough, I don't have dummynet on the other 2 machines that have >>the same problem. But ipfw is compiled in but disabled. >> >> I'll try to disable ipfw on the other boxes and see what happens there >>to confirm this. > > > If ipfw is compiled in the kernel and it defaults to deny all, then > you need to add rules for ipfw to allow connections to and from > localhost (127.0.0.1 and port 3128). Otherwise ipfw well drop 'pf rdr > traffic'. > > # ipfw add allow tcp from $lan_net to 127.0.0.1 3128 > # ipfw add allow tcp from 127.0.0.1 3128 to $lan_net > > Put the rules before any anti spoofing rules in ipfw. > I think there's something in the code that makes it not work because I set ipfw to accept by default on every machine I have. There must be something else. -- Giovanni P. Tirloni / gpt@tirloni.org / PGP: 0xD0315C26