From owner-freebsd-pf@FreeBSD.ORG Thu Oct 27 02:45:58 2005 Return-Path: X-Original-To: freebsd-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 BAC4E16A41F; Thu, 27 Oct 2005 02:45:58 +0000 (GMT) (envelope-from montarotech@optusnet.com.au) Received: from mail19.syd.optusnet.com.au (mail19.syd.optusnet.com.au [211.29.132.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0815543D48; Thu, 27 Oct 2005 02:45:57 +0000 (GMT) (envelope-from montarotech@optusnet.com.au) Received: from delta (d58-105-150-147.dsl.nsw.optusnet.com.au [58.105.150.147]) by mail19.syd.optusnet.com.au (8.12.11/8.12.11) with SMTP id j9R2jtPJ018365; Thu, 27 Oct 2005 12:45:55 +1000 Message-ID: <006901c5daa0$9215ec60$0132a8c0@delta> From: "Josh Finlay" To: "Gleb Smirnoff" References: <000b01c5d644$54527f20$0132a8c0@delta> <20051023083751.GV59364@cell.sick.ru> <00a201c5d9c9$ef2bdbd0$0132a8c0@delta> <20051026063637.GW41520@cell.sick.ru> <000601c5da00$5f82a5e0$0132a8c0@delta> <20051026074146.GZ41520@cell.sick.ru> Date: Thu, 27 Oct 2005 12:46:02 +1000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="koi8-r"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Cc: freebsd-pf@FreeBSD.org Subject: Re: FreeBSD + MPD + PF + ALTQ 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: Thu, 27 Oct 2005 02:45:58 -0000 Excellent! Patched, recompiled. Working now :) Except for my PF rules. I've attached the rules i'm using for PF, I guess I don't really "understand" how ALTQ "works". My rules: (im attempting to do a QoS-like configuration on a 512/128kbps adsl connection) ExtIF="ng0" IntIF="de0" set loginterface $ExtIF scrub in all scrub out all random-id max-mss 1440 altq on $ExtIF priq bandwidth 128Kb queue { std_out, ssh_im_out, dns_out, tcp_ack_out } queue std_out priq(default) queue ssh_im_out priority 4 priq(red) queue dns_out priority 5 queue tcp_ack_out priority 6 altq on $IntIF cbq bandwidth 512Kb queue { std_in, ssh_im_in, dns_in } queue std_in bandwidth 384Kb cbq(default) queue ssh_im_in bandwidth 64Kb priority 4 queue dns_in bandwidth 64Kb priority 5 local_net = "192.168.0.0/24" ssh_ports = "{ 22 }" im_ports = "{ 1863 5190 5222 }" nat on $IntIF from $INTERNAL to any -> ($ExtIF) pass in quick on lo0 all pass out quick on lo0 all pass out on $ExtIF inet proto tcp from ($ExtIF) to any flags S/SA \ keep state queue(std_out, tcp_ack_out) pass out on $ExtIF inet proto { udp icmp } from ($ExtIF) to any keep state pass out on $ExtIF inet proto { tcp udp } from ($ExtIF) to any port domain \ keep state queue dns_out pass out on $ExtIF inet proto tcp from ($ExtIF) to any port $ssh_ports \ flags S/SA keep state queue(std_out, ssh_im_out) pass out on $ExtIF inet proto tcp from ($ExtIF) to any port $im_ports \ flags S/SA keep state queue(ssh_im_out, tcp_ack_out) pass in on $IntIF from $local_net pass out on $IntIF proto { tcp udp } from any port domain to $local_net \ queue dns_in pass out on $IntIF proto tcp from any port $ssh_ports to $local_net \ queue(std_in, ssh_im_in) pass out on $IntIF proto tcp from any port $im_ports to $local_net \ queue ssh_im_in --EOF-- My knowledge in ALTQ is so limited it isn't funny. Without proper knowledge of ALTQ, it makes it difficult for me to perform a simple configuration such as this without some help. So thank you in advance for being patient with me. My main aim is to share my link (512kbps down, 128kbps up) evenly over my network, but at the same time if only one machine is utilizing the network then i believe that computer should have all the bandwidth, if two computers then those two should share the bandwidth 50/50, etc etc. Regards, Josh Finlay