LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-15-2009, 10:42 PM   #1
ergosteur
LQ Newbie
 
Registered: Sep 2009
Posts: 15

Rep: Reputation: 0
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?
 
Old 12-15-2009, 10:54 PM   #2
ergosteur
LQ Newbie
 
Registered: Sep 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Never mind. My google-fu has finally resuled in something useful.


http://portfwd.sourceforge.net/

works great.
 
Old 12-16-2009, 02:04 AM   #3
rhitikarawat
LQ Newbie
 
Registered: Dec 2009
Posts: 1

Rep: Reputation: 0
Question shelinux

what is selinux ???
 
Old 12-16-2009, 02:28 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Quote:
Originally Posted by rhitikarawat View Post
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
 
Old 12-23-2009, 09:24 AM   #5
ergosteur
LQ Newbie
 
Registered: Sep 2009
Posts: 15

Original Poster
Rep: Reputation: 0
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.

 
Old 12-26-2009, 09:46 PM   #6
ergosteur
LQ Newbie
 
Registered: Sep 2009
Posts: 15

Original Poster
Rep: Reputation: 0
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how? redirect apache2 outbound ports to specific ports w/iptables? nowshining Linux - Security 5 05-27-2008 02:46 AM
iptables: redirect eMule ports jordib Linux - Networking 4 04-24-2008 04:43 PM
iptables to redirect ports? mtndew Linux - Networking 4 04-21-2006 10:03 PM
iptables:redirect ports except for packets destined for fierwall(upto 256 ip) itself mmshekiba Linux - Security 1 02-02-2006 12:08 PM
machine has adsl ethernet modem, to make it gateway over lan do i need more lan cards b0nd Linux - Networking 2 10-04-2005 10:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration