Iipsec
Iipsec
This chapter provides information about IPSec configuration on the Cisco LoRaWAN Gateway.
• Understanding IPSec, on page 1
• Configuring IPsec, on page 1
• Configuring Crypto IPSec Profile Common, on page 3
• Configuring Crypto IPSec Profile Individual , on page 5
• Basic Configuration for RSA to Connect to Primary and Secondary, on page 6
• Locking Traffic to IPSec Tunnels, on page 7
• Erasing IPSec Certificates and Key, on page 7
• Uploading Certificates from USB or Local Flash, on page 7
• Disabling LXC Restart During IPSec Reauthentication, on page 7
• Resetting Secure-Storage for Certificate Download, on page 7
Understanding IPSec
Internet Protocol Security (IPsec) is a protocol suite for securing Internet Protocol (IP) communications by
authenticating and encrypting each IP packet of a communication session. IPsec includes protocols for
establishing mutual authentication between agents at the beginning of the session and negotiation of
cryptographic keys to be used during the session. IPsec can be used in protecting data flows between a pair
of hosts (host-to-host), between a pair of security gateways (site-to-site), or between a security gateway and
a host (remote-access).
IPsec uses cryptographic security services to protect communications over Internet Protocol (IP) networks.
IPsec supports network-level peer authentication, data origin authentication, data integrity, data confidentiality
(encryption), and replay protection.
IPsec is an end-to-end security scheme operating in the Internet Layer of the Internet Protocol Suite, while
some other Internet security systems in widespread use, such as Transport Layer Security (TLS) and Secure
Shell (SSH), operate in the upper layers at Application layer. Hence, only IPsec protects any application
traffics over an IP network. Applications can be automatically secured by its IPsec at the IP layer. Without
IPsec, the protocols of TLS/SSL must be inserted under each of applications for protection.
Configuring IPsec
Beginning in privileged EXEC mode, follow these steps to configure IPsec on the Cisco LoRaWAN Gateway:
Configuring IPSec
1
Configuring IPSec
Configuring IPsec
Procedure
• Configure SCEP.
From Release 2.0.20, xpki is supported
as well as ndes.
• xpki - Use a Cisco Router as the CA
server
• ndes - Use a Window server as the
CA server
Example
Step 4 ipsec retry retry-count delay delay-time Configure number of IPsec retries and delay
time (minutes) before IPsec restarts when IPsec
is down:
• retry-count—Number of IPsec retries
when IPsec is down.
• delay-time—Minutes of delay before
restarting IPsec.
Configuring IPSec
2
Configuring IPSec
Configuring Crypto IPSec Profile Common
Step 6 ipsec subnet lock Lock the device traffic with IPsec subnet.
Traffic outside of the subnet will not be
accepted.
Step 9 show ipsec status {info|detail} (Optional) Display details about IPsec status.
Step 11 show ipsec log (Optional) Display the IPsec logs on the
screen.
Step 12 clear ipsec log (Optional) Clear the existing IPsec logs.
What to do next
Before PSK or PKI can be configured, you must configure the primary crypto ipsec profile at the minimum.
For more information, see Configuring Crypto IPSec Profile Common, on page 3 and Configuring Crypto
IPSec Profile Individual , on page 5.
Configuring IPSec
3
Configuring IPSec
Configuring Crypto IPSec Profile Common
Note The crypto ipsec profile common command can only configure attributes shared by tunnels for RSA only,
but not for PSK.
Beginning in privileged EXEC mode, follow these steps to configure crypto IPSec profile common on the
Cisco LoRaWAN Gateway:
Procedure
Step 2 crypto ipsec profile common Configure parameters used by all tunnels.
Step 6 exit Exit the crypto ipsec profile common block and
updates the IPSec configuration.
Step 8 copy running-config startup-config (Optional) Save your entries in the configuration
file.
Example
Example of Common Profile Block
Configuring IPSec
4
Configuring IPSec
Configuring Crypto IPSec Profile Individual
leftca cn=LASSI-ROOT-CA,dc=LASSI,dc=example,dc=com
Note Adding the subnet parameter enforces a subnet-only tunnel. Any packets within that subnet will travel through
the tunnel and any packets outside of that subnet will not travel within the tunnel. If all packets need to go
through the tunnel, do not configure any subnet. This will establish a host-only tunnel.
Note Primary configurations will override secondary configurations, so if no subnet is configured in primary (default,
host-only tunnel) and subnet is configured in the secondary tunnel, then packets will not be able to go through
the secondary tunnel.
Beginning in privileged EXEC mode, follow these steps to configure crypto IPSec profile individual on the
Cisco LoRaWAN Gateway:
Procedure
Step 2 crypto ipsec profile {primary|secondary} Configure parameters used by individual tunnel.
Step 3 ipaddr <ip-address> iketime <ike-lifetime> Configures the required parameters of the
keytime <key-life> aes <ike-encryption> tunnel.
• ip-address - IP address or hostname of the
IPSec server.
• ike-lifetime - Lifetime of ISAKMP or IKE
SA in seconds.
• key-life - Lifetime of one tunnel connection
instance in seconds.
• ike-encryption – Encryption method of ike
directive in strongSwan; 128 or 256 for
aes128-sha256-ecp256 or
aes256-sha256-ecp256 by default.
Configuring IPSec
5
Configuring IPSec
Basic Configuration for RSA to Connect to Primary and Secondary
Step 8 copy running-config startup-config (Optional) Save your entries in the configuration
file.
Example
Examples of Primary and Secondary Profile blocks:
Configuring IPSec
6
Configuring IPSec
Locking Traffic to IPSec Tunnels
Configuring IPSec
7
Configuring IPSec
Resetting Secure-Storage for Certificate Download
Configuring IPSec
8