Forward port 3389 of the local interface IP61.144.14.72 to port 3389 of 116.6.73.229 (access port 3389 of 61.144.14.72 to jump to 3389 of 116.6.6.73.229) [step] 1. The first thing to do is/etc/sysctl. net. ipv4.ip _ forward1 is 0 by default, so that the error message returned when the error message returned.
(Access port 3389 of 61.144.14.72 to jump to 3389 of 116.6.73.229)
[Step]
1. First, we should do the net. ipv4.ip _ forward = 1 in the/etc/sysctl. conf configuration file, which defaults to 0 to allow iptalbes FORWARD.
Service iptables save
Save the current rule to/etc/sysconfig/iptables
If you are familiar with this file, directly modifying the content here is also equivalent to the command line input rules.
5. start the iptables service and service iptables start
You can write a script to enable the device to run automatically;
# Vi/etc/rc. local
#! /Bin/sh
#
# This script will be executed * after * all the other initscripts.
# You can put your own initialization stuff in here if youdon't
# Want to do the full Sys V style init stuff.
Touch/var/lock/subsys/local
Sh/root/myshipin. log
---------------------------------------------------------------------
Vi myshipin. log
#! /Bin/sh
#
# This script will be executed * after * all the other initscripts.
# You can put your own initialization stuff in here if youdon't
# Want to do the full Sys V style init stuff.
Iptables-F-t natiptables-t nat-a prerouting -- dst 61.144.14.72-p tcp -- dport3389-j DNAT -- to-destination 116.6.73.229: 3389
Iptables-t nat-a postrouting -- dst 116.6.73.229-p tcp -- dport 3389-j SNAT -- to-source 61.144.14.72
~
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