Article Title: How to enable a non-root user port smaller than port 1024. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Method 1: Port ing
1. iptables command: iptables-t nat-a prerouting-p tcp -- dport <Low port> -I eth0-j REDIRECT -- to-port <Previously listened high port>
2. rinetd Program
3. ipchans command: ipchans-I input -- proto TCP -- dport <Low port> -J REDIRECT <High port>
Method 2: Change the program sid
Modify program permissions, such as chmod 7755 ......
Method 3: Modify the kernel
Modify make_sock of the kernel
Iptables-t nat-a prerouting-p tcp -- dport 82-I eth0-j REDIRECT -- to-port 8082
Iptables-t nat-a prerouting-p tcp -- dport 8082-I eth0-j REDIRECT -- to-port 82
/Etc/httpd/
Iptables-t nat-a prerouting-s 192.168.0.0/24-I eth0-p tcp -- dport 82-j REDIRECT -- to-port 8080 // test availability