This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Am not getting expected filtering results...

Hello All,

I cannot block all HTTPS sites except explicitly defined HTTPS sites...

I want to create a filter for a specific user (host actually) to ONLY be able to access online banking, Google (to search for banking sites only) and mail (Gmail, Yahoo mail and Hotmail) Here is what I tried.

1. Checked the “Scan HTTPS(SSL) Traffic” on Web Protection\Web Filtering Global Tab

2. Created a Filter Action
Name: “Google with Banking,gmail,yahoo,hotmail”
Mode: Block by default
Threshold: Off
Allow these website catagories: Finance/Investing
Allow these URL sites:
Name: “Google with Banking,gmail,yahoo,Hotmail”
Domains: Left this Blank
https://www.google.com/
https://mail.google.com/
http://mail.yahoo.com/
[url=http://www.hotmail.com/
Checked “Use Antivirus scanning”

3. Created a new filter action:
Name: “Google with Banking,gmail,yahoo,hotmail allways”
Allowed Users/Groups: Left this one blank
Time Event: Allways
Filter Action: “Google with Banking,gmail,yahoo,hotmail”

4. Created a Proxy Profile
Name: “Client IP 192.168.2.5”
Position: 1 (only one profile so far)
Source Networks:
Name: “Client IP 192.168.2.5”
Type: Host
IPv4 Address: 192.168.2.5
Filter Assignments: “Google with Banking,gmail,yahoo,hotmail allways”
Fallback Action: Default Filter Action
Operation Mode: Transparent
Authentication Type: None
Full Transparent mode: Did not check this
Scan HTTPS(SSL) Traffic: Did not check this

This works well to access the URLS listed in the filter action (Step 2. Above) and blocks all URLS using HTTP protocol but it DOES NOT block any URLS starting with HTTPS protocol.
When I also check the “Scan HTTPS(SSL) Traffic” on the “Client IP 192.168.2.5” Proxy Profile object, HTTPS sites are blocked but so are my allowed sites as defined in the “Google with Banking,gmail,yahoo,hotmail” Filter action (Step 2 above).
Can anyone see what I am doing wrong here?
Thanks!


This thread was automatically locked due to age.
  • You should have "Scan HTTPS" turned on.

    Under "Allow these URLs" this should be a series of Regular Expressions.

    Try this tool on how to build a regex for a URL.
    Quick RegEx for URLs | UTM Tools

    Note that Google also has mail.google.com and other hostnames, and if you are outside of the US you may need to handle regional variations (such as google.de).

    To simplify things slightly, you can also go to the Proxy Profile and set the Fallback Action to the "Google with..." Action.  You can then delete the Filter Assignment - it isn't needed.  All traffic from that host will use the Fallback and your new Action.
  • Thanks for the reply Michael but I still don’t see what I am doing wrong here… I did try to turn Scan HTTPS(SSL) Traffic to ON (see below)

    I would like to filter all HTTP and HTTPS traffic except the defined HTTP and HTTPS sites in my policy. I am able to filter the HTTP but not HTTPS traffic correctly.

    I simplified for a test:

    Filter Action:
    Name: “Block all HTTP/HTTPS but google and Yahoo mail”
    Mode: Block by default
    Threshold: Off
    Allow these website categories: None selected
    Allow these URL sites:
    Name: “google and yahoo only”
    Domains: Left this Blank
    Regular Expressions:
    ^https?://([A-Za-z0-9.-]*\.)?google.com/ (SHouldn’t this RE allow all flavours of the google domain?)
    https://www.google.com/
    Google
    http://mail.yahoo.com/

    Proxy Profile:
    Name: “Client IP 192.168.2.5”
    Position: 1 
    Source Networks:
    Name: “Client IP 192.168.2.5”
    Type: Host
    IPv4 Address: 192.168.2.5
    Filter Assignments: None selected
    Fallback Action: “Block all HTTP/HTTPS but google and Yahoo mail”
    Operation Mode: Transparent
    Authentication Type: None
    Full Transparent mode: Did not check this
    Scan HTTPS(SSL) Traffic: Tried this turned on and turned off (see below)

    1. When Scan HTTPS(SSL) Traffic is turned OFF
    Results: 
    Only defined HTTP traffic is allowed (Google and Yahoo mail)
    All HTTPS Traffic is allowed (only defined HTTPS should be allowed)
    2. When Scan HTTPS(SSL) Traffic is turned ON
    Results:
    It seems ALL HTTP and HTTPS traffic is blocked

    Can anyone see what I am doing wrong here?
    Thanks!
  • The regex looks good for Google if you are in USA.  If you are in canada you also need to do google.ca, if you are in England then google.co.uk, etc.
    Please note that some site like yahoo rely heavily on yimg.com and other domains that may need whitelisting as well.
    Once you have things working at a base level you may want to do some basic tests and then go into the logs and see what got a status=403 indicating it was blocked.


    I've tried it with the settings you've described and it worked for me.  The only difference was I used standard mode.

    One thing to do would be to switch to Standard Mode and configure the proxy on your browser.  Some things like HTTPS support is much better in Standard Mode, though it should work equally in both.

    Have you imported the UTM as a trusted signing authority on the computer?  Under Web Filtering, HTTPS, Signing CA.  Download it and then install it on the computer.

    When you say "is blocked" does that mean you are getting a block page that says the category is forbidden, or do you get things like forever loads?

    Can you post relevant parts of your log file - being careful to annotate what config/action you are doing to create the log.
  • It's not clear to me that you want to scan SSL or use a Profile.

    Rather, why not change the Firewall rule created by the Installation Wizard?  Now, it's probably 'Internal (Network) -> Web Surfing -> Any : Allow'.  You could create a new services Group named "Web Surfing - HTTPS" to use in place of "Web Surfing" there.  Then create a Network Group "Allowed Targets" containing DNS Groups for the allowed banks, google.com, maps.google.com, gmail.com, etc.

    Finally, create new rules, in order:
    • Client IP 192.168.2.5 -> HTTPS -> Allowed Targets: Allow
    • Client IP 192.168.2.5 -> HTTPS -> Any : DROP
    • Internal (Network) -> HTTPS -> Any : Allow


    That said, I agree with Michael that the better solution is a Standard mode instead of Transparent.  Rather than key off a specific IP that can be changed very easily, some form of authentication would be preferred.

    Cheers - Bob
  • Hello all,
    My goal: Block all traffic globally then Create two “policies for accessing the web” (defined by IP)

    Policy 1 - Wide Open now but will create some restrictions later (this works fine)
    Policy 2- All Web blocked except Search engines, web mail and online banking

    Profiles approach for Policy 2 above:
     Global Tab
    Turn ON Scan HTTPS(SSL) traffic
    Choose transparent mode

     Filter Acton Tab (Create a filter action)
    Name: Allow_SE_Mail_Banking
    Mode: Block by default
    Allow these Catagories: Search Engines, Web Mail, Finance/Banking, Internet Services
    Allow these URLS: Left this blank
    Allways block these URLS: Left this blank

     Proxy Profiles tab (Create new profile)
    Position: 1
    Name: Client IP 192.168.2.5
    Type: Host
    IPv4 address: 192.168.2.5
    Filter Assignments: None created or selected at this time
    Fallback Action: Allow_SE_Mail_Banking
    Operation mode: Transparent
    Turn ON Scan HTTPS(SSL) traffic

    This works fine using Internet Explorer but user has to blow through the “bad certificate messages” 

    Note. I tried importing the UTM as a trusted signing authority (per Michael’s suggestion but could not get it to work for some reason) Michael, could you elaborate on how to import the UTM as a trusted signing authority on the computer?

    Thanks!
    John



    Firewall rules approach: I started over with no profiles created…

    I created the three Firewall rules (Per Bob’s suggestion) in this order:

    WEB Surfing – HTTPS rules
    • Client IP 192.168.2.5 -> HTTPS -> Allowed Targets: Allow 
    • Client IP 192.168.2.5 -> HTTPS -> Any : DROP
    • Internal (Network) -> HTTPS -> Any : Allow
    WEB Surfing rule (added by installation wizard)
    • Internal (Network) -> HTTP,HTTP Proxy, HTTP WebCache,  HTTPS -> Any : Allow

    I can get this to work for google.com and all other HTTPS sites fail by timing out so you don’t know they are disallowed until they finally fail. Also, I can’t get any other site (besides google.com) to work in the Allowed Targets area of the first rule for some reason.


    I like the idea of creating profiles and using categories to filter web traffic because the user gets an immediate message from the UTM for disallowed sites and future editing of the profiles seems more granular. Please advise if this is the best way to hit my goals?
  • It seems strange to me to allow search engines, but disallow all the rest (except for webmail and banking) You will be able to find the pages you search for, but you won't be able to browse them...
    Furthermore I always thought that when you use the proxy, that you don't have to enable webtraffic in the firewall.
    You can download the certificate from the userportal (or directly from webadmin). For IE you can distribute it by GPO's, but for Firefox this has to be done manually unfortunately.
  • Ya I know what you mean [:)] Allowing search engines is to make my testing easier to find all possible online bank sites etc...

    I will give Group Policy a try for deploying the Certificate into IE - thanks
  • This is the quick way to do certificates.

    Go to HTTP CAs page.

    For Windows System / IE (I *think* this will apply to all other browsers as well):

    Download as PKCS#12 with some password.

    Copy the .p12 to the computer in question.

    Double-click the file.  You should get a Certificate Import Wizard.  Click Next, put in password.

    Do not select "Automatically select the certificate store.."  Instead choose Place in the following store.  Choose Third Party Root Certification Authorities.


    ---

    For FF only:

    Note: If you do this while in FF it will automatically start the import.  If you do this in IE you download a .cer file.  Instructions assume the latter.

    Download as PEM.

    Copy the .cer to the computer in question.

    Start FF, Options, Advanced, Certificates, Authorities, Import

    Choose the .cer file file and check all the boxes.  Complete the import.
  • Is there a reason you must use Transparent mode?  Standard mode will work better for what you are doing.  Even if you are just doing it for debugging, can you try Standard mode?  Just set the Profile and then in your browser edit your connection settings to point to your proxy server.

    Note that if you are using the proxy (in either standard or transparent), you should not have any firewall rules that allow "Web Browsing".
  • Thanks all for your help!

    I seem to have it working now in transparent mode (I want to keep the configuring as simple as possible because solution will be installed in a remote location with zero onsite IT support). 

    I will play with standard mode as well - thanks