0

I'm trying to forward a local port to a remote telnet host. Something like this.

MyHost -----> |2222 Proxy |------> |23 Destination |

  • MyHost: I'm on a Windows PC.
  • Proxy: Is a linux box which I control.
  • Destination: Is a custom device which only accepts connections via telnet.

My ultimate goal is to telnet to Destination from MyHost through Proxy. I've read several guides but can't seem to get the right command to run on Proxy to have this work.

Also, if it's not possible to do this via ssh forwarding, would netcat cut it? Lack of encryption is not a problem.

cookM
  • 183
  • 1
  • 1
  • 3

1 Answers1

1

If the proxy is running iptables, it is as simple as

iptables -t nat -A PREROUTING -d proxy.ip.add.ress -p tcp --dport 2222 -j DNAT --to-destination des.tina.tion.IP:23

adaptr
  • 16,576
  • 23
  • 34