JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Administration: IP Services     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

Preface

Part I TCP/IP Administration

1.  Planning the Network Deployment

2.  Considerations When Using IPv6 Addresses

3.  Configuring an IPv4 Network

4.  Enabling IPv6 on the Network

5.  Administering a TCP/IP Network

6.  Configuring IP Tunnels

7.  Troubleshooting Network Problems

8.  IPv4 Reference

9.  IPv6 Reference

Part II DHCP

10.  About DHCP (Overview)

11.  Administering the ISC DHCP Service

12.  Configuring and Administering the DHCP Client

13.  DHCP Commands and Files (Reference)

Part III IP Security

14.  IP Security Architecture (Overview)

15.  Configuring IPsec (Tasks)

Protecting Traffic With IPsec

How to Secure Traffic Between Two Systems With IPsec

How to Use IPsec to Protect a Web Server From Nonweb Traffic

How to Display IPsec Policies

Protecting a VPN With IPsec

Examples of Protecting a VPN With IPsec by Using Tunnel Mode

Description of the Network Topology for the IPsec Tasks to Protect a VPN

How to Protect a VPN With IPsec in Tunnel Mode

Managing IPsec and IKE

How to Manually Create IPsec Keys

How to Configure a Role for Network Security

How to Manage IPsec and IKE Services

How to Verify That Packets Are Protected With IPsec

16.  IP Security Architecture (Reference)

17.  Internet Key Exchange (Overview)

18.  Configuring IKE (Tasks)

19.  Internet Key Exchange (Reference)

20.  IP Filter in Oracle Solaris (Overview)

21.  IP Filter (Tasks)

Part IV Networking Performance

22.  Integrated Load Balancer Overview

23.  Configuration of Integrated Load Balancer (Tasks)

24.  Virtual Router Redundancy Protocol (Overview)

25.  VRRP Configuration (Tasks)

26.  Implementing Congestion Control

Part V IP Quality of Service (IPQoS)

27.  Introducing IPQoS (Overview)

28.  Planning for an IPQoS-Enabled Network (Tasks)

29.  Creating the IPQoS Configuration File (Tasks)

30.  Starting and Maintaining IPQoS (Tasks)

31.  Using Flow Accounting and Statistics Gathering (Tasks)

32.  IPQoS in Detail (Reference)

Glossary

Index

Protecting Traffic With IPsec

This section provides procedures that enable you to secure traffic between two systems and to secure a web server. To protect a VPN, see Protecting a VPN With IPsec. For additional procedures to manage IPsec and to use SMF commands with IPsec and IKE, see Managing IPsec and IKE.

The following information applies to all IPsec configuration tasks:

The following task map points to procedures that set up IPsec between one or more systems. The ipsecconf(1M), ipseckey(1M), and ipadm(1M) man pages also describe useful procedures in their respective Examples sections.

Task
Description
For Instructions
Secure traffic between two systems.
Protects packets from one system to another system.
Secure a web server by using IPsec policy.
Requires non-web traffic to use IPsec. Web clients are identified by particular ports, which bypass IPsec checks.
Display IPsec policies.
Displays the IPsec policies that are currently being enforced, in the order of enforcement.
Use IKE to automatically create keying material for IPsec SAs.
Provides the raw data for security associations.
Set up a secure virtual private network (VPN).
Sets up IPsec between two systems across the Internet.

How to Secure Traffic Between Two Systems With IPsec

This procedure assumes the following setup:


Note - To use IPsec with labels on a Trusted Extensions system, see the extension of this procedure in How to Apply IPsec Protections in a Multilevel Trusted Extensions Network in Trusted Extensions Configuration and Administration.


Before You Begin

IPsec policy can be configured in the global zone or in an exclusive-IP stack zone. The policy for a shared-IP stack zone must be configured in the global zone. For an exclusive-IP zone, you configure IPsec policy in the non-global zone.

  1. Become an administrator.

    For more information, see How to Obtain Administrative Rights in Oracle Solaris Administration: Security Services. If you log in remotely, use the ssh command for a secure remote login. For an example, see Example 15-1.

  2. On each system, add host entries to the /etc/inet/hosts file.

    This step enables the Service Management Facility (SMF) to use the system names without depending on nonexistent naming services. For more information, see the smf(5) man page.

    1. On a system that is named partym, type the following in the hosts file:
      # Secure communication with enigma
      192.168.116.16 enigma
    2. On a system that is named enigma, type the following in the hosts file:
      # Secure communication with partym
      192.168.13.213 partym
  3. On each system, create the IPsec policy file.

    The file name is /etc/inet/ipsecinit.conf. For an example, see the /etc/inet/ipsecinit.sample file.

  4. Add an IPsec policy entry to the ipsecinit.conf file.
    1. On the enigma system, add the following policy:
      {laddr enigma raddr partym} ipsec {encr_algs aes encr_auth_algs sha512 sa shared}
    2. On the partym system, add the identical policy:
      {laddr partym raddr enigma} ipsec {encr_algs aes encr_auth_algs sha512 sa shared}

      For the syntax of IPsec policy entries, see the ipsecconf(1M) man page.

  5. On each system, configure IKE to add a pair of IPsec SAs between the two systems.

    Configure IKE by following one of the configuration procedures in Configuring IKE (Task Map). For the syntax of the IKE configuration file, see the ike.config(4) man page.


    Note - If you must generate and maintain your keys manually, see How to Manually Create IPsec Keys.


  6. Verify the syntax of the IPsec policy file.
    # ipsecconf -c -f /etc/inet/ipsecinit.conf

    Fix any errors, verify the syntax of the file, and continue.

  7. Refresh the IPsec policy.
    # svcadm refresh svc:/network/ipsec/policy:default

    IPsec policy is enabled by default, so you refresh it. If you have disabled IPsec policy, enable it.

    # svcadm enable svc:/network/ipsec/policy:default
  8. Activate the keys for IPsec.
    • If the ike service is not enabled, enable it.
      # svcadm enable svc:/network/ipsec/ike:default
    • If the ike service is enabled, restart it.
      # svcadm restart svc:/network/ipsec/ike:default

    If you manually configured keys in Step 5, complete How to Manually Create IPsec Keys to activate the keys.

  9. Verify that packets are being protected.

    For the procedure, see How to Verify That Packets Are Protected With IPsec.

Example 15-1 Adding IPsec Policy When Using an ssh Connection

In this example, the administrator in the root role configures IPsec policy and keys on two systems by using the ssh command to reach the second system. For more information, see the ssh(1) man page.

The next time the two systems communicate, including by using an ssh connection, the communication is protected by IPsec.

How to Use IPsec to Protect a Web Server From Nonweb Traffic

A secure web server allows web clients to talk to the web service. On a secure web server, traffic that is not web traffic must pass security checks. The following procedure includes bypasses for web traffic. In addition, this web server can make unsecured DNS client requests. All other traffic requires ESP with AES and SHA-2 algorithms.

Before You Begin

You must be in the global zone to configure IPsec policy. For an exclusive-IP zone, you configure IPsec policy in the non-global zone. You have completed How to Secure Traffic Between Two Systems With IPsec so that the following conditions are in effect:

  1. Become an administrator.

    For more information, see How to Obtain Administrative Rights in Oracle Solaris Administration: Security Services. If you log in remotely, use the ssh command for a secure remote login. For an example, see Example 15-1.

  2. Determine which services need to bypass security policy checks.

    For a web server, these services include TCP ports 80 (HTTP) and 443 (Secure HTTP). If the web server provides DNS name lookups, the server might also need to include port 53 for both TCP and UDP.

  3. Add the web server policy to the IPsec policy file.

    Add the following lines to the /etc/inet/ipsecinit.conf file:

    # Web traffic that web server should bypass.
    {lport  80 ulp tcp dir both} bypass {}
    {lport 443 ulp tcp dir both} bypass {}
    
    # Outbound DNS lookups should also be bypassed.
    {rport 53 dir both} bypass {}
    
    # Require all other traffic to use ESP with AES and SHA-2.
    # Use a unique SA for outbound traffic from the port
    {} ipsec {encr_algs aes encr_auth_algs sha512 sa shared}

    This configuration allows only secure traffic to access the system, with the bypass exceptions that are described in Step 2.

  4. Verify the syntax of the IPsec policy file.
    # ipsecconf -c -f /etc/inet/ipsecinit.conf
  5. Refresh the IPsec policy.
    # svcadm refresh svc:/network/ipsec/policy:default
  6. Refresh the keys for IPsec.

    Restart the ike service.

    # svcadm restart svc:/network/ipsec/ike

    If you manually configured the keys, follow the instructions in How to Manually Create IPsec Keys.

    Your setup is complete. Optionally, you can perform Step 7.

  7. (Optional) Enable a remote system to communicate with the web server for nonweb traffic.

    Add the following lines to a remote system's /etc/inet/ipsecinit.conf file:

    # Communicate with web server about nonweb stuff
    #
    {laddr webserver} ipsec {encr_algs aes encr_auth_algs sha512 sa shared}

    Verify the syntax then refresh the IPsec policy to activate it.

    remote-system # ipsecconf -c -f /etc/inet/ipsecinit.conf
    remote-system # svcadm refresh svc:/network/ipsec/policy:default

    A remote system can communicate securely with the web server for nonweb traffic only when the systems' IPsec policies match.

How to Display IPsec Policies

You can see the policies that are configured in the system when you issue the ipsecconf command without any arguments.

Before You Begin

You must run the ipsecconf command in the global zone. For an exclusive-IP zone, you run the ipsecconf command in the non-global zone.

  1. Assume a role that includes the Network IPsec Management profile.

    To create a discrete role for network security and assign that role to a user, see How to Configure a Role for Network Security.

  2. Display IPsec policies.
    • Display the global IPsec policy entries in the order that the entries were added.
      $ ipsecconf

      The command displays each entry with an index followed by a number.

    • Display the IPsec policy entries in the order in which a match occurs.
      $ ipsecconf -l -n
    • Display the IPsec policy entries, including per-tunnel entries, in the order in which a match occurs.
      $ ipsecconf -L -n