"1"
/sbin/iptables-i input-s 45.61.255.176-j ACCEPT
/sbin/iptables-i input-d 45.61.255.176-j ACCEPT
/sbin/iptables-i input-s 23.27.6.15-j ACCEPT
/sbin/iptables-i input-d 23.27.6.15-j ACCEPT
/sbin/iptables-t nat-i prerouting-d 23.27.6.15-j DNAT--to-destination 45.61.255.17610
/sbin/iptables-t nat-i postrouting-d 45.61.255.176-j SNAT--to-source 23.27.6.15
/sbin/iptables-t nat-i postrouting-s 45.61.255.176-j SNAT--to-source 23.27.6.15
"2" Modified/etc/sysctl.conf file
# Controls IP Packet forwarding
Net.ipv4.ip_forward = 1
Modify the configuration file to take effect with sysctl-p
echo 1 >/proc/sys/net/ipv4/ip_forward (Temporary)
"3"
Service Iptables Save
Service Iptables Restart
This article is from the It Dick thread blog, so be sure to keep this source http://68686789.blog.51cto.com/10438688/1750617
Iptables routing forwarding, forwarding one server's IP to another server (Remote program protection)