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 to Create a Site to Site VPN Policy using Certificates from the Command-line Interface (CLI)

03/26/2020 8 People found this article helpful 94,786 Views

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

    Description

    How to Create a Site to Site VPN Policy using Certificates from the Command-line Interface (CLI)

    Resolution

     

    Feature/Application:

    This KB article describes how to create a Site to Site VPN from the CLI between two SonicWall  UTM appliances using certificates for authentication.

    Procedure:

    • Before configuring the VPN policy, import the certificates into each UTM appliance from the GUI. For more information on how to import certificates into the SonicWall UTM appliance, see Using Digital Certificates in Site to Site VPN, WAN GroupVPN & Global VPN Client connections
    • Login to the SonicWall  Command Line Interface using either SSH or Console.
    • Enter the following commands one after another. The CLI also supports pasting from the clipboard.

    For the purpose of this article, we use the following scenario:
     

    Site ASite B
    NSA 5600NSA 4500
    X1 IP: 1.1.1.1X1 IP: 2.2.2.2
    X0 Subnet: 10.10.100.0/24X0 Subnet: 172.27.24.0/24

     

    Site A Configuration
    configure terminal
    Enter configuration mode
    address-object ipv4 NSA-4500 network 172.27.24.0 255.255.255.0 zone VPN

    Create an address object of remote network

    vpn policy site-to-site NSA-4500
    enable
    gateway primary 2.2.2.2
    auth-method certificate
    certificate Server3
    Server3 is the name of the certificate. This command assumes that a certificate has already been imported into the SonicWall.
    ike-id local distinguished-nameike-id local has the following to choose from:
    • distinguished-name=the Subject field of the certificate
    • domain-name=FQDN in the format "DNS Name:" in the SubjAltName field of the certificate
    • email-id=Email address in the format "email:" in the SubjAltName field of the certificate
    • ip=IP address in the format IP Address: in the SubjAltName field of the certificate
     
    ike-id peer distinguished-name "/C=IN/ST=KA/L=BLR/O=SonicWall Inc./CN=SiteA.soniclab-kb.local"
    exit
    ike-id peer has the following to choose from:
    • distinguished-name=the Subject field of the certificate
    • domain-name=FQDN in the format "DNS Name:" in the SubjAltName field of the certificate
    • email-id=Email address in the format "email:" in the SubjAltName field of the certificate
    • ip=IP address in the format IP Address: in the SubjAltName field of the certificate
    network local name "X0 Subnet"
    network remote name NSA-4500
    proposal ike exchange ikev2
    proposal ike encryption triple-des
    proposal ike authentication sha-1
    proposal ike dh-group 2
    proposal ike lifetime 28800
    proposal ipsec protocol esp
    proposal ipsec encryption triple-des
    proposal ipsec authentication sha-1
    proposal ipsec lifetime 28800
    management https
    keep-alive
    bound-to zone WAN
    exit
     
    commitSave the settings
    Site B Configuration
     
    configure terminalEnter configuration mode
    address-object ipv4 NSA-5600 network 10.10.100.0 255.255.255.0 zone VPNCreate an address object of remote network
    vpn policy site-to-site NSA-5600
    enable
    gateway primary 1.1.1.1
    auth-method certificate
    certificate vpn-256
    vpn-256 is the name of the certificate. This command assumes that a certificate has already been imported into the SonicWall.
    ike-id local distinguished-name
     
    ike-id local has the following to choose from:
    • distinguished-name=the Subject field of the certificate
    • domain-name=FQDN in the format "DNS Name:" in the SubjAltName field of the certificate
    • email-id=Email address in the format "email:" in the SubjAltName field of the certificate
    • ip=IP address in the format IP Address: in the SubjAltName field of the certificate
    ike-id peer distinguished-name "/C=IN/ST=KA/L=BLR/O=SonicWall Inc./CN=SiteB.soniclab-kb.local"
    exit
     
    ike-id peer has the following to choose from:
    • distinguished-name=the Subject field of the certificate
    • domain-name=FQDN in the format "DNS Name:" in the SubjAltName field of the certificate
    • email-id=Email address in the format "email:" in the SubjAltName field of the certificate
    • ip=IP address in the format IP Address: in the SubjAltName field of the certificate
    network local name "LAN Primary Subnet"
    network remote name NSA-5600
    proposal ike exchange ikev2
    proposal ike encryption triple-des
    proposal ike authentication sha1
    proposal ike dh-group 2
    proposal ike lifetime 28800
    proposal ipsec protocol esp
    proposal ipsec encryption triple-des
    proposal ipsec authentication sha1
    proposal ipsec dh-group none
    proposal ipsec lifetime 28800
    management https
    bound-to zone WAN
    exit

     
     
    commitSave the settings

    After entering the above commands, to bring up the tunnel, start a ping from a host behind the Site A network to a host behind the Site B network.

    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 > TZ Series
    • Firewalls > SonicWall SuperMassive E10000 Series
    • Firewalls > SonicWall SuperMassive 9000 Series
    • Firewalls > SonicWall NSA Series

    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