-1

Hello I want to forward port A of my host to port B of another host, in Linux I always use:

iptables -t nat -A PREROUTING -p tcp -m tcp --dport A -j DNAT --to-destination dest:B
iptables -t nat -A POSTROUTING -d dest -p tcp -m tcp --dport B -j SNAT --to-source myhost

And FPipe on Windows did the trick too:

FPipe.exe -l A -r B dest -v -c 2048

But the FPipe application will reset the connection if connection speed > 32KB/s, and I have no way to bypass this.

So could anyone help me with this - tell me how to use fpipe correctly or recommend another freeware to do this thing?

Many thanks.

Felix Yan
  • 14,841
  • 7
  • 48
  • 61

2 Answers2

2

You could also use PJS Passport - don't know whether it is configurable from the command line, though.

Frank Schmitt
  • 30,195
  • 12
  • 73
  • 107
0

Try netcat.

e.dan
  • 7,275
  • 1
  • 26
  • 29
  • Will this also work on Windows? The Wikipedia article states "On Linux, NetCat can be used for port forwarding", which seems to indicate it doesn't. – Frank Schmitt Jun 06 '11 at 06:39
  • @Frank: I believe there are Windows ports: [see here](http://en.wikipedia.org/wiki/Netcat#Variants) – e.dan Jun 06 '11 at 06:54
  • I tried the windows version of netcat but it does not support "-c" yet, which is needed to do port forwarding. – Felix Yan Jun 06 '11 at 07:23
  • @Felix - I think the `-e` option does what you want. At least that's what I understand from the docs. But glad the other tool helped. – e.dan Jun 06 '11 at 08:32
  • I tried but failed... The connection will be terminated right after it actually connected, and giving an error " – Felix Yan Jun 06 '11 at 10:38