Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Feb 2000 18:54:23 +0000
From:      Ben Smithurst <ben@scientia.demon.co.uk>
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>
In-Reply-To: <0FQN00ABDL2AS7@field.videotron.net>
References:  <0FQN00ABDL2AS7@field.videotron.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000228185423.F48270>