[Avcheck] port 1025: Address already in use
Piotr Klaban
makler+avcheck@man.torun.pl
Fri, 29 Nov 2002 12:28:26 +0100
On Fri, Nov 29, 2002 at 11:30:16AM +0300, Michael Tokarev wrote:
> Port 1025 is the first available non-privileged port. Whenever an
> application request connection _to_ somewhere, by default, OS
> uses first available non-privileged _local_ port for the local
> side of the connection, thus it's a high chance for this port
(Slightly OT)
BTW the first high port is not 1025 but 1024. Linux assign ports
starting from 1024, ending on 4999 (the same for Windows :) ):
% cat /proc/sys/net/ipv4/ip_local_port_range
On high-end systems it is suggested to change that numbers to
49152-65535 (IANA "private" port numbers):
# echo "49152 65535" > /proc/sys/net/ipv4/ip_local_port_range
Many other OSes (almost all of them) by default uses this
wide range of high ports (solaris for example uses 32768-65535).
I have found excellent document about high port range changes
for many OSes:
http://www.ncftpd.com/ncftpd/doc/misc/ephemeral_ports.html
Best regards,
--
Piotr Klaban