1

I have a website hosted on 000webhost.com for free. I am unable to connect directly to the site because Comcast has blocked a portion of 000webhost's servers for free accounts due to other people hosting malicious content.

In order to maintain my website, I cannot use my computer to directly connect to the server. I am wondering if there is a way by which I can specifically forward attempts to access the server through a proxy, transparently.

The current system that I am on is Windows, but I also have systems running Mac OSX and Linux, so solutions for any system could be fine. I've found answers which work for http, but I'm looking for a solution which will let me use all the other functions as well, such as ftp and ssh.

2
  • http is easy, as you can using something like foxyproxy extension in firefox to proxy based on patterns. But ssh cannot be proxied, you would need to ssh to a different server first, then ssh from that to your server. Do yo have another ssh server you can access?
    – Paul
    Oct 31, 2012 at 12:17
  • @pau Yes, I do. Is there any way to automate the ssh process? ie instead of sshing to different server manually, and then sshing to the server manually? Perhaps configuring the known_hosts on the 'proxy'? I've seen gitolite autoconfigure the known_hosts to do something that I thought looked similar, but haven't figured out how to do so (haven't found documentation for known_hosts) I've also found <superuser.com/questions/466920/proxy-that-is-not-web-based?rq=1>, but am unsure of a couple things. 1)I don't know if vidalia works for ssh 2)I don't know how to do this transparently Nov 1, 2012 at 10:12

1 Answer 1

0

If you have an ssh server you can contact, there there are two steps you need.

The first thing you will need is to set up passwordless (public key) authentication to your ssh server. This is covered in How do I set up SSH so I don't have to type my password?

I will assume that server1 is your ssh server, and server2 is your blocked server.

Now to ssh to your first server, and automatically ssh to the second server, you can do:

ssh me@server1 'ssh me@server2'

As you have set up passwordless login to server1, the ssh session will be established, and the it will execute the command to ssh to the second server. From your perspective, you will just be prompted for a password to login to server2

To proxy web connections via an ssh server, you can use

ssh -D8080 me@server1

This sets up a socks proxy on your local port 8080. Any requests to this port will be forwarded over the tunnel, and the actual web connection will come from server1.

To use this in your browser, you need to say which URLs you want to forward across the proxy. Firefox has an extension called FoxyProxy which will let you define specific urls or patterns that should be forwarded to a specific proxy. The socks proxy address is 127.0.0.1:8080 once the ssh session is underway.

With FTP clients, you can usually stipulate a SOCKS proxy per connection, and this would also point to 127.0.0.1:8080.

You can combine the two above like this:

ssh -D8080 me@server1 'ssh me@server2'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .