Linux temporary port range adjustment

Source: Internet
Author: User
Tags echo command
The temporary port range adjustment for Linux is the local port allocated to the outgoing connection by the TCP/IP stack. In other words, for example, when squid initiates a connection to another server, the kernel assigns a port number to the local socket. These local port numbers have specific range restrictions. Temporary port number shortage for... Linux temporary port range adjustment temporary port is the TCP/IP stack allocated to the local port for outgoing connection. In other words, for example, when squid initiates a connection to another server, the kernel assigns a port number to the local socket. These local port numbers have specific range restrictions. The shortage of temporary port numbers will greatly affect the performance of very busy proxy servers (such as hundreds of connections per second. This is because some TCP connections are in the TIME_WAIT status when they are closed. When the connection enters the TIME_WATI status, the temporary port number cannot be reused. Www.2cto.com you can use the netstat command to display how many connections are in this status: [if it is in a production environment, it is best to perform a test first, then consider the appropriate port range] shell> netstat-n | grep TIME_WAIT ...... Shell> cat/proc/sys/net/ipv4/ip_local_port_range32768 61000 www.2cto.com if you need to modify echo "start-number end-number ", start-number and end-number are numbers in the range of 0-65536 port numbers. it is best not to use them in the range of 0-1024. Generally, they are well-known ports. if they are dedicated proxy servers, many well-known ports are not used, of course you can consider it! Do not forget to add the echo command to the system startup script to make the machine take effect after every restart.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.