- 论坛徽章:
- 0
|
回复 #12 ttplay 的帖子
solve this problem.you can use iptables nat
1.how to control port forward
first active port forward,please modify or add in /etc/sysctl.conf as follows,
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 1
kernel.sysrq=0
second ,please add below lines to iptables nat tables
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -d 219.146.117.27 -i eth0 -p tcp --dport 80 -j DNAT --to-destination 61.156.40.112
my purpose is when visiting 219.146.117.27:80.redirect your request to 61.156.40.112
[ 本帖最后由 todayhero 于 2009-1-8 08:57 编辑 ] |
|