Community discussions

MikroTik App
 
alfagius
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 53
Joined: Mon Feb 21, 2011 4:07 pm

Webproxy: Https

Thu Aug 18, 2011 10:04 am

Good morning.

I'm sure people already came across this issue, although I couldn't find anything on forums.

I have built a webfilter for the company I work in, using the Mikrotik Webproxy, and it works like a charm, except for one thing.

https://www.facebook.com

http I block it fine, however https is giving me hell. My first instinct was to drop all port 443 traffic altogether, but it created more problems than it solved, since they use a lot of legit https sites for work.

My aim for this excercise was to block websites that waste time at work, my main target being facebook, and this whole https workaround is beating the purpose for it all.

Messing with DNS is not an option, since 2 or 3 machines in the hotel actually need facebook for work promotions.

Any ideas?
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: Webproxy: Https

Thu Aug 18, 2011 10:25 am

Firstly,
Only HTTP traffic is supported in transparent mode of the web proxy. HTTPS and FTP protocols are not going to work this way.

You can block 443 TCP traffic that belongs to Facebook (bunch of IP addresses are used by Facebook) at /ip firewall filter.
 
alfagius
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 53
Joined: Mon Feb 21, 2011 4:07 pm

Re: Webproxy: Https

Thu Aug 18, 2011 10:43 am

That's what worried me.

So essentially, if facebook decide to tinker with their IP's, next DNS refresh will render me helpless, unless i keep checking them constantly.
 
kirshteins
MikroTik Support
MikroTik Support
Posts: 592
Joined: Tue Dec 02, 2008 10:55 am

Re: Webproxy: Https

Thu Aug 18, 2011 10:53 am

This example covers all known Facebook addresses:
/ip firewall address-list
add address=66.220.144.0/20 disabled=no list=facebook_ip_addresses
add address=69.63.176.0/20 disabled=no list=facebook_ip_addresses
add address=204.15.20.0/22 disabled=no list=facebook_ip_addresses
/ip firewall filter
add action=drop chain=forward disabled=no dst-address-list=\
    facebook_ip_addresses dst-port=443 protocol=tcp
 
User avatar
petrn
Member Candidate
Member Candidate
Posts: 180
Joined: Thu Jul 29, 2010 3:56 am
Location: Dubai

Re: Webproxy: Https

Thu Aug 18, 2011 9:50 pm

This example covers all known Facebook addresses:
Not really:

http://bgp.he.net/AS32934#_prefixes :
66.220.144.0/21
66.220.152.0/21
66.220.159.0/24
69.63.176.0/21
69.63.184.0/21
69.171.224.0/20
69.171.239.0/24
69.171.240.0/20
69.171.255.0/24
74.119.76.0/22
204.15.20.0/22

http://bgp.he.net/AS32934#_prefixes6 :
2620:0000:1c00::/40

EDIT: IPv4 summarized:
66.220.144.0/20
69.63.176.0/20
69.171.224.0/19
74.119.76.0/22
204.15.20.0/22
Last edited by petrn on Fri Aug 19, 2011 11:11 am, edited 1 time in total.
 
kirshteins
MikroTik Support
MikroTik Support
Posts: 592
Joined: Tue Dec 02, 2008 10:55 am

Re: Webproxy: Https

Fri Aug 19, 2011 8:00 am

You can easily add them to the address list :)

Who is online

Users browsing this forum: Bing [Bot], mquan1984 and 141 guests