Page 1 of 1

Block internet access but allow gmail

Posted: Thu Oct 27, 2016 10:33 am
by nedwed
Hi,
I want to block internet access from a specified ip/mac except email.
My first idea was to block ports 80(http) and 443(https) and access email through a client (Thunderbird), but I'm having problems with gmail.
In theory gmail should use 993 and 465 ports to connect, but it seems that it needs the https port for authorization?
I think that the the OAuth2 method is the reason for this problem.
I've also tried to block only the DNS port and use direct IP for imap and smtp...also no luck with that.
Does someone have any experience with a similar problem?

Re: Block internet access but allow gmail

Posted: Fri Oct 28, 2016 11:14 pm
by alger
Make a rule with logging and see what ports are used.

Ps: And, for gmail you must enable POP or IMAP access.

Re: Block internet access but allow gmail

Posted: Sat Oct 29, 2016 8:42 pm
by Delte
You can give a try by allowing "pop.gmail.com" & "smtp.gmail.com" & block rest everything else.

However google have a huge range of IP for it so i guess you can get a script which constantly update it to your address list.