1

Here's a thing: I have a piece of software listening on 127.0.0.1:port and only (I can choose the port). I want it to work as a server and accept connections from outer network. How can I forward the communication from (e.g.) 192.168.0.1:port to 127.0.0.1:port?

I am using Ubuntu 11.04. Tried to look into iptables, but they don't actually offer the thing I want to archieve.

1
  • rinetd (ubuntugeek.com/…) looks like exactly something I want - except it needs to be downloaded and installed. I am looking for a system-settings solution. Hope there's one
    – Corkscreewe
    May 9, 2011 at 21:50

3 Answers 3

0

You should change the ip address that the software is listening on.

If you bind it to the ip 0.0.0.0 and port 80, then it will be able to listen on all interfaces (127.0.0.1 and 192.168.0.1).

1
  • I wish I could do that. Can't modify its settings though
    – Corkscreewe
    May 9, 2011 at 21:36
0

You can easily make a tunnel using SSH.

something like: ssh -L 3307:192.168.0.1:3306 [email protected] will tunnel traffic from port 127.0.0.1:3306 to 192.168.0.1:3307

0

You can do this in your firewall (you should be using one). I use Firestarter and it has an easy interface for forwarding ports.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .