Linux Port Open

Source: Internet
Author: User

Linux (CentOS ):
The system default value is 32768-61000.

Modification Method:
In/etc/sysctl.conf, add the following configuration: (Open 20000-50000 is the completion port)

net.ipv4.ip_local_port_range=20000 50000
Restart the platform after configuration is complete, or type sysctl-p to take effect immediately

Commands can be used

Sysctl Net.ipv4.ip_local_port_range
View the relevant configuration.  

Set Firewall (iptables) /etc/init.d/iptables stopservice iptables Stop # Stop Service # View firewall information/etc/init.d/iptables Status # Open port: 8080/sbin/iptables-i input-p TCP--dport 8080-j accept# Restart Firewall for changes to take effect: (or restart the system directly)/etc/init.d/iptables restart# Save the changes/etc/rc.d/init.d/iptables save also adds a line directly to the/etc/sysconfig/iptables:-A rh-firewall-1-input-m state–state new-m Tcp-p Tcp–dport 8080-j ACCEPT

Linux Port Open

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.