Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Example: Configuring Security Policies in a User Logical System

    This example shows how to configure security policies for a user logical system.

    Requirements

    Before you begin:

    Overview

    This example configures the ls-product-design user logical system shown in Example: Creating User Logical Systems, Their Administrators, Their Users, and an Interconnect Logical System.

    This example configures the security policies described in Table 1.

    Table 1: User Logical System Security Policies Configuration

    Name

    Configuration Parameters

    permit-all-to-otherlsys

    Permit the following traffic:

    • From zone: ls-product-design-trust
    • To zone: ls-product-design-untrust
    • Source address: product-designers
    • Destination address: otherlsys
    • Application: any

    permit-all-from-otherlsys

    Permit the following traffic:

    • From zone: ls-product-design-untrust
    • To zone: ls-product-design-trust
    • Source address: otherlsys
    • Destination address: product-designers
    • Application: any

    Configuration

    CLI Quick Configuration

    To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

    set security policies from-zone ls-product-design-trust to-zone ls-product-design-untrust policy permit-all-to-otherlsys match source-address product-designers set security policies from-zone ls-product-design-trust to-zone ls-product-design-untrust policy permit-all-to-otherlsys match destination-address otherlsys set security policies from-zone ls-product-design-trust to-zone ls-product-design-untrust policy permit-all-to-otherlsys match application any set security policies from-zone ls-product-design-trust to-zone ls-product-design-untrust policy permit-all-to-otherlsys then permit set security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust policy permit-all-from-otherlsys match source-address otherlsys set security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust policy permit-all-from-otherlsys match destination-address product-designers set security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust policy permit-all-from-otherlsys match application any set security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust policy permit-all-from-otherlsys then permit

    Step-by-Step Procedure

    The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide PDF Document.

    To configure security policies in a user logical system:

    1. Log in to the user logical system as the logical system administrator and enter configuration mode.
      lsdesignadmin1@host:ls-product-design> configurelsdesignadmin1@host:ls-product-design#
    2. Configure a security policy that permits traffic from the ls-product-design-trust zone to the ls-product-design-untrust zone.
      [edit security policies from-zone ls-product-design-trust to-zone ls-product-design-untrust]lsdesignadmin1@host:ls-product-design# set policy permit-all-to-otherlsys match source-address product-designerslsdesignadmin1@host:ls-product-design# set policy permit-all-to-otherlsys match destination-address otherlsyslsdesignadmin1@host:ls-product-design# set policy permit-all-to-otherlsys match application anylsdesignadmin1@host:ls-product-design# set policy permit-all-to-otherlsys then permit
    3. Configure a security policy that permits traffic from the ls-product-design-untrust zone to the ls-product-design-trust zone.
      [edit security policies from-zone ls-product-design-untrust to-zone ls-product-design-trust]lsdesignadmin1@host:ls-product-design# set policy permit-all-from-otherlsys match source-address otherlsyslsdesignadmin1@host:ls-product-design# set policy permit-all-from-otherlsys match destination-address product-designerslsdesignadmin1@host:ls-product-design# set policy permit-all-from-otherlsys match application anylsdesignadmin1@host:ls-product-design# set policy permit-all-from-otherlsys then permit

    Results

    From configuration mode, confirm your configuration by entering the show security policies command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

    lsdesignadmin1@host:ls-product-design# show security policiesfrom-zone ls-product-design-trust to-zone ls-product-design-untrust {policy permit-all-to-otherlsys {match {source-address product-designers;destination-address otherlsys;application any;}then {permit;}}}from-zone ls-product-design-untrust to-zone ls-product-design-trust {policy permit-all-from-otherlsys {match {source-address otherlsys;destination-address product-designers;application any;}then {permit;}}}

    If you are done configuring the device, enter commit from configuration mode.

    Verification

    To confirm that the configuration is working properly, perform these tasks:

    Verifying Policy Configuration

    Purpose

    Verify information about policies and rules.

    Action

    From operational mode, enter the show security policies detail command to display a summary of all policies configured on the logical system.

    Published: 2012-06-29