Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SSH Tunneling, view web site as though I am in the USA

6 views
Skip to first unread message

Norman

unread,
Jan 9, 2007, 8:54:01 AM1/9/07
to
Hello,
I am currently living in France, but would like to view my google video
reports as though I am in the USA (It seems there are some extra
features that the rest of the world can't see)

Now I have a shared server in the US running FreeBSD

How do I create an ssh tunnel so that I can use the US server and
access the site via my home machine?

I have tried this

#$ ssh -p 1234 -v -2 -L 80:192.168.0.1:80 me@us_server

but this does not work as I want to look at sites outside the us_server
not the us_server..

Any suggestions?

Cheers

Norman

Todd H.

unread,
Jan 9, 2007, 9:35:44 AM1/9/07
to
"Norman" <norman...@gmail.com> writes:


$ ssh -D 1080 me@us_server

And then set your local web browser to proxy using socks 4 to server
127.0.0.1 port 1080.

A peek at http://whatismyip.com/ or equivalent can help you verify you
set it up right.

$ man ssh

for details.

--
Todd H.
http://www.toddh.net/

Norman

unread,
Jan 10, 2007, 6:31:20 AM1/10/07
to

Hi Todd,

Tried this, but everytime I open a web page I just get a blank page.

Here is what I did:

1) open a Terminal

# ssh -D 1080 me@us_server

2) On Firefox preferences, Connection Settings set to Manual proxy
configuration

HTTP Proxy: localhost Port: 1080

3) Go back and view page

here I get a blank page.

Perhaps the apple has a built in Proxy settings, as when I look at the
Preferences, Network, Web Proxy I can set these there - which I did,
but then on Safari, I got an error:

Safari can't open the page "http://google.com/".

The error was: "bad server response" (NSURLErrorDomain:-1011)

Please choose Report Bug to Apple from the Safari menu, note the error
number, and describe what you did before you saw this message.

Is this correct way to do it or did I miss a point?

Cheers

Norman

Todd H.

unread,
Jan 10, 2007, 8:33:46 AM1/10/07
to
"Norman" <norman...@gmail.com> writes:

> Todd H. wrote:
> >
> >
> > $ ssh -D 1080 me@us_server
> >
> > And then set your local web browser to proxy using socks 4 to server
> > 127.0.0.1 port 1080.
> >
> > A peek at http://whatismyip.com/ or equivalent can help you verify you
> > set it up right.
> >
> > $ man ssh
> >
> > for details.
> >
> > --
> > Todd H.
> > http://www.toddh.net/
>
> Hi Todd,
>
> Tried this, but everytime I open a web page I just get a blank page.
>
> Here is what I did:
>
> 1) open a Terminal
>
> # ssh -D 1080 me@us_server
>
> 2) On Firefox preferences, Connection Settings set to Manual proxy
> configuration
>
> HTTP Proxy: localhost Port: 1080

> Is this correct way to do it or did I miss a point?

No. Not http proxy, SOCKS 4 proxy.

-D implements a dynamic SOCKS proxy.

Best Regards,

Chuck

unread,
Jan 10, 2007, 9:16:27 AM1/10/07
to

Socks5 works too.

Norman

unread,
Jan 10, 2007, 9:50:54 AM1/10/07
to

Thanks, this worked great ;) But the Google reports are the same... not
for this group I guess...

Socks v5 did not work, the page tried to load, but it never did.

Cheers

Norman

Chuck

unread,
Jan 10, 2007, 10:48:16 AM1/10/07
to

It should work with socks5 too. From the ssh man page...

-D [bind_address:]port
Specifies a local ``dynamic'' application-level port forwarding. This
works by allocating a socket to listen to port on the local side,
optionally bound to the specified bind_address. Whenever a connection
is made to this port, the connection is forwarded over the secure chan-
nel, and the application protocol is then used to determine where to
connect to from the remote machine. Currently the SOCKS4 and SOCKS5
protocols are supported, and ssh will act as a SOCKS server. Only root
can forward privileged ports. Dynamic port forwardings can also be
specified in the configuration file.

Putty's help page says essentially the same thing. I've used both Cygwin
openssh and putty 0.58 for dynamic port forwarding and set my firefox
browser to use it as a socks5 proxy. The proxy address has to use the
dotted address 127.0.0.1 and not localhost.

Todd H.

unread,
Jan 10, 2007, 12:44:28 PM1/10/07
to
"Norman" <norman...@gmail.com> writes:

> Thanks, this worked great ;) But the Google reports are the same... not
> for this group I guess...
>
> Socks v5 did not work, the page tried to load, but it never did.

Norman, I noticed in your followup you set the proxy server to
localhost. I have vague recollections that that doesn't always work
so I've gotten into the habit of using the localhost numeric ip of
127.0.0.1 as the socks proxy server address instead of the hostname.

Try setting your browser's proxy to a socks4 proxy of 127.0.0.1 on
port 1080 (or whatever local port number you fed to -D)

Darren Tucker

unread,
Jan 16, 2007, 2:04:11 AM1/16/07
to
On 2007-01-10, Chuck <skilove...@bluebottle.com> wrote:
[about dynamic forwarding]

> It should work with socks5 too. From the ssh man page...

In OpenSSH it depends on the version: from memory, SOCKS5 support was
(re)added in 3.7 or so.

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

Norman

unread,
Jan 17, 2007, 5:41:54 AM1/17/07
to

Thanks Todd, my mistake, I did use 127.0.0.1 rather than localhost.
Will play arround to see why the SOCKS v5 did not work.

Cheers

Norman

0 new messages