All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Bambach <eric@cisu.net>
To: James Miller <jamtat@mailsnare.net>
Cc: linux-newbie@vger.kernel.org
Subject: Re: ssh as proxy?
Date: Tue, 15 Feb 2005 18:47:34 -0600	[thread overview]
Message-ID: <200502151847.34392.eric@cisu.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0502151644180.14569@localhost.localdomain>

On Tuesday 15 February 2005 05:02 pm, James Miller wrote:
> I've run across some material on the web recently that piqued my interest
> owing to a situation we'll be faced with while on vacation. The situation
> is as follows: we'll have access to a DSL connection for internet, but the
> service blocks all but http/https traffic. So, no ftp'ing, instant
> messaging or pop/imap checking will be possible. So the material I ran
> across was interesting because it dealt with how to get around this sort
> of port-blocking firewall. It described setting up a Linux machine on the
> 'net somewhere that has sshd running, but sshd listens on port 443 (https)
> rather than the traditional port 22. I've managed to get my Freesco router
> to do this, so that much is in place and I can at least ssh into my
> machine from behind the port-blocking firewall. Other things I read on
> this seemed to indicate that ssh can act as something of a proxy so that
> other internet-bound traffic can travel over that ssh connection and be
> routed through the remote Linux box running sshd on port 443 to allow
> other programs that use other ports to work. I'm a little hazy on
> how/whether this works, so I'd like to ask for feedback on that here.
Yep. Just add this line in sshd_config file
Port 443
and killall -HUP sshd. It can listen on multiple ports so you dont have to 
lose it on port 22 just to listen on 443. Do both! :) 
> I checked the ssh manpage and it does seem to indicate that ssh can be set
> to listen for traffic to a certain port. So, the remote machine has sshd
> listening on port 443, and the local machine would log into it and be
> instructed to listen for traffic on a certain port locally. Let's say the
> port for ssh to listen on on the local machine is 8080. As I get it, to
> start the sort of proxying I've mentioned, you would issue something like
> ssh -L 8080:host.uwannalog.into:443 -l uname . Once you're logged in like
> that, you set the apps you want to use on the local machine that use
> blocked ports so that they use the localhost as proxy. They would have
> localhost:8080 entered into their proxy options. Then, in theory, they
> would be communicating with the wider 'net on which all ports might be
> open over ssh via the remote Linux machine and its routing capabilities.
>
> This is so complex, it's almost worse than entering the twightlight zone.
> But I'd just like to check if I've gotten any of it right, and to ask for
> corrections on whatever I've gotten wrong. Help will be appreciated.

Yep, you're 95% of the way there. 
Instead of the -L option try the -D option. This works to circumvent IRC 
restrictions for me in school ;)
Im not too well read on ssh forwarding so I dont know the technical difference 
between them, but it seems -D will get you by just fine at least for web.

Open console, type ssh -l username -D6667 mysshserver.com

Then ssh will act as a socks4/socks5 proxy. Set up application appropriately 
and it will go!

> Thanks, James
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs

-- 
----------------------------------------
--EB

> All is fine except that I can reliably "oops" it simply by trying to read
> from /proc/apm (e.g. cat /proc/apm).
> oops output and ksymoops-2.3.4 output is attached.
> Is there anything else I can contribute?

The latitude and longtitude of the bios writers current position, and
a ballistic missile.

                --Alan Cox LKML-December 08,2000 

----------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

  reply	other threads:[~2005-02-16  0:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-15 23:02 ssh as proxy? James Miller
2005-02-16  0:47 ` Eric Bambach [this message]
2005-02-16  3:47   ` James Miller
2005-02-16 13:40     ` Eric Bambach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200502151847.34392.eric@cisu.net \
    --to=eric@cisu.net \
    --cc=jamtat@mailsnare.net \
    --cc=linux-newbie@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.