开发者

Modify destination port in TCP/IP headers of all outgoing packets

Used SSH Tunnel to route the traffic add开发者_如何学编程ressed to server1:port1 to server2:port2.

Now,the problem is that i want to redirect all TCP/IP packets from desktop addressed to server1:port1 to server2:port2.

using "hosts" file on windows, i mapped server1 ip as ipaddress of server2. [local DNS mapping]

http://server2:port2 //gives the desired page. http://server1:port2 //gives the desired page as server1 ip is mapped as that of server2 ip.

Is it possible to rewrite the destination port of all TCP/IP packets addressed to some host? [Transform destination port all TCP/IP packets with (destn ip as server1 and destn port as port1) to port2]

This is required as there is no direct access to server1 from the working desktop. I can't use the same port number on server2 as that of server1 as that port is already taken on server2.

Please share your comments on this.


You can use iptables to rewrite the destination port either on the desktop machine or on an intermediate router.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