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