This tutorial assumes
A Policy is a collection of rules and filters applied to packets to determine what actions are necessary for that packet. Think of a policy as a grouping of data that makes something happen.
Policies are assigned to roles, and any number of roles can be assigned to a host. You can think of roles as how you would like to group your hosts. All of your network nodes will eventually be put into one or more roles. Example role names might be something like: router, firewall, switch, web server, workstation, unix and linux. The net-policy policy distribution daemon (np-distd) will apply the appropriate rules, filters and actions to a host when it is assigned to a new role.
Now that we have some basic terminology, let's create a policy that will set SNMP trap notification destinations.
west
(must resolve to an address) as
the Client Name, and Click Next.
notification receiver
as the role
name and Click Next.
east
(must resolve to an address) as
the Client Name, and Click Next.
notification generator
as the role
name and Click Next.
send notifications
as the policy
name and Click Next.
inform
and SNMP version 2c
, and click
Next.
notification
.
Click Next.
notification generator
and click
Next.
notification generator
policy and click Next.
To send out the policies to the hosts, run the following commands. This will do a one-time run of the database. Further below, we'll tell you how to run these as daemons so that network policies will take effect immediately.
The np-datad script does background database processing. Run it as follows:
When that finishes, you'll then need to run np-distd to send your network configuration policy data out to your network nodes. Do this as follows:
When this finishes, all of your policies should be distributed to your hosts. Check to make sure everything went ok.
If you want the policy distribution agents to run continuously, run them as follows:
We all know that telnet is an insecure protocol, so lets create a policy that requires telnet traffic to be encrypted. In this example we will create a role, a policy, a preconfiured action, an ESP transform, keys, a rule and a filter. Make sure you have a fresh cup of your favorite caffeinated beverage (I'll wait), and then begin.
telnet server
role.
telnet server
and click Next.
west
to be a member of the
new role, and click Next.
west
and click Next.
telnet server
as the role name,
and click Next.
encrypt telnet
for the policy name,
and Click Next.
telnet server
role for the
policy, and Click Next.
Administrative name |
encrypt telnet |
Description |
start preconfigured action on telnet |
Priority |
100 |
Filter type |
IP Header Filter |
Action type |
Establish a Preconfigured-key IPsec connection |
Administrative name |
esp-sha-12hrs |
Description |
12 hour esp-sha SA |
SA Direction |
both |
SA encapsulation mode |
tunnel |
SA Peer Gateway |
None |
SA Direction |
both |
Maximum SA Lifetime |
43200 |
Choose an ESP transform to protect this SA |
Create New |
ESP SPI value |
2003 |
Administrative name |
3des-sha-12hrs |
Lifetime (seconds) |
43200 |
Authentication mode |
sha |
Encryption cipher |
Triple DES |
Create_New
for both keys and Click
Next.
Administrative name |
sha-key-one |
Administrative name |
3des-key-one |
Administrative name |
is telnet |
IP version |
ipV4 |
Filter on destination port range |
X |
Low Destination Port |
23 |
High Destination Port |
23 |
Filter on protocol |
X |
Protocol |
6 |
telnet server
role.
west
.
west
) and Click
Next.
telnet server
) and
Click Next.
Instead of setting up a preconfigured action, we could just let the hosts negotiate the details themselves. In this example, we will set up a policy to do just that.
This example assumes that the preconfigured action example has already been completed.
encrypt telnet
policy,
and Click Next.
Administrative name |
encrypt telnet via ike |
Description |
Negotiate IKE and establish phase II SA on telnet |
Priority |
42 |
Filter type |
IP Header Filter |
Action type |
Negotiate IKE and establish phase II SA |
Administrative name |
ike-ipsec |
Phase I action to use: |
Create New |
Phase II action to use: |
Create New |
Administrative name |
3des-md5-12hrs |
Select responder negotiation parameters |
min 1h; refresh 90%; can idle |
Peer |
None |
Proposal name |
Create_New |
Proposal priority |
10 |
Administrative name |
3des-md5-768-psk |
IKE CBC Cipher algorithm: |
Triple DES |
Cipher Key Length: |
24 |
IKE hash algorithm: |
MD5 |
IKE authentication method: |
pre-shared key |
IKE Diffie-Hellman group: |
768-bit MODP group |
Administrative name |
blowfish-md5-12hrs |
Select responder negotiation parameters |
min 1h; refresh 90%; can idle |
Encapsulation mode |
tunnel |
Ipsec Peer Gateway |
None |
Administrative name |
esp proposal |
Priority |
10 |
Protocol |
ESP |
Administrative name |
esp transform |
Priority |
10 |
Transform |
Create New |
Administrative name |
blowfish-md5-12hrs |
Lifetime (seconds) |
43200 |
Authentication mode |
MD5 |
Encryption cipher |
Blowfish |
IP filter to use: |
is telnet |