SRX

 View Only
last person joined: yesterday 

Ask questions and share experiences about the SRX Series, vSRX, and cSRX.
Expand all | Collapse all

Allowing and blocking website on SRX300

  • 1.  Allowing and blocking website on SRX300

    Posted 13 days ago

    Hi all,

    I have a SRX300 which followed the instruction of an official document to configure which websites are allowed or not allowed to be accessed but the configuration does not work after I completed the configuration.

    The official document is below.

    Allow or Block Websites by Using J-Web Integrated Content Security Web Filtering

    Juniper remove preview
    Allow or Block Websites by Using J-Web Integrated Content Security Web Filtering
    SUMMARY Learn about Web filtering and how to filter URLs on Content Security-enabled SRX Series Firewalls by using J-Web. Web filtering helps you to allow or block access to the Web and to monitor your network traffic.
    View this on Juniper >

     

    Is there anyone who knows why it does not work?

    Much appreciative if there is someone who knows how to configure SRX300 to block and allow websites.



    ------------------------------
    Tokumasa Sanada
    ------------------------------


  • 2.  RE: Allowing and blocking website on SRX300

    Posted 12 days ago

    It really depends on what "does not work" means in your case.  Please describe the symptoms you're observing.

    If I had to guess blindly, I would point you to this note in the document:
    NOTE: For an HTTPS connection, Web filtering is supported through SSL forward proxy.

    With a major push to have all web traffic encrypted these days, pure HTTP web filtering is virtually useless. With an SSL forward proxy configured, the hostname portion of a URL is invisible to the firewall as it's encrypted. Sure, the firewall could resolve the hostname to an IP address and try to match it that way, but with load balancing these days, that's not very reliable at all.

    So, if HTTPS is the issue you're having, you'll need to configure SSL forward proxy and I think you'll have to use the enhanced web filtering. Reference:
    https://supportportal.juniper.net/s/article/SRX-Blocking-HTTPS-sites-using-EWF-Enhanced-Web-Filtering



    ------------------------------
    Nikolay Semov
    ------------------------------



  • 3.  RE: Allowing and blocking website on SRX300

    Posted 10 days ago
    Edited by Tokumasa Sanada 10 days ago

    Hi Nikilay,

    The does not work, which I mean, is  that after I configured the website which should be blocked, the website still can be accessed.

    If I want to simply block websites which cannot be accessed, is it to follow the link?

    https://www.juniper.net/documentation/us/en/software/jweb-srx22.3/jweb-srx/topics/topic-map/j-web-security-utm-web-filtering-example.html

    Or could you kindly instruct the way of how to block website?

    Thanks.
    ------------------------------
    Tokumasa Sanada
    ------------------------------



  • 4.  RE: Allowing and blocking website on SRX300

    Posted 10 days ago

    Is the website URL that you were still able to access http:// or https:// ?

    The example is alright, but please see the notes on Step 5:
    NOTE: For an HTTPS connection, Web filtering is supported through SSL forward proxy.

    The example does not show how to set up an SSL Forward Proxy.

    Please also see this article:
    https://supportportal.juniper.net/s/article/SRX-Blocking-HTTPS-sites-using-EWF-Enhanced-Web-Filtering



    ------------------------------
    Nikolay Semov
    ------------------------------



  • 5.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    Hi Nikolay

    The URL is https://



    ------------------------------
    Tokumasa Sanada
    ------------------------------



  • 6.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    Nik. Tokumasa

    SSL proxy is funny in srx, yes it should

    be configured but really, if you are

    having to configure something means

    it must modify the flow. Some older

    srx do not let you install the statement

    list into the gui code block. I assume

    SSL proxy is already present in all srx

    then.

    On the other hand I had to get an srx

    with this feature and configure it.



    ------------------------------
    Adrian Aguinaga
    B.S.C.M. I.T.T. Tech
    (Construction Management)
    A.A.S. I.T.T. Tech
    (Drafting & Design)
    ------------------------------



  • 7.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    The request statement is how this is done.

    https://www.juniper.net/documentation/us/en/software/junos/application-identification/topics/topic-map/security-ssl-proxy-forward-reverse-proxy.html

    But honestly to block a port read the

    other part of the posts.



    ------------------------------
    Adrian Aguinaga
    B.S.C.M. I.T.T. Tech
    (Construction Management)
    A.A.S. I.T.T. Tech
    (Drafting & Design)
    ------------------------------



  • 8.  RE: Allowing and blocking website on SRX300

    Posted 10 days ago

    One thing i have learned about the srx series

    is that the nat modules are very complicated

    but scaling is questionable.

    I have never varied in my configuration

    from setting each(ALL) port mapping.

    Source

    1-22

    24-65535

    MOST LIKELY, also destination,

    but set source for sure.

    Dont know if dest is in new os.

    Start with basic configuration first.

    All of them(nat statements set this

    port mapping, now you can configure.

    Then start opening them(somehow).

    Keep in mind, completeness is they key.

    When I say all, I mean, as many as possible.

    MOST. some, weighted?

    Watch your ipv6, no pun intended.

    FExx

    Need I say?

    0-22

    24-65535



    ------------------------------
    Adrian Aguinaga
    B.S.C.M. I.T.T. Tech
    (Construction Management)
    A.A.S. I.T.T. Tech
    (Drafting & Design)
    ------------------------------



  • 9.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    Hi Adrian,

    Not really understand. Do you mean use NAT to block websites?



    ------------------------------
    Tokumasa Sanada
    ------------------------------



  • 10.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    Yes, that's what I mean.

    That, and the application statement.

    With ports in the application

    statement.

    Source nat

    source-address

    0-22

    24-65535

    ;-)



    ------------------------------
    Adrian Aguinaga
    B.S.C.M. I.T.T. Tech
    (Construction Management)
    A.A.S. I.T.T. Tech
    (Drafting & Design)
    ------------------------------



  • 11.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    I think in srx the https and http port

    operation are somehow linked, so

    perhaps it's difficult, but don't

    remember if it's not recommended.

    SSL proxy is either existent or not

    on old srx, not sure of new.

    Requires installation by cli

    into the statement block.

    As you can see, as I have

    said in source nat.

    Next to source-address we

    need

    source-port

    0-22

    24-65535

    but last I knew the ports of

    80 and 443 are link and

    not recommend(assuming)

    block. After putting this

    source-port statement.

    So perhaps to do this you

    need very specific nat to

    web address, then

    0-79

    81-65535

    That should be correct.



    ------------------------------
    Adrian Aguinaga
    B.S.C.M. I.T.T. Tech
    (Construction Management)
    A.A.S. I.T.T. Tech
    (Drafting & Design)
    ------------------------------



  • 12.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    Trust me when I say that most nat

    source ports should look like this.

    0-22

    24-65535

    Your nat 0.0.0.0/0 statement is

    one for sure.



    ------------------------------
    Adrian Aguinaga
    B.S.C.M. I.T.T. Tech
    (Construction Management)
    A.A.S. I.T.T. Tech
    (Drafting & Design)
    ------------------------------



  • 13.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    Hi Adrian ,

    So, if I want to use NAT to block www.facebook.com, could you instruct how to do it on NAT?

    Thanks.



    ------------------------------
    Tokumasa Sanada
    ------------------------------



  • 14.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    I'm sorry that I thought you meant

    Your own website.

    Look at this to find what you are

    doing.

    https://supportportal.juniper.net/s/article/SRX-How-to-configure-a-custom-signature-to-block-specific-URLs-using-application-firewall-AppFW?language=en_US



    ------------------------------
    Adrian Aguinaga
    B.S.C.M. I.T.T. Tech
    (Construction Management)
    A.A.S. I.T.T. Tech
    (Drafting & Design)
    ------------------------------



  • 15.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    Hi Adrian,

    Well, I have a question. If my SRX300 lost the license, without the installation of license, can my SRX300 achieve the function of blocking all websites but allowing few websites?

    Thanks.



    ------------------------------
    Tokumasa Sanada
    ------------------------------



  • 16.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    Unfortunately the custom signature example Adrian pointed to is also for plain-text http://

    That being said, the AppID can identify some pre-defined well-known websites, and I think Facebook is one of them. If your SRX is one of the older variants with a model SKU that includes JSE (not visible inside JunOS, as far as I know, but check the labels on the device), then AppID is included perpetually for free. If it's JSB or neither JSB or JSE, then AppID would require a separate license.

    Aside from that, again, you'll need to configure SSL forward proxy in order to see encrypted web traffic and block individual websites. Even that may require the use of the Enhanced Web Filtering which too technically requires a license.



    ------------------------------
    Nikolay Semov
    ------------------------------



  • 17.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    I must agree with Nik,

    SSL proxy

    and proxy forwarding are not

    the same.

    It would seem that performing

    this would now have to be done

    at various levels. Reminds me

    of the Hynix building rules I

    once encountered. But this

    15 years ago. Limited success.



    ------------------------------
    Adrian Aguinaga
    B.S.C.M. I.T.T. Tech
    (Construction Management)
    A.A.S. I.T.T. Tech
    (Drafting & Design)
    ------------------------------



  • 18.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    My current ISP is not fqdn at the srx.

    At the Hynix building I'm guessing

    that their ISP was fqdn. They had a

    long list of url they set so that

    malicious traffic would be stopped.

    These days the active scan for virus

    and spy/malware will do this.

    Point is, they did what you are asking,

    comparatively(meaning you don't

    have a license) but might still be

    possible to limited success.



    ------------------------------
    Adrian Aguinaga
    B.S.C.M. I.T.T. Tech
    (Construction Management)
    A.A.S. I.T.T. Tech
    (Drafting & Design)
    ------------------------------



  • 19.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    I have other devices behind my srx's

    that will do this.



    ------------------------------
    Adrian Aguinaga
    B.S.C.M. I.T.T. Tech
    (Construction Management)
    A.A.S. I.T.T. Tech
    (Drafting & Design)
    ------------------------------



  • 20.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    At present my ISP is not fqdn at the srx.

    I do have devices behind my srx's that

    will do this.

    I don't know exactly if Hynix had a full

    fqdn, but I assume they did. The rules

    we're different back then and it took

    a team to block websites in order

    to mitigate malicious traffic.

    A license is much desired, but to

    mitigate malicious traffic nowadays

    you should look to completeness, and

    us a PC to actively eliminate viruses

    and malware.



    ------------------------------
    Adrian Aguinaga
    B.S.C.M. I.T.T. Tech
    (Construction Management)
    A.A.S. I.T.T. Tech
    (Drafting & Design)
    ------------------------------



  • 21.  RE: Allowing and blocking website on SRX300

    Posted 9 days ago

    In short, the people at the Hynix building in

    my it department accomplished website

    blocking but it seems that most other

    sites were blocked too. Perhaps erroneously.

    FQDN is vital yet, it must be set properly.



    ------------------------------
    Adrian Aguinaga
    B.S.C.M. I.T.T. Tech
    (Construction Management)
    A.A.S. I.T.T. Tech
    (Drafting & Design)
    ------------------------------