I have researched on how to access a Raspberry Pi that has a private address online, and using port forwarding seems to be the answer. But the problem that I have is that I am not using a private home Internet, instead I am conducting my project in my university. I looked around a lot but I couldn't the solution for my problem, or maybe I didn't search well. Anyways, will it work to bring a D-Link router and then configure the router's settings? Given that I am using the Internet of my university to feed the router with Internet.
If your university is internet accessable to the Internet. There is a service call
ngrok: https://ngrok.com/. It could 'Expose local servers behind NATs and firewalls to the public internet over secure tunnels' as the offical page said.
1) download and unzip:
wget https://dl.ngrok.com/ngrok_2.0.19_linux_arm.zip unzip ngrok_2.0.19_linux_arm.zip
2) register on https://ngrok.com/ and you will get a authtoken on dashboard page and execute this command:
./ngrok authtoken <authtoken>
3) after install and register (free account have 1 tcp tunnel). you could use this command to expose your ssh port:
ngrok tcp 22
it will show you a url like this:
Tunnel Status online Version 2.0.19/2.0.19 Web Interface http://127.0.0.1:4040 Forwarding tcp://0.tcp.ngrok.io:58005 -> localhost:22
4) It you see this url successfully, do not close this terminal keep it running on your pi's terminal. You could connect your pi from anywhere of the world:
ssh -p 58005 0.tcp.ngrok.io
tl;dr: no, you can't
Your university's network is probably designed to prohibit this exact kind of behavior. If you plug your router into the university system, you can forward requests that come to that router to the RPi (usually), but not those coming from the outside world.
This happens for a variety of reasons, none of which are particularly easy or possible to get around. Even if you can, your university probably has rules about that sort of thing, and may even prohibit private routers (mine does, but it is never enforced).
Yaler provides a great tunnelling service which does not require port-forwarding. It's a service that I've used cross-continent, so I know it works well. Here's the link: Yaler.
It has a great section within the docs that takes you through the setup for RPi too.