Main Menu
  • COMPANY
    • Boundless Cybersecurity
    • Press Releases
    • News
    • Awards
    • Leadership
    • Press Kit
    • Careers
  • PROMOTIONS
    • SonicWall Promotions
    • Customer Loyalty Program
  • MANAGED SERVICES
    • Managed Security Services
    • Security as a Service
    • Professional Services
SonicWall
  • Products
    • Network Security
      • Next Generation FirewallNext-generation firewall for SMB, Enterprise, and Government
      • Security ServicesComprehensive security for your network security solution
      • Network Security ManagerModern Security Management for today’s security landscape
    • Advanced Threat Protection
      • Capture ATPMulti-engine advanced threat detection
      • Capture Security applianceAdvanced Threat Protection for modern threat landscape
    • Access Security
      • Cloud Edge Secure AccessDeploy Zero-Trust Security in minutes
      • Secure Mobile AccessRemote, best-in-class, secure access
      • Wireless Access PointsEasy to manage, fast and secure Wi-FI
      • SwitchesHigh-speed network switching for business connectivity
    • Email Security
      • Email SecurityProtect against today’s advanced email threats
    • Cloud Security
      • Cloud App SecurityVisibility and security for Cloud Apps
      • Cloud Firewall (NSv)Next-generation firewall capabilities in the cloud
    • Endpoint Security
      • Capture ClientStop advanced threats and rollback the damage caused by malware
      • Content Filtering ClientControl access to unwanted and unsecure web content
    • Product Widgets
      • Product Menu Right Image
      • Capture Cloud Platform
        Capture Cloud Platform

        A security ecosystem to harness the power of the cloud

    • Button Widgets
      • Products A-Z
        all products A–Z FREE TRIALS
  • Solutions
    • Industries
      • Distributed Enterprises
      • Retail & Hospitality
      • K-12 Education
      • Higher Education
      • State & Local
      • Federal
      • Healthcare
      • Financial Services
      • Carriers
    • Use Cases
      • Secure SD-Branch
      • Zero Trust Security
      • Secure SD-WAN
      • Office 365 Security
      • SaaS Security
      • Secure WiFi
    • Solutions Widgets
      • Solutions Content Widgets
        Federal

        Protect Federal Agencies and Networks with scalable, purpose-built cybersecurity solutions

      • Solutions Image Widgets
  • Partners
    • SonicWall Partners
      • Partners Overview
      • Find a Partner
      • Authorized Distributors
      • Technology Partners
    • Partner Resources
      • Become a Partner
      • SonicWall University
      • Training & Certification
    • Partner Widgets
      • Custom HTML : Partners Content WIdgets
        Partner Portal

        Access to deal registration, MDF, sales and marketing tools, training and more

      • Partners Image Widgets
  • Support
    • Support
      • Support Portal
      • Knowledge Base
      • Technical Documentation
      • Community
      • Video Tutorials
      • Product Life Cycle Tables
      • Partner Enabled Services
      • Contact Support
    • Resources
      • Resource Center
      • Free Trials
      • Blog
      • SonicWall University
      • MySonicWall
    • Capture Labs
      • Capture Labs
      • Security Center
      • Security News
      • PSIRT
      • Application Catalog
    • Support Widget
      • Custom HTML : Support Content WIdgets
        Support Portal

        Find answers to your questions by searching across our knowledge base, community, technical documentation and video tutorials

      • Support Image Widgets
  • COMPANY
    • Boundless Cybersecurity
    • Press Releases
    • News
    • Awards
    • Leadership
    • Press Kit
    • Careers
  • PROMOTIONS
    • SonicWall Promotions
    • Customer Loyalty Program
  • MANAGED SERVICES
    • Managed Security Services
    • Security as a Service
    • Professional Services
  • Contact Sales
  • English English English en
  • BLOG
  • CONTACT SALES
  • FREE TRIALS
  • English English English en
SonicWall
  • Products
    • Network Security
      • Next Generation FirewallNext-generation firewall for SMB, Enterprise, and Government
      • Security ServicesComprehensive security for your network security solution
      • Network Security ManagerModern Security Management for today’s security landscape
    • Advanced Threat Protection
      • Capture ATPMulti-engine advanced threat detection
      • Capture Security applianceAdvanced Threat Protection for modern threat landscape
    • Access Security
      • Cloud Edge Secure AccessDeploy Zero-Trust Security in minutes
      • Secure Mobile AccessRemote, best-in-class, secure access
      • Wireless Access PointsEasy to manage, fast and secure Wi-FI
      • SwitchesHigh-speed network switching for business connectivity
    • Email Security
      • Email SecurityProtect against today’s advanced email threats
    • Cloud Security
      • Cloud App SecurityVisibility and security for Cloud Apps
      • Cloud Firewall (NSv)Next-generation firewall capabilities in the cloud
    • Endpoint Security
      • Capture ClientStop advanced threats and rollback the damage caused by malware
      • Content Filtering ClientControl access to unwanted and unsecure web content
    • Product Widgets
      • Product Menu Right Image
      • Capture Cloud Platform
        Capture Cloud Platform

        A security ecosystem to harness the power of the cloud

    • Button Widgets
      • Products A-Z
        all products A–Z FREE TRIALS
  • Solutions
    • Industries
      • Distributed Enterprises
      • Retail & Hospitality
      • K-12 Education
      • Higher Education
      • State & Local
      • Federal
      • Healthcare
      • Financial Services
      • Carriers
    • Use Cases
      • Secure SD-Branch
      • Zero Trust Security
      • Secure SD-WAN
      • Office 365 Security
      • SaaS Security
      • Secure WiFi
    • Solutions Widgets
      • Solutions Content Widgets
        Federal

        Protect Federal Agencies and Networks with scalable, purpose-built cybersecurity solutions

      • Solutions Image Widgets
  • Partners
    • SonicWall Partners
      • Partners Overview
      • Find a Partner
      • Authorized Distributors
      • Technology Partners
    • Partner Resources
      • Become a Partner
      • SonicWall University
      • Training & Certification
    • Partner Widgets
      • Custom HTML : Partners Content WIdgets
        Partner Portal

        Access to deal registration, MDF, sales and marketing tools, training and more

      • Partners Image Widgets
  • Support
    • Support
      • Support Portal
      • Knowledge Base
      • Technical Documentation
      • Community
      • Video Tutorials
      • Product Life Cycle Tables
      • Partner Enabled Services
      • Contact Support
    • Resources
      • Resource Center
      • Free Trials
      • Blog
      • SonicWall University
      • MySonicWall
    • Capture Labs
      • Capture Labs
      • Security Center
      • Security News
      • PSIRT
      • Application Catalog
    • Support Widget
      • Custom HTML : Support Content WIdgets
        Support Portal

        Find answers to your questions by searching across our knowledge base, community, technical documentation and video tutorials

      • Support Image Widgets
  • COMPANY
    • Boundless Cybersecurity
    • Press Releases
    • News
    • Awards
    • Leadership
    • Press Kit
    • Careers
  • PROMOTIONS
    • SonicWall Promotions
    • Customer Loyalty Program
  • MANAGED SERVICES
    • Managed Security Services
    • Security as a Service
    • Professional Services
  • Contact Sales
  • Menu

How do I setup and use the Threat API feature on my firewall?

03/26/2020 412 People found this article helpful 97,384 Views

    Download
    Print
    Share
    • LinkedIn
    • Twitter
    • Facebook
    • Email
    • Copy URL The link has been copied to clipboard

    Description

    The Threat API feature was released starting in SonicOS 6.2.7. Instead of logging into a firewall, Threat API allows administrators to send lists of URLs or IP addresses to be blocked via command line. Objects can be added or removed to meet the growing needs of the organization. The list is limited to 5,000 entries for all product versions.

    Additional notes:

    • Threat API settings are only available to the SonicOS administrator. By default, this is the “admin” user.
    • HTTPS management must be enabled on the interface that the Threat API call will be coming from.
    • SonicOS Threat API requires that the firewall has a Content Filtering System (CFS) license.

    Resolution

    The Threat API feature is dependent on a valid CFS license. Confirm you have a CFS license:

    1. For SonicOS 6.5 and later navigate to Manage | Licenses | Premium Content Filtering Service.
    2. For SonicOS 6.2 and earlier navigate to System | Licenses | Premium Content Filtering Service.

    Enable Threat API by going to the internal settings of the firewall.

    1. When logged into the firewall navigate to the URL. Replace "main.html" with "diag.html". For example: replace tz600.demo.sonicwall.com/main.html with tz600.demo.sonicwall.com/diag.html.
    2. Click Internal Settings.
    3. Navigate to Threat API Settings and select Enable Threat API Filtering.
      Image

    Threats can be added in the following two formats:

    • URLs: https://example.com/malware
    • IP addresses: 12.35.37.108

    For IP addresses in the threat list, SonicOS initially creates a default Threat API address group and then creates an address object (AO) for each IP address in the threat list. The SonicOS administrator configures firewall access rules that reference that address group and block the IP addresses.

    To create an access rule:

    • For SonicOS 6.5 and later navigate to Manage | Rules | Access Rules. Add an access rule from LAN to WAN. Click Deny as the action. Choose ThreatAPI Block list as the Destination.
    • For SonicOS 6.2 and earlier navigate to Firewall | Access Rules. Add an access rule from LAN to WAN. Click Deny as the action. Choose ThreatAPI Block list as the Destination.
      Image

    For URLs SonicOS adds the URLs to its CFS Threat URI list. The SonicOS administrator enables Threat API Enforcement in the associated CFS Profile and configures a Content Filtering System (CFS) policy to block the URLs in the threat list. After SonicOS receives the initial threat list and creates a Threat URI List Object, the admin adds a CFS Profile Object that references the Threat URI List Object and enables the Enable Threat API Enforcement checkbox.
    Image

    When a threat is blocked by CFS, the user will see a block message in their browser.

    The following commands can be initiated on an administrators computer to automate

    URLs:

    • GET /threat/block/uri/ – Returns URI blocklist in a simple plain‐text, 1 URI per line format.
    • OPTIONS /threat/block/uri/ – Allows restricted resources on a web page to be requested from another domain outside the domain from which the first resource was served.
    • POST /threat/block/uri/ – Instantiates the URI blocklist.
    • DELETE /threat/block/uri/ – Clears the URI blocklist.

    IP Addresses:

    • GET /threat/block/ip/ – Returns host IP blocklist in a simple plain‐text, 1 V4/V6 host per line format.
    • OPTIONS /threat/block/ip/ – Allows restricted resources on a web page to be requested from another domain outside the domain from which the first resource was served.
    • POST /threat/block/ip/ – Instantiates the host IP blocklist.
    • PUT /threat/block/ip/ – Adds host(s) to the IP blocklist.
    • DELETE /threat/block/ip/ – Deletes all or specified host(s) from the IP blocklist.

    To instantiate an IP block lists:
    curl -k -i -u admin:password -X POST -d "`printf "1.2.3.4\n1.2.3.5\n"`" https://192.168.1.254/threat/block/ip/

    To instantiate a URI block lists:
    curl -k -i -u admin:password -X POST -d "`printf "example1.com\nexample2.com\n"`" https://192.168.1.254/threat/block/uri/

    To update the IP list:
    curl -k -i -u admin:password -X PUT -d "`printf "4.3.2.1\n"`" https://192.168.1.254/threat/block/ip/

    To update the URI list:
    curl -k -i -u admin:password -X PUT -d "`printf "example.com\n"`" https://192.168.1.254/threat/block/uri/

    Delete IP entries:
    curl -k -i -u admin:password -X DELETE -d "`printf "1.2.3.4\n1.2.3.5\n"`" https://192.168.1.254/threat/block/ip/

    Delete URI entries:
    curl -k -i -u admin:password -X DELETE -d "'printf "example.com\n"'" https://192.168.1.254/threat/block/uri/

     

    Related Articles

    • How to remove 2FA for admin using CLI
    • 2FA authentication error using TOTP "Please try again later"
    • Methods to add Address Objects

    Categories

    • Firewalls > SonicWall SuperMassive 9000 Series > Content Filtering Service
    • Firewalls > SonicWall NSA Series > Content Filtering Service
    • Firewalls > TZ Series > Content Filtering Service
    • Firewalls > NSa Series > Content Filtering Service
    • Firewalls > NSv Series > Firmware

    Not Finding Your Answers?

    ASK THE COMMUNITY

    Was This Article Helpful?

    YESNO

    Article Helpful Form

    Article Not Helpful Form

    Company
    • Careers
    • News
    • Leadership
    • Awards
    • Press Kit
    • Contact Us
    Popular resources
    • Communities
    • Blog
    • SonicWall Capture Labs

    Stay In Touch

    • By submitting this form, you agree to our Terms of Use and acknowledge our Privacy Statement. You can unsubscribe at any time from the Preference Center.
    • This field is for validation purposes and should be left unchanged.
    • Facebook
    • Twitter
    • Linkedin
    • Youtube
    • Instagram

    © 2022 SonicWall. All Rights Reserved.

    • Legal
    • Privacy
    • English
      Scroll to top
      Trace:a39913c6a0ef126b3331d1fb2ef6d8e7-77