Use SSH to Create an HTTP Proxy
SOCKS is built in to OpenSSH, so it's a trivial matter to set up a local SOCKS proxy with the -D flag. For example:
$ ssh -D 12345 myuser@remote_ssh_server
will open up the port 12345 on your local machine as a SOCKS proxy so all your HTTP traffic can be specified to go through the SSH tunnel and out remote_ssh_server on the other end. Your proxy server is now set up.
Next, set up your browser to use the proxy server. Most browsers include proxy support. For Firefox 3, go to Edit→Preferences→Advanced→Network→Settings, and specify that you want to use a Manual Proxy, localhost, port 12345 and SOCKS v5 (although OpenSSH supports both versions 4 and 5).
Now your browser is using a secure tunnel to your remote SSH server.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- I once had a better way I
2 hours 53 min ago - Not only you I too assumed
3 hours 10 min ago - another very interesting
5 hours 3 min ago - Reply to comment | Linux Journal
6 hours 57 min ago - Reply to comment | Linux Journal
13 hours 51 min ago - Reply to comment | Linux Journal
14 hours 7 min ago - Favorite (and easily brute-forced) pw's
15 hours 58 min ago - Have you tried Boxen? It's a
21 hours 50 min ago - seo services in india
1 day 2 hours ago - For KDE install kio-mtp
1 day 2 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?



Comments
socks in download manager
hello guys ,
how can i set socks proxy configuration for download files in for example internet download manager ?
or is there any download manager that you know which can download with this type of proxy server , i mean socks host proxy ?
is it possible ?
Thanks A Lot ,
Omid
No easy
I don't think it is that easy, what about the server side configuration? Now that is the difficult part.
SOLVED: I'm getting white screens
Ok, the problem was that I had something in HTTP Proxy (The first input). I had to leave it blank and add this config to SOCKS only.
SOCKS Host: 127.0.0.1 port: 12345 (I, actually, used 8080) with
ssh -C2qTnN -D 8080 user@my_server
but I'm sure it's gonna work with port 12345, hehe.
It's hard to be free... but I love to struggle. Love isn't asked for; it's just given. Respect isn't asked for; it's earned!
Renich Bon Ciric
http://www.woralelandia.com/
http://www.introbella.com/
I'm getting white screens
I'm using Firefox 3.0.10 and Fedora 10.
It seems to work partially. I'm getting white screens instantly and, if I shutdown the ssh tunnel, it gives me an instant error.
What could be wrong with my proxy? I'm using my super-cool Dreamhost server for the tunnel... anything they could be blocking?
It's hard to be free... but I love to struggle. Love isn't asked for; it's just given. Respect isn't asked for; it's earned!
Renich Bon Ciric
http://www.woralelandia.com/
http://www.introbella.com/
plink.exe putty.exe on windows
You can use plink.exe or putty.exe on windows.
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
More details; also tunneling the DNS requests
ssh -D 8080 -f -C -q -N myuser@remote_ssh_server
-D 8080 : This does the dynamic stuff and makes it behave as a SOCKS server.
-f : This will fork the process into the background after you type your password.
-C : Turns on compression.
-q : Quiet mode. Since this is just a tunnel we can make it quiet.
-N : Tells it no commands will be sent. (the -f will complain if we don’t specify this)
In Firefox use about:config
network.proxy.no_proxies_on : localhost, 127.0.0.1, 192.168.0.0/24, .yourcompany.com
network.proxy.socks : 127.0.0.1
network.proxy.socks_port : 8080
network.proxy.socks.remote_dns : true
network.proxy.socks_version : 5
network.proxy.type : 1
The setting remote_dns will make sure also your dns requests will be tunneled over the SOCKS proxy
When surfing web sites, just displays a blank page
I did exactly as the tip stated. Logged into the Ubuntu box and gave above ssh command.
However, when I enter www.google.com, it just displays a blank page. Would anyone know what it the problem.
Thanks
I'm wearing two pairs of Socks
If you find a protocol/port blocked by a corp. proxy or just needing to tunnel more than just simple http/https thru your SOCKS proxy but your app doesn't support SOCKS check out proxychains. http://sourceforge.net/projects/proxychains/
Install proxychains
Create your ssh SOCKS proxy
# ssh -fqND 5555 thedoc@tardis
Edit the /etc/proxychains.conf
uncomment the "dynamic_chain", comment out the line "strict_chain" and add a line containing the ssh socks5 port "socks5 127.0.0.1 5555"
Then just run your app with the normal cli command but with proxychains prepending the line.
For example to run the command "emerge --sync" (part of everyone's favorite package management tool, portage) just do this
# proxychains emerge --sync
-nick
DNS requests won't be proxied!!
If you want your DNS requests from web browsing to be proxied also (SOCKSv5), make sure to open up "about:config" in Firefox and change "network.proxy.socks_remote_dns" to True.
It is called a SOCKS proxy
It is called a SOCKS proxy, not an HTTP proxy. An HTTP proxy is told to a proxy whose protocol is HTTP, e.g. Squid.
I'm agree with you.
I'm agree with you.
another great tip
I'm learning a lot with these little tips. Keep it up! :)
Background the process
For those of us who want to use terminal to do something else other having an ssh session open while running the proxy, you can prepend
-f -q -Nlike so:ssh -f -q -N -D 12345 myuser@remote_ssh_serverprovided that you can login into your remote ssh server without a password. See this page on how to log in without a password:
http://linuxproblem.org/art_9.html
Cheers