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 and follow this guide.
8. For places where access to all ports except 80 and 443 is blocked (like my college), you can use the configs provided by me (the black magic that makes this whole thing possible)  -
server.conf
base.conf
The file names match the related files in the tutorial above.

However, do change the IP/local settings in the above conf files as per the tutorial.

9. Generate the .ovpn files from the above config.
10. Install an open-vpn client (either on your phone or your Desktop) and run from the generated config.
11. Et. Voila, unrestricted unlimited VPN. (Also helps get past pesky proxy issues on your phone)

P.S. - There seems to be some problem in DNS resolution using the above config files on Linux systems, as such, enter a DNS address manually (google/stack-overflow on how to do it). You can use google's DNS servers (8.8.8.4/8.8.4.4)

Have fun with your free VPN connection ;)

P.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

27 October 2016

Auto-forward Webmails

After much toiling to get webmails to be pushed to mobile, I was still dissatisfied with it.

It only fetched mails if I was connected to the intranet.

So I figured since a lot of us have access to a work station that runs 24*7 and is connected to both the internet and the intranet, why not use it as a relay for webmails.


So here is a guide to do the same -

1. Make an account on mail-gun. Register for it using the email you want to forward your webmails to and verify your account to enable a sandbox domain.

We will be using mail-gun's https api to forward our mails ( Since our institute blocks all ports apart from 80 or 443, so no gmail pop3/imap to the rescue)

2. Once you have created an account and verified it go to the following link -
https://mailgun.com/app/domains

You will see a sandbox domain. Click on it and keep a copy of the domain and the api-key.

Your domain will look something like this -

sandboxd6eebfa15f55422ab904868718950d50.mailgun.org

Your api-key will look like the following - 
key-##################77ae

Be careful not to copy the spaces after the key or the domain.

3.  Now run the following commands - 

sudo apt-get install python-requests


Right click on it and save it at an appropriate location.

5. Run the above script and fill in the appropriate values. ( Make sure the email-id you are forwarding to is the same as the one you registered for mailgun)

To run the script, cd to the appropriate directory and run "python mail.py"



6. The script will create the necessary files and send a few email depending on your input.

7. To auto-push the mails, add a cronjob for the above script.

If you configured the above script correctly, it should have displayed a line of code to configure the cronjob for your particular system.

8. Copy that line.

9. Run  the following command in terminal - 

crontab -e

Crontab should open with your default editor.
If you haven't picked one already, pick nano.

Paste the line copied in step 8 at the end of the crontab file that opened.

Press Ctrl+X and then Y to confirm the addition of the new cronjob.

Voila, enjoy.


If you know of a better method to forward webmails, please let me know in the comments :)


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.








7 July 2015

A Fresher's Guide to IIT-Guwahati


This post is an effort by me to solve a lot of the queries I encountered myself as a fresher coming to IIT-G.

You will find that most of your doubts will be solved if you go through it carefully.

I will be updating this blog with further details as more questions arise.

