Prerequisite
1. You have ssh access to a server, the server has public internet access2. On Windows, You can change proxy settings on your web browser or any program you want to access to internet, Or
3. On Linux, You can compile c program
Tech explains:
ssh has a feature to enable socks 5 proxy server on your own local machine when you connect to the server. Then on the local machine, configure proxy settings will let you use the internet access (or intranet access) on that server.
There’s also a program on Linux which can use http, socks4 or/and socks5 proxy to proxy any program. For example, you want to FTP to internet but the FTP program didn’t provide proxy settings, then you can use this program to do the proxy in the background for you.
Steps (for Windows):
1. Connect to you server using ssh with below syntax:a. ssh –D <local proxy port> -N <yourUserName>@<yourServer or IP address>
b. example: ssh –D 9050 –N joe@myWebServer
c. when use putty: plink –D 9050 –N joe@myWebServer
2. On you Windows machine, configure your program to use localhost port 9050 as Socks5 proxy, without use name and password.
3. Try access sites you were not able to access
4. You can also try programs like FreeCap to proxy everything, but as I tested, it won’t work on my PC.
Steps (for Linux – simple one):
1. Connect to you server using ssh with below syntax:a. ssh –D <local proxy port> -N <yourUserName>@<yourServer or IP address>
b. example: ssh –D 9050 –N joe@myWebServer
c. when use putty: plink –D 9050 –N joe@myWebServer
2. On you Windows machine, configure your program to use localhost port 9050 as Socks5 proxy, without use name and password.
3. Try access sites you were not able to access
Steps (for Linux – advanced one):
1. 1. Download ProxyChains from http://proxychains.sourceforge.net to your Linux box
2. Untar, unzip the file and compile, install it: a. tar xzf <downloaded file>
b. cd <extracted directory>
c. sh configure
d. make
e. make install
f. Attention: For x64 system, you may hit error “object 'libproxychains.so' from LD_PRELOAD cannot be preloaded: ignored”, when run proxychains, you can fix it by “ln –s /usr/lib/libproxychains.so /lib64”
3. 3. Connect to you server using ssh with below syntax:
a. ssh –D <local proxy port> -N <yourUserName>@<yourServer or IP address>
b. example: ssh –D 9050 –N joe@myWebServer
c. when use putty: plink –D 9050 –N joe@myWebServer
4. 4.edit /etc/proxychains.conf file, at the end of the file, under [ProxyList] section, add the socks5 server entry
a. example: if you did as above, add “socks5 127.0.0.1 9050”
5. 5. start any of your program by “proxychains <your program>”
a. example: proxychains firefox
Comments
Post a Comment