Last update at :2024-07-07,Edit by888u
Application scenario: We have a WINDOWS server in Paris, France (op). The direct connection from mainland China is very slow. The PING value is almost 350MS. In order to speed up access to this remote desktop, we thought of using port forwarding to speed up the access. .
Principle: The machine we use for forwarding acceleration is located in San Jose (VIRMACH) in the United States. The PING value from my place to San Jose is 150MS, and the PING value from San Jose to Paris, France is 50MS. Therefore, we use San Jose for port forwarding. The entire PING value is only 200MS, and the PING is reduced. 150MS, similarly the RDP protocol has also been accelerated.
Method:
First: log in to the machine we use for forwarding, in this case the machine in San Jose, and check whether the firewall is turned on. firewall-cmd --state
Second: Enable firewall camouflage. Only after it is enabled can the port be forwarded: firewall-cmd --add-masquerade --permanent
Third: Add forwarding rules: firewall-cmd --add-forward-port=port=3389:proto=tcp:toport=3389:toaddr=My Paris, France WIN host IP --permanent
Fourth: Reload the firewall configuration to make it effective firewall-cmd --reload
That’s it. You can directly enter the machine IP of San Jose on the remote desktop login mstsc, open the connection, log in, and see if you can log in to the machine in Paris, France.
Check the reverse port forwarding status: firewall-cmd --list-all
If you need to remove port forwarding:
Use the following command:
firewall-cmd --remove-forward-port=port=3389:proto=tcp:toport=3389:toaddr=My Paris, France WIN host IP --permanent
firewall-cmd --remove-masquerade --permanent
firewall-cmd --reload
Note: I have verified that it is feasible.
Recommended site search: mainland China proxy server IP, free virtual host application, website virtual host space, US domain name website Zhejiang server, foreign space service provider, mainland China virtual host, registration-free space free network, vip domain name, virtual host space
发表评论