If you have any further queries you can comment below or ask them in the following group (Fresher's Forum IITG).



Important Dates:
1. Registration of New BTech/BDes Students: July 23, 2015, Thursday
2. Orientation for New BTech/BDes Students:  July 24, 2015, Friday
3. First Day of Instruction: July 28, 2015, Tuesday
Hostel allotment will be announced in the Institute’s website http://www.iitg.ac.in/ on July 22, 2015.
Students can also get the hostel allotment details at the entry gate of the Institute.
All students are requested to bring their own bedding and report at the respective hostels by July 22, 2015 evening.
Link to the academic calendar: Click here.


Documents needed:


  • One copy of Provisional Seat Allocation letter [to be downloaded from the JoSAA portal].
  • Original receipt of proof of payment for seat acceptance fee of Rs.45,000 (for GEN, OBC-NCL and Foreign) OR Rs.20,000 (for SC, ST, GEN-PwD, OBC-NCL-PwD, SC-PwD, ST-PwD) in State Bank of India using E-Challan [to be downloaded from the JoSAA portal].
  • Filled-up Undertaking by the candidate [as per Annexure 9 given in JoSAA website].
  • Duly certified original medical report [as per Annexure 8 given in JoSAA website].
  • Two Passport size photographs of the candidate. 
  • Original and one photocopy of Admit Card of JEE (Advanced) 2015.
  • Original and one attested photocopy of Birth certificate or equivalent original certificate as proof of date of birth.
  • Original and one attested photocopy of Certificate as proof of Name [to tally with the entry in JoSAA database] (example: Marksheet or Certificate of Xth Exam).
  • Original and one attested photocopy of Category (SC / ST) certificate, if applicable, in the format given in JoSAA website (Issued by competent authority).
  • Original and one attested photocopy of Certificate of category of OBC-NCL (central list of NCBC), if applicable, is to be issued by the competent authority in the prescribed format given in JoSAA website and should clearly mention that the candidate belongs to Non Creamy Layer. The certificate should have been issued after 1st June, 2014.
  • Original and one attested photocopy of valid Disability certificate (if applicable) for PwD candidates.
  • Original and one photocopy of valid Nationality certificate/document/passport (if applicable) for candidates with nationality as Foreign, OCI and PIO card holders.
  • Original and one photocopy of valid Class XII marks sheet.
  •  Along with above original certificates, candidates are advised to bring the following,a. Printout of locked choices and terms and conditions taken from the JoSAA website and duly signed by the candidate.b. One set of self-attested copies of all the documents listed above. The originals will be returned after verification and self-attested copies will be retained by the Reporting Centre.

The above are the minimum required documents as prescribed by JoSAA. I also suggest carrying more than just a couple of photographs as they will be needed, a lot. Also keep a digital copy of the same along with that of your signature handy. It will help you later.


What you will get in Hostel Room:


A good thing that differentiates IIT-G from other IITs is students get single rooms right from the beginning(except girls which are twin sharing for the first year).  They come along with the following things-

1. Bed
2. Table
3. Chair
4. Almirah
5. Book Shelf
6. Ceiling Fan
7. A Lan-port

You will be assigned your hostels before coming to IITG. (I will update this post with a link to the same as and when it gets released.).

The rooms however will be assigned to you when you reach IITG itself.

Hostels:

There are a total of 11 hostels for U.G. students ( Manas, Dihing, Kapili, Dibang, Siang, Kameng, Umiam, Barak, Lohit for U.G. boys and Dhansari and Subansari for U.G. girls)

All the hostels have a Canteen (Open generally from 9:30 am to 2:30 am) , a juice center and a stationary shop.

You can get most eatables at the canteen (Biscuits, chips, chocolates).
The canteen also serves typical fast food items like chowmein, pav bhaji, burgers etc.

The juice center has various soft-drinks/milk products/soups available.

The above two will mostly be able to satisfy your daily food needs apart from mess.

The stationary shop carries general daily use items like deos, soaps, buckets etc. apart from the stationary items. It is more of a convenience store.

You can also get your xerox/print outs done at the stationary shop.

Apart from that each hostel has multiple lobbies ( a group of 7-8 rooms) and each lobby has a common bathroom which is adequate and fitted with a 24 hr working geyser.

You will also find wash-rooms equipped with washing machines ( Yes, students generally wash their own clothes). There are however alternatives available and you can find a laundry guy.

There is also a T.V. room in each hostel as well as a reading room/library and a sports room which has T.T. and carrom boards.

Wi-Fi is available in some hostels, though not all. The academic block however has full Wi-Fi coverage.





What you will need in here:

1. Mattress
2. Quilt
3. Pillow
4. Scientific Calculator [Casio fx-991ES, preferable]
5. Umbrella
6. Rain Coat
7. Bi-cycle
8. Buckets
9. Home-made food stuffs (Believe me you'll miss them the most)
10. Sports items (in case, such as swimming costume,racquets etc.)
11. Personal medication(if you have any problems like asthma)
12. Extension box

A temporary and adequate market is setup at a community hall near the boy's hostel every year at the starting of the odd semester, where you can find all the useful things of day to day life. The market is usually functional for a week.

You can buy bicycles, mattresses, pillows, buckets, stationary items, sim cards and other general daily use items from the market or the stationary shops in each hostel. Availability of the same is no issue so don't worry about them. No need to bring these items from your home.


For a more comprehensive list you can check this amazing guide.

Reaching the campus

Getting to Guwahati
Guwahati is well connected to India with rail and air travel. There are trains from all over the country to reach Guwahati (visit the Indian Railways official site http://www.indianrail.gov.in/ for complete information). There are direct flights from all major cities offered by Indian Airlines, Indigo, Spice, GoAir and Jet Airways. Connecting flights via Kolkata are also available. 

Coming a few days before the date of registration will help you settle down in your hostel rooms and meet a few people. Also you will need to buy things and you can also pay a visit to the city if you want to.

Sometimes there are train/plane delays due to rains, so just as a precaution it will be better if you arrive a couple of days before hand, because as of now there is no provision for late admission for new students.

Reaching the Campus: 
From the airport a pre-paid taxi is the best way to reach IITG. Fares have to be negotiated and the ongoing rate is around Rs.500-600/- .
From the railway station, as soon as you step out, look for our students carrying ‘IITG’ placards, or their identification cards on the platform. In case you miss them, go to the parking area of the railway station and look for buses with “ON IITG DUTY” written on the bottom corner of their windshield. 

If you cannot locate any of the above, you have other options too. You can take an auto or a taxi from the station itself. The fare may be around Rs.350/- for an auto and Rs.450 to Rs.500 fora taxi. Ask to be dropped off at the hostel gate. Another option is to catch a rickshaw at Pan Bazaar. Also, opposite to the Don Bosco School are IIT buses parked that depart for the campus every hour. Parents are advised to book their return tickets in advance at least 2-3 days after registration.

Bus timings (Note- Additional Buses may ply during the registration for convenience. The timings regarding the same will be updated in case it happens.)

Upon reaching the Campus:
Link to the Campus map - Click here. (You can obtain the printout of the same at your hostel's respective security desks.)

All the students will have hostels allotted to them by the time they reach the campus. Your first job will be to locate the hostel you have been allotted. This inquiry can be done at the railway station/ airport from the students of IITG or from the help desks setup near the various entry-gates. 


For the parents, accommodation can be booked in the institute guest house by mailing an application to guesthouse@iitg.ernet.in specifying the duration of stay, number of people visiting and the reason for visit.

Since the number of rooms in the Guest House is limited (they have a first-come first-serve policy) you will be at an advantage if you book your rooms as soon as possible. I suggest mailing them immediately. The response confirming your booking should come within 1-2 weeks.

There are hotels available in the city too, in case accommodation is not available at the Institute guest house. Here's a list of some hotels in the Guwahati city - Click here.


After Locating Your Hostel:

After locating your hostel, you will meet your care-taker/warden.You will be allocated your room and given info on the basic structure of the hostel. ( Canteen, mess, stationary shop, juice center etc.)
I will make a post detailing the same later.

For freshers the rooms are allocated on the ground floors and they are grouped separately from the seniors just so that they are comfortable. ( I can speak from personal experience that you need not fear interacting with your seniors at all. All of them are very friendly and helpful and IIT-G has a very strict anti-ragging policy) 

You will also be asked to fill out a few forms which will help you procure your local sim-card/ open your bank account. ( A local bank account in one of the 2 banks inside (Canara or SBI) is needed for fees and other college related transactions and is mandatory.)

If you arrive a couple of days early, before the registration, I suggest buying the items mentioned in the above list and getting a sim-card and opening the bank-account and exploring the campus.

The registration usually takes place in one of the lecture halls, so familiarize yourself with the campus so that finding places is hassle free.

All of the above are simply tips from personal experience and they will smooth-en the transition and it won't feel hectic to you or your parents.

After the registration, there is a general orientation the next day, at the Institute Auditorium where you will be introduced to IIT-G as a student.

There will also be a departmental orientation where-in you will be introduced to the departement professors and your future opportunities in the same. They will also inform you about the various courses you will be taking in your first semester.

For further details on your Course and Syllabi you can check the following link.

For more info check this.






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!


4 January 2015

ME110 Reports

I was bored and today was a Sunday so I finally got around to posting this.

Lab Reports-

Carpentry Lab Report 1




Bit of advice-

These reports were taken from 1st Sem.

Rumors are that 1st sem ME110 students generally have to draw more diagrams and stuff (I'm sure not all of us made so many tool diagrams during our first workshop session), so take these reports with a grain of salt.


Also thanks to Praveen and Ashutosh for the reports!