Why would you want to do this?
For many reasons. Mostly I do this when I need to appear to be a server in order to test a web service, network connection, or some other resource where access is restricted to a set of IP Addresses. This will let me use tools such as SoapUI and Firefox to debug/test things.
What is Putty
It's a cross platform SSH client that saves sessions and makes using SSH just a little easier and more convent. SSH can easily be done from a shell but the convince of having pre-defined sessions with things like tunnelling all ready configured makes Putty win out in my books.
The basic usage of putty itself is outside the scope of this article but below are links as to where it can be obtained and a documentation:
What To Do
- Start up Putty
- Fill out your session details
- Go to Connection -> SSH -> Tunnels
- Set up your tunnel configuration (See image below)
- Enter your source port number (This is the port local clients will connect to)
- Select Dynamic
- Click Add
- Go back to Session and save your session
- Click Open
Putty Tunnel Configuration |
Connecting To Your Proxy
Each program is different but here are my two most common methods/use cases:
Firefox
- Edit -> Preferences -> Advanced -> Settings
- Select Manual proxy configuration
- Set HTTP Proxy to 127.0.0.1 and Port to 1080 (or what ever port your defined)
- Ensure SOCKS v5 is selected
- Click OK
Java Applicaitons
Run the Java application with the following java options set:
Dhttp.proxyHost=127.0.0.1 Dhttp.proxyPort=8010
For example executing the application via command line may look like:
java -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8010 -jar myApplication.jar
No comments :
Post a Comment