Not without my say so….


Live in an embargoed state? that is then the common symptom: you are barred to access resources freely available to any soul around the world. I am not here to lecture whether it is right or wrong, but my pragmatics advises me to circumvent the bar with no conscience burden. Do not take me wrong there is no wrong doing done when you want to get the open-source contents that happen to be hosted on the US soil and unlike +90% of other resources suddenly they are not available to you. Examples? consider Docker hub images; elastic resources from the elasticsearch to the plugins or to resources related to virtualbox or oracle resources like OCFS or their unbreakable kernel hehehe…

Now normally what we do we create a vpn tunnel to a VPS halfway across the world and then we get the things we want through it. Openvpn is fantastic solution and works like a charm…actually for oppressed people like us from our regime, that is how we securely get through to social media and uncensored contents on the Internet from our PCs. However working on servers remotely(ssh access) and running the openvpn causes our ssh session dropped i.e
Everything is passed to the newly created tunnel that passes all to the other end of the tunnel:
default via 10.8.0.1 dev tun0 proto static metric 50
and you have to devise other methods of access like Host-to-guest console access be it kvm,esx or any other methods. Now the issue with the remote console as you may guess is inability to copy and paste things from your machine making it cumbersome.
Recently I addressed this through an easier and cheaper method and even with a bonus security in there 🙂 bear with me to explain:

Basically it boils to two packages: proxychains and tor. Proxychains is basically a socket proxy for processes ran in terminal to talk to the localhost:9050 tor.
Here is the nitty-gritty of the process(Instructions for Centos7 run as root):
a. install the dev tools:
yum groupinstall "Development Tools"
b. install git, wget and vim as the tools to use
yum install epel-release && yum update && yum install git wget vim
c. install tor and edit the torrrc to log
yum install tor && vim /etc/tor/torrc
uncomment below line:
Log notice file /var/log/tor/notices.log
d. enable the tor service and start it:
systemctl enable tor && systemctl start tor && tail /var/log/tor/notices.log
The latter will tell you if the circuit is functional.
Now time to compile proxychains
a. cd to the directory and get the proxychains
cd /usr/local/src && git clone https://github.com/rofl0r/proxychains-ng.git
b. configure and make and make install
./configure && make && make install
c. Now you have the proxychain binary and conf in related dirs as:
/usr/local/bin/proxychains4 and /usr/local/etc/proxychains.conf
I tend to make a symbolic link to make things easier for myself by:
ln -s /usr/local/bin/proxychains4 /usr/local/bin/proxychains
Lastly you may want to just change one line in the conf file to make proxychain talk to tor in socks5:
vim /usr/local/etc/proxychains.conf
socks5 127.0.0.1 9050

That is all basically. Now any command in the bash that requires a circumvention needs to be preceded by proxychains like:
proxychains curl -fsSL https://get.docker.com/ |proxychains sh

Voila enjoy… 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.