LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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
 
LinkBack Search this Thread
Old 11-01-2006, 09:17 AM   #1
mezeq
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Rep: Reputation: 0
ssh and port forwarding


Hi, i hope this is not to stupid.

This is the scenario:


pc1 machine work behind router
pc2 ssh server somewere
pc3 machine home direct access to internet


I don't have access to the roauter at work, so i was thinking to open a ssh tunnel with putty to pc2 (midle server) this way as long as the tunnel is opened i don't have to worry about the router.

Then i make a socks from my ssh server (pc2) ssh -g -D 9000 admin@localhost, now in firefox at pc3 im using pc2 as socks.

The question is how can i setup pc2 (ssh server) to send all traffic received by socks on port 9000 to the tunnel i opened from pc1 to pc2?
 
Old 11-03-2006, 05:59 PM   #2
Fle><
Member
 
Registered: Dec 2003
Location: Vienna | Austria
Distribution: Gentoo
Posts: 52

Rep: Reputation: 15
this looks like some kind of port forwarding is needed?
  • a thing for iptables?
  • /proc/sys/net/ipv4/ip_forward
 
Old 11-06-2006, 01:29 PM   #3
mezeq
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Found the solution!

Well i have found the solution, is like that if somebody is interested.

from pc1 putty
putty -c -R 5600:localhost:8080 -l user@domain -pw pass

from pc2 server
ssh -4 -g -v -L 5000:localhost:5600 user@domain -N

Listen to port 5000 (-g) from any host then forwards to 5600 to pc1 and putty is forwarding the port to port 8080. Opening the putty connection from pc1 to pc2 will bypass the router restriction.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh port forwarding simpl Linux - Software 3 07-20-2006 01:41 AM
SSH Port forwarding WRSpithead Linux - Networking 1 04-18-2005 04:09 AM
Help with Port Forwarding for SSH mi6 Linux - Networking 6 07-29-2003 12:46 PM
ssh, and port forwarding Tricky Linux - Networking 3 01-06-2003 07:50 PM
SSH port forwarding tarballedtux Linux - Networking 2 05-29-2002 07:16 PM


All times are GMT -5. The time now is 08:53 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration