redirect port to another machine

Posted on

Problem :

My poblem:

At work I have a proxy with some closed ports. I need to connect to an Oracle DB on some DB_IP at port 1521. DB_IP is a public IP.

What I Have:

At home, I have a Linux machine and a Linksys WRT54G Router.

What I need:

How can I do to communicate a PC at work with DB_IP:1521?

Thanks in advance.

Solution :

You can use your SSH server and port forwarding to accomplish this. Just connect to your SSH server on your linux machine using a remote forwarded port:

ssh -R 15210:DB_IP:1521

Then point your app that needs to talk to the DB to localhost:51210. That port can actually be any port you like, just make sure you make the appropriate change to the SSH command above if you change it. This command allocates a socket on your machine which is forwarded to DB_IP:1521 through your linux machine.

Leave a Reply

Your email address will not be published. Required fields are marked *