1

I'm doing the following:

% autossh -i YYY.pem XXX@SERVER -N -R 90:localhost:9000 -o ServerAliveInterval=30

to forward a server port from the local machine to the public machine.

But connections are originating from 127.0.0.1 on the local machine now. How do I forward the port so that connections appear to originate from their true IP?


For example, I have a echo listener that sits on port 9000. Whenever it gets a connection it prints the IP of the origin. Right now, it prints out 127.0.0.1 over and over.

slm
  • 7,615
  • 16
  • 56
  • 76
iamacomputer
  • 161
  • 1
  • 9
  • I spent about 8 hours yesterday trying to find the answer to this, and I'm not sure there is one. I figured out how to forward with iptables dnat & ssh -w, but then the ip is hidden with a different ip. I tried making a bridge with tun0 but somehow it is not allowed. I've been trying a "route add" but this also does not work. I'm stuck if anyone has hints I would be interested. – iamacomputer Mar 22 '13 at 13:14
  • i've tried making a tap0 bridge with openvpn but still to no avail – iamacomputer Mar 22 '13 at 21:41
  • If I understand what you're trying to do here, you want to expose a port (90) that is on your FW (aka. SERVER), and direct any connections on port 90 to an internal server's port 9000? But you're initiating this setup from the host who's port 9000 is listening? – slm Mar 28 '13 at 05:36

0 Answers0