Use iptables port forwarding to improve network access speed

Reference first Brook/iptables port forwarding one key management script, supporting DDNS

Generally, IPLC and domestic line machines are used as forwarding servers.
The forwarded machine is a foreign host.

Assume that the forwarding server is 1.1.1.1 and the port is 11111
The server to be forwarded is 2.2.2.2, and the port is 22222

All are set on the forwarding server, and the forwarded ones are ignored.
For personal use, it is recommended to add forwarding on all ports, such as 22-65535

Take iptables port forwarding as an example.

1. View the IP address bound to the network card
For many NAT servers, the network card is bound to the intranet IP. The intranet IP is used for setting.

 ip addr

 

The intranet IP address of the VPS demonstrated is 192.168.133.156

2. Set Forwarding

 wget -N --no-check-certificate  https://raw.githubusercontent.com/motao123/iptables-pf/master/iptables-pf.sh  && chmod +x iptables-pf.sh bash iptables-pf.sh  #Or wget -N --no-check-certificate  https://gitee.com/pigfei/iptables-pf/raw/master/iptables-pf.sh  && chmod +x iptables-pf.sh bash iptables-pf.sh

 

 Use iptables port forwarding to improve network access speed

For first use, 1 is required Install iptables

 bash iptables-pf.sh

 

Select 4 Add iptables port forwarding

After this configuration, 1.1.1.1:11111 is used, and most of the actual traffic is 2.2.2.2:22222
For future use and access, use the 1.1.1.1 IP address and add the port.

Original article by Mo Tao, if reproduced, please indicate the source: https://imotao.com/3554.html

fabulous (0)
 Head of Mo Tao Mo Tao
Previous 1:29 p.m., August 12, 2020
Next August 12, 2020

Related recommendations

Post reply

Your email address will not be disclosed. Required items have been used * tagging

This site uses Akismet to reduce spam comments. Learn how we handle your comment data