The university where I study right now ABS – (Arnhem Business School) does some outbound port filtering.
Therefore I couldn’t access my Gmail email through POP3 neither send my emails via the SMTP protocol.
In other words the port numbers 25, 110, 995 and 143 are filtered by the University System Administrator, or whoeverdid built the University network.
This I found pretty annoying because I’ve noticed the Teachers who work on their Desktops are able to access their email addressesvia a normal POP3 and SMTP protocols .
Of course there is likely a good reason that the university filters the traffic for students accessing internet via their notebooks through the Internal built University wireless network, however as I feel very convenient with checking my mail via Thunderbird (Icedove), it’s really, really irritating to go for a browser each and every time I’d like to check my Gmail.
In that reason an idea come to my mind to get through the SMTP, POP and IMAP protocol access restrictions.
The idea is not something brilliant or something too smart, however it prooved to work so I was quite happy with it.
My idea was to simply use my personal Linux router as a jumping off place to access gmail.
To do so first think I did was to scan my Linux router and check which ports are filtered from Arnhem Business School University firewall and which one are allowed to pass traffic.
After a while I have found out that the ports range from 2010 up to 2050 are freely allowing traffic to pass without any firewall restrictions.
Thus my next logical step I took was to configure my Linux router to pass by all incoming traffic on ports 2050 and 2060 to Gmail servers for POP3 email access pop.gmail.com and the other one responsible for sending emails via the SMTP protocol – smtp.gmail.com
In order to fulfill my desired task I first experimented a bit with some iptables nat PREROUTING redirect to destination rules.
However after many tries without success I finally decided to abandom this approach and try with another one.
I’ve remembered that some time ago I’ve used a tiny Linux software called rinetd that makes the port forwardking, redirections a piece of cake
RINETD is really straight forward to install and use on Debian Linux. To make the actual port redirects first you will have to install rinetd
1. Install rinetd
debian-desktop:~# apt-get install rinetd
2. Configure rinetd by editting /etc/rinetd.conf to make the redirects to gmail or any other pop3 mail server host
Open up the /etc/rinetd.conf with your favourite text editor and for a gmail redirect place the lines:
83.228.93.76 2010 74.125.65.109 995
83.228.93.76 2050 74.125.65.109 25
In the above configuration directives the first IP address 83.228.93.76 should be changed and adjusted with your actual Linux router external IP address.
The second option 2010 is the port number to accept connections from your host to be redirected to the IP 74.125.65.109 , the last argument is the port number to where you desire to redirect 995.
In the above example I’ve used the IP 74.125.65.109 which actually a gmail server IP address I have obtained through resolving smtp.gmail.com and pop.gmail.com
In order to conduct the resolve I issued the commands:
3. Resolve pop.gmail.com and smtp.gmail.com to find out their actual IP addresses, which you will have to use in your port redirect
hipo@debian-desktop:~$ host pop.gmail.com
pop.gmail.com is an alias for gmail-pop.l.google.com.
gmail-pop.l.google.com has address 74.125.43.109
hipo@debian-desktop:~$ host smtp.gmail.com
smtp.gmail.com is an alias for gmail-smtp-msa.l.google.com.
gmail-smtp-msa.l.google.com has address 74.125.43.109
hipo@debian-desktop:~$
All left to be done to have the port redirections active is to run up the rinetd service, to do so issue:
debian-desktop:~# /etc/init.d/rinetd start
That’s all, now go to your Thunderbird, Outlook or any POP3 email client of choice and just change the mail server hosts and ports with your Linux router IP address and ports where you just binded the redirect.Of course the Linux router IP could also be used, if you don’t have a hostname associated with it.
More helpful Articles
Tags: Hotmail etc. via a different port number on Debian Linux, How to redirect ports to access Gmail, Yahoo
Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100915 Firefox/3.6.9
first thx for this tip ,i just try it out and i thinked all my problems will be solved but i surprised to not ,where ever .
View CommentView Commentmy config was like that :
ex-ip 5000 192.168.1.2 8080
192.168.1.2 5000 192.168.1.2 8080
and also tryed this :
0.0.0.0 5000 192.168.1.2 8080
192.168.1.2 5000 192.168.1.2 8080
but both don’t working .
Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ Debian/squeeze (2.30.5-1) Epiphany/2.30.5
Hi I think, you’re not able to achieve it because you use your internal IP address instead of external IP address. Could be some firewall rules that are blocking as well. Check also if the outbound ports you’re trying to use are not filtered.
Regards,
View CommentView CommentGeorgi
Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101029 Ant.com Toolbar 2.0.1 Firefox/3.6.12
Hi I think my ISP doesn’t allow to open port, this is way I didn’t success to make inetd to work.
View CommentView CommentMozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Very, very good blog!
View CommentView CommentMozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7
Thanks for your post!
View CommentView CommentCan you explain how can I find the main router of our university that we connect to the internet through? and how to find it’s open ports…
We connect to the internet by VPN connection that university provides…
I’m in Mac OS.
Thanks alot
Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+ Debian/squeeze (2.30.6-1) Epiphany/2.30.6
Hi Majid,
I don’t know if that will help but try to traceroute some location on the internet and see through where the traffic is routed?
On Mac in the terminal type something like:
$ traceroute pc-freak.net
hope this helps,
best
View CommentView CommentGeorgi