From owner-freebsd-questions Mon Feb 28 13: 0:12 2000 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 0CE5F37B6FA for ; Mon, 28 Feb 2000 13:00:03 -0800 (PST) (envelope-from ben@scientia.demon.co.uk) Received: from strontium.scientia.demon.co.uk ([192.168.91.36] ident=exim) by scientia.demon.co.uk with esmtp (Exim 3.12 #1) id 12PVJH-000GLb-00; Mon, 28 Feb 2000 18:54:23 +0000 Received: (from ben) by strontium.scientia.demon.co.uk (Exim 3.12 #7) id 12PVJH-000JxB-00; Mon, 28 Feb 2000 18:54:23 +0000 Date: Mon, 28 Feb 2000 18:54:23 +0000 From: Ben Smithurst To: flaw@videotron.ca Cc: freebsd-questions@FreeBSD.ORG Subject: Re: local processes and port ranges Message-ID: <20000228185423.F48270@strontium.scientia.demon.co.uk> References: <0FQN00ABDL2AS7@field.videotron.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <0FQN00ABDL2AS7@field.videotron.net> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG flaw@videotron.ca wrote: > Is there a way of adjusting the port range used by local processes? I've > recently switched from using a Linux IP Masquerading box to a FreeBSD > Ipfilter box, and in order to allow my housmate to play his Direct Play > games (a non negotiable thing on his part) I have to forward ports > 2300-2400 to his box. This works fine and good, but I also run squid and > a couple of other proxies that seem to eat up port numbers, and > when they hit port 2300 they freeze for extended periods of time. I had > this same problem with Linux, but I solved it by moving the range of > ports used by local processes: > > echo 50000 60999 > /proc/sys/net/ipv4/ip_local_port_range > > Is there something similar that I can do in FreeBSD (3.4 STABLE)? man sysctl (you want sysctl(8), not sysctl(3), though that should be the default). ben@magnesium:~$ sysctl -a | grep '^net.*port' net.inet.ip.portrange.lowfirst: 1023 net.inet.ip.portrange.lowlast: 600 net.inet.ip.portrange.first: 1024 net.inet.ip.portrange.last: 5000 net.inet.ip.portrange.hifirst: 49152 net.inet.ip.portrange.hilast: 65535 I've never been quite sure what each of these controls, I guess I'll have to RTFM too now. I guess you'll want to increase portrange.{first,last} as they're the only ones which include the 2300-2400 range. -- Ben Smithurst / ben@scientia.demon.co.uk / PGP: 0x99392F7D To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message