Showing posts with label proxy. Show all posts
Showing posts with label proxy. Show all posts

24 March 2017

Free VPN(Unlimited connections)

So, one of the many benefits of being a student is that you get free access to a lot of stuff.

One of the best such student dev. kits is the Github Student Developer Pack.

It has lots of free goodies that you can go check out in detail.

One of the best things that is included in the pack however is 50$ of Digital Ocean credits.


And this is how we will setup our own private VPS that will give us free unlimited VPN connections for about ~12 months depending on your data needs.

Here are the steps to do so -

1. Make your GH account using a .ac or .edu mail id. (So that it is eligible for the GH student pack)
2. Get your GH student pack .
3. Make a new Digital Ocean account. (DO might ask CC info for verification purposes)
  Remember to use the following referral link while signing up to get free 10$ of Digital Ocean credits - https://m.do.co/c/0fb06a5c5cf9

4. Once you have created the account, create a support ticket to apply the GH promo code since only customer support executives can apply it to an account. Just keep the ticket title as "Help with applying GH student Promo code" and paste the promo code you got from GH student pack in the body asking them to apply the code for 50$ of credit. They will reply back in ~1 hrs with the promo applied.
5. Once you are signed up and ready to roll, create a droplet
6. Choose a config according to your needs, I prefer the 5$/pm droplet since it has about 1000gigs of bandwidth and running a VPN barely costs any RAM or CPU. Also choose a Data center region, I am using a US based data center since it allows me to access US only websites. You can choose Indian servers for better ping. Use Ubuntu 16.04 as your OS.

7. Once it is up and running, SSH into the droplet.
8. Run the following script in command-line -

wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh

9.  Follow the interactive tutorial upon the execution of the above script. Use the default values except for the following options:
a. Which protocol do you want for OpenVPN connections?
  - TCP
b. What port do you want OpenVPN listening to?
  - 443
c. Which DNS do you want to use with the VPN?
 - Google
10. Copy the generated client.ovpn file to your client.
10. Install an open-vpn client (either on your phone or your Desktop) and run from the generated config.
 For ubuntu you can do this via -
sudo apt install openvpn network-manager-openvpn-gnome
11. Et. Voila, unrestricted unlimited VPN. (Also helps get past pesky proxy issues on your phone)


Have fun with your free VPN connection ;)

P.S. - You can also use the above droplet to host your own websites and other cool stuff. You basically have your own VPS! :D

26 July 2016

Squid for Ubuntu, because proxies are too much of a hassle

EDIT : Added Authentication methods for dynamic ips


It has been more than a year since I have been using squid to mitigate all the proxy problems that come due to the proxy authentication.

This is the most effective and hassle free way to set proxy in Linux.

Steps:

Note : Replace 'squid' with 'squid3' if you are not using Ubuntu 16.04

1. Install squid

sudo apt-get install squid

2. Edit the squid configuration file.

sudo vim /etc/squid/squid.conf

(for Ubuntu 15.10 and older)

sudo vim /etc/squid3/squid.conf

3. Delete all the contents of that file and replace them with the configuration given below:


Replace 10.0.2.21 with your own ip address/ other ip addresses that you want to access this proxy from.

Change 202.141.80.22 with your Proxy server address.

Change username:password to your proxy username and password.

4. Save the file ( Esc and ":wq" for vim noobs)

5. Restart the squid server.

sudo service squid restart

(for Ubuntu 15.10 and older)

sudo service squid3 restart

6. Edit your Proxy Settings from the network manager.




















7. Open your bash profile.

sudo vim ~/.bashrc

Append the following to the end of the file.

export http_proxy=http://127.0.0.1:3128
export https_proxy=http://127.0.0.1:3128


The above two things should effectively resolve all proxy problems ( Environment Variables inclusive. )

8. Source the bashrc

source ~/.bashrc

And with that you are done!

You have your own personal proxy server!

Say goodbye to proxy problems.


PS - For those of you on the more geeky side of things, what we have done with the above is create our own proxy server that caches another proxy server with authentication.

The proxy server we have made is effectively a non authentication proxy server for the ips in the allowed_ips acl.

If used a bit cleverly it might also help you get around some other big-'time' restrictions ;) .

Use wisely!


17 August 2015

Psiphon Settings for Proxy



I have been searching for a good drony alternative for Lollipop for quite some time now.

Psiphon seems to be the best yet.

You can download it from here.

1. Go to your Wi-Fi settings and change the Proxy settings to None.

2. Open Psiphon and go to option and select the settings as given below. Go to More Options and configure it as follows.


3. In the More Options screen , configure Psiphon as shown below.
Replace 202.141.80.22 with the server address you use for your proxy authentication.
Port will be 3128.Username and PWD will the proxy username and passwords you use normally.





4. Start Psiphon and let it run. I found almost everything to be working (Chrome , Play store, whatsapp , Messenger, Facebook).
This is the best alternative to Drony I have found yet. If you know of something more seamless let me know.








15 January 2015

IITG Networking in Ubuntu

1. Go to Connection Icon on your Taskbar and select 'Edit Connections'.



2. Select 'Wired Connection 1' and click 'Edit'.



3. Goto IPv4 Settings , Select the method as Manual and add your IP settings accordingly and save it.


4. Press the 'Windows' key on your keyboard and type 'Network' in the search box that comes up.

Click on it and go to 'Network Proxy'. Set the Proxy settings accordingly and click on 'Apply System wide'.


5. If you want apt-get commands (Used mainly for installing and updating softwares) to work, do the following.

Open Terminal and write the commands given below. It will ask for your password in case you have one.













6. In the windows that opens , edit the lines to the following -
(Acquire::http::proxy "http://proxy_username:password@202.141.80.22:3128/")




7. DONE!! your apt-get commands should work now and you should be able to install softwares using it.

TIP-  Run " sudo apt-get install vim " in the terminal windows without the quotes to get VIM and practice for your CS lab sessions!