LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Redirect ports to another machine on the same LAN (https://www.linuxquestions.org/questions/linux-networking-3/redirect-ports-to-another-machine-on-the-same-lan-775958/)

ergosteur 12-15-2009 10:42 PM

Redirect ports to another machine on the same LAN
 
I have a bit of a strange scenario.
I have a machine with a fixed IP (192.168.0.108), running Linux. It has an external IP 99.99.99.8 via a 1:1 NAT on a Cisco ASA/router. Port 3389 (MS RDP) is open for 99.99.99.8.

I want my Linux machine to listen on port 3389 and redirect all traffic to that port to a Windows machine (192.168.0.100). In this way, my Linux box is able to respond to requests on all ports, but port 99.99.99.8:3389 connects to Remote desktop on the Windows PC.

I do not have access to the Cisco NAT config.

I was able to get this setup to work by using an SSH tunnel. I ran this command on the linux box:

ssh -L 3389:192.168.0.100:3389 ergosteur@192.168.0.108

Anyone have any ideas? Perhaps using iptables or something?

ergosteur 12-15-2009 10:54 PM

Never mind. My google-fu has finally resuled in something useful.


http://portfwd.sourceforge.net/

works great.

rhitikarawat 12-16-2009 02:04 AM

shelinux
 
what is selinux ???

EricTRA 12-16-2009 02:28 AM

Quote:

Originally Posted by rhitikarawat (Post 3793350)
what is selinux ???

Hello,

If you have a questions or problem it's always the best to start your own thread and not hijack someone else's. You'll get more attention in starting your own threads. That being said, about your SELinux question:

What is SELinux

Kind regards,

Eric

ergosteur 12-23-2009 09:24 AM

Just a note, portfwd is only available as source. It compiles easily on Ubuntu, you just need to install the automake1.4 package.

then ./configure, sudo make, sudo make install.

:)

ergosteur 12-26-2009 09:46 PM

Actually... Has anyone managed to get portfwd working on Ubuntu 9.10? It works great on my 9.04 box, and it COMPILES fine on 9.10, but it doesn't work.


All times are GMT -5. The time now is 01:37 PM.