Unofficial E2guardian package for pfSense
-
@ucribrahim thanks for the guide post.
what I did now is simple solution since I only like to open facebook during lunch.
I created 2 schedule : AM_Working_Hours @ 9:00-12noon
and
PM_Working_Hours @ 1PM-6PM
Created 2 ACL AM_Working_Hours and PM_Working_Hours and assigned the schedule respectively.
selected "Social_media networks" to be blocked. As intended it block the websites during mentioned time.I only created 1 Group and selected both AM_Working_Hours and PM_Working_Hours.
When time set @ 12noon, social media sites are now accessible.
This is OK for me now as requirements had been achieve.
If you have a cleaner solution would great if you can share.
-
btw, squid is disabled in my setup.
im using e2g for the proxy.https://lifeoverlinux.com/how-to-block-http-and-https-websites-with-e2guardian/
You had mentioned in your forum that it can be bypassed?
that's why you add this line in your squid config.cache_peer 127.0.0.1 parent 8080 0 login=*:password always_direct deny all never_direct allow all
ill shoot some test later if it can be bypassed.
-
@ucribrahim after some testing using your code above on squid, and used proxy on web browser, i was able to access to access restricted sites.
Can you test further as i was not able to block sites using manual proxy. :(
These are my settings..
e2g
-
@kenpachizaraki Okay Could you please wait. I'll write you back.
-
@ucribrahim also im not installing the cert since e2g works fine without installing the cert (MITM).
-
@kenpachizaraki I tested the code which I add to squid config. I can still access restricted sites. :/ It didn't work at all.
But It was working, I tested a few times. Well, I'll try to use E2guardian itself, without Squid. Let's see if it's going to work stabil.
-
@ucribrahim ok let me know the progress i can run some test tomorrow.
-
@kenpachizaraki Sure, For now there is no problem, I tested a few hours. Tomorrow I'll install fresh pfsense to my hardware utm box and then I'll surf from the pfsense box and test it. I'll write the results back to you in a few days.
-
@ucribrahim can you post your working settings with squid+e2g running? ill test tomorrow...
-
@kenpachizaraki No actually I'll test E2guardian by itself. There will be no Squid.
-
@ucribrahim that would be great. Thanks in advance.
Also can someone check if proxy in google chrome webstore can be block? This is annoying since there are lots of google chrome proxy plugins that works even with MITM method. -
@kenpachizaraki Hi, Technically you can't block chrome web store. Let me tell you why. So, first of all, if you block "chrome.google.com" domain that you block directly google itself. You can't tell the e2guardian if e2guardian see "webstore" word, block the domain because the domain is under SSL. It means e2guardian can't see into the SSL traffic of an SSL domain.
"webstore" page under the encrypted traffic of an SSL domain which is "chrome.google.com", in the world no one can see the SSL traffic. (for now)
You can tell e2guardian to block "chrome.google.com" but if it blocks this domain that you can't access "google.com" :/
You can search how SSL works on google. It will help you to understand what I'm trying to say.
https://chrome.google.com/webstore/category/extensions
-
@kenpachizaraki With MITM you can block the web store but if you're doing this for a school or company with machines on a domain. Do it through GPO.
However with E2G you should be able to block chrome Web store. Remember E2G can do more powerful things than just rely on the URL. I haven't done it this way for a while so I can't give you exact instructions but it can be done.
-
@pfsensation If you do it without MITM, let us know please. Also if you do a test it would awesome. Thanks.
-
@pfsensation @ucribrahim sorry for the confusion here. Actually i dont want to block webstore url. What i want is to block those proxy plugins that you install in your chrome browser. There are lots of proxy plugins that when you install in chrome make you access ristricted sites.
I have done it in other paid UTM software where in we install the cert and inspect all 443 connections to block outgoing malformed proxy connection.
Yes it can be done via GPO bit it is tedious to add all those chrome proxy - a lot of them.
-
@kenpachizaraki You could block most of them by locking down outgoing ports (allowing only connections to E2 Guardian) and blocking the domains for proxies and VPN's through E2 Guardian.
Although this will block most of these proxies from working, SSL VPN's working over port 443 may still work. I don't believe E2 Guardian has a way of completely blocking them yet. As far as I'm aware, the way these "paid" firewalls use to block VPN's is they try to inspect the traffic. If its suspicious or it couldn't be successfully decrypted via MITM then it gets blocked.
If you want to avoid the Chrome GPO method of allowing extensions installations. Then you can also make the chrome extensions directory read only and block it that way.
The subject of blocking these VPNs working over 443 may need a bit more digging into though.
-
@pfsensation yes outgoing ports can be block but most of them are using 443. So your legitimate 443 connections will also be blocked. They are really snicky little bastard to block using that method. Hopefully in the future e2g can find a way to block those traffic.
-
@kenpachizaraki Really? I did some testing a while back, when I blocked the VPN providers domain. It would mess up the vpn client to server negotiation and just fail to connect.
But I do understand your frustrations, it's difficult to properly block these VPN's on 443. I'll bring this up to the E2guardian devs and see if there's anything that can be done to mitigate the risks. I do know some firewall solutions such as Smoothwall actually work pretty well, so it can be done but I'm pretty certain you'll probably get some false positives for sure.
-
@pfsensation if you know the vpn provider domain yes it can be easily block even using firewall.
Can you try this one in your chrome browser
https://chrome.google.com/webstore/detail/vpn-grab-a-proxy-free/epiohmjifijenpabfpggbphmjinbhgnn?hl=enHard part of this is you need to check logs on what domain that proxy is connecting.
-
@pfsensation @marcelloc @ucribrahim is it possible for e2g maybe regex to get the wan ip address?
if wan = to interface wan (whatismyipaddress) = Pass
if wan != to interface wan (whatismyipaddress) = Block/RejectSince if someone uses proxy wan ip changes to the proxy being used.
If this is possible then we can block those annoying proxy to bypass e2g or squid.