LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-04-2018, 09:14 AM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 11
Post ssh and forwarding.


Hello.
I want to forward all my local connection to a remote server. I used below ssh:
Code:
ssh user@server -L 9080:localhost:9080 -N
And set my browser proxy to "localhost:9080" but I can't browse any website.

How can I solve it?

Thank you.
 
Old 12-04-2018, 09:28 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,672

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
Have you searched how to use ssh as a HTTP proxy?

https://www.linuxjournal.com/content...ate-http-proxy

Although from your other networking thread that may not be what you really want.

Last edited by michaelk; 12-04-2018 at 09:33 AM.
 
Old 12-04-2018, 02:58 PM   #3
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by michaelk View Post
Have you searched how to use ssh as a HTTP proxy?

https://www.linuxjournal.com/content...ate-http-proxy

Although from your other networking thread that may not be what you really want.
Thank you. If it is a device that connected to the internet then can it work? For example, a router that has ssh service and ssh to it from Linux.
 
Old 12-04-2018, 04:53 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,672

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
Not sure exactly what you want to accomplish.
 
Old 12-05-2018, 12:04 AM   #5
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Post

Quote:
Originally Posted by michaelk View Post
Not sure exactly what you want to accomplish.
The device that I ssh to it, is Cisco and have below open ports:
Code:
PORT      STATE  SERVICE
22/tcp    open   ssh
113/tcp   closed ident
443/tcp   open   https
2000/tcp  open   cisco-sccp
4443/tcp  open   pharos
5060/tcp  open   sip
50300/tcp closed unknown
50389/tcp closed unknown
I did "ssh -D 4443 user@IP" and set my browser proxy on localhost, port 12345 and SOCKS v5 but browser tells me "Unable to connect" and ssh say:
Code:
channel 3: open failed: resource shortage: 
channel 3: open failed: resource shortage: 
channel 3: open failed: resource shortage:

Last edited by hack3rcon; 12-05-2018 at 12:06 AM.
 
Old 12-05-2018, 04:43 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,672

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
A socks proxy is similar to a VPN tunnel. From the error message it does not appear your Cisco device is capable of being a proxy.
 
Old 12-05-2018, 05:18 AM   #7
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Post

Quote:
Originally Posted by michaelk View Post
A socks proxy is similar to a VPN tunnel. From the error message it does not appear your Cisco device is capable of being a proxy.
It is a Cisco ASA and connected to the internet:
Code:
> ping google.com
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 216.58.209.238, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/6/10 ms
I can use "Cisco AnyConnect" for VPN but is ssh impossible?
 
Old 12-05-2018, 05:29 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,672

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
I don't know but at the moment I would say not.
 
Old 12-13-2018, 02:38 AM   #9
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,148

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
check out this link: https://ma.ttias.be/socks-proxy-linu...ntent-filters/

From link above it says:
Once that's set up, you can configure your browser to connect to the local TCP port that the SSH client has exposed, which will then transport the data through the remote SSH server.
 
Old 12-16-2018, 02:15 PM   #10
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by JJJCR View Post
check out this link: https://ma.ttias.be/socks-proxy-linu...ntent-filters/

From link above it says:
Once that's set up, you can configure your browser to connect to the local TCP port that the SSH client has exposed, which will then transport the data through the remote SSH server.
But, it is not a Linux server, it is a device.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
Simple Port Forwarding Firewall - not forwarding MadTurki Linux - Security 14 04-09-2006 12:08 PM
ssh over ssh - X forwarding b0uncer Linux - Software 10 02-27-2006 10:12 AM
port forwarding and packet forwarding syrtsardo Linux - Newbie 2 07-03-2003 10:37 AM

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

All times are GMT -5. The time now is 02:06 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