NetDefendOS 2-60-02 Firewall UserManual
NetDefendOS 2-60-02 Firewall UserManual
User Manual
NetDefendOS
Ver. 2.60.02
Security
Security
Network Security Solution
http://www.dlink.com
User Manual
DFL-260E/860E/1660/2560/2560G
NetDefendOS Version 2.60.02
D-Link Corporation
No. 289, Sinhu 3rd Rd, Neihu District, Taipei City 114, Taiwan R.O.C.
http://www.DLink.com
Published 2014-06-03
Copyright 2014
User Manual
DFL-260E/860E/1660/2560/2560G
NetDefendOS Version 2.60.02
Published 2014-06-03
Copyright 2014
Copyright Notice
This publication, including all photographs, illustrations and software, is protected under
international copyright laws, with all rights reserved. Neither this manual, nor any of the material
contained herein, may be reproduced without the written consent of D-Link.
Disclaimer
The information in this document is subject to change without notice. D-Link makes no
representations or warranties with respect to the contents hereof and specifically disclaims any
implied warranties of merchantability or fitness for a particular purpose. D-Link reserves the right
to revise this publication and to make changes from time to time in the content hereof without
any obligation to notify any person or parties of such revision or changes.
Limitations of Liability
UNDER NO CIRCUMSTANCES SHALL D-LINK OR ITS SUPPLIERS BE LIABLE FOR DAMAGES OF ANY
CHARACTER (E.G. DAMAGES FOR LOSS OF PROFIT, SOFTWARE RESTORATION, WORK STOPPAGE,
LOSS OF SAVED DATA OR ANY OTHER COMMERCIAL DAMAGES OR LOSSES) RESULTING FROM
THE APPLICATION OR IMPROPER USE OF THE D-LINK PRODUCT OR FAILURE OF THE PRODUCT,
EVEN IF D-LINK IS INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. FURTHERMORE, D-LINK
WILL NOT BE LIABLE FOR THIRD-PARTY CLAIMS AGAINST CUSTOMER FOR LOSSES OR DAMAGES.
D-LINK WILL IN NO EVENT BE LIABLE FOR ANY DAMAGES IN EXCESS OF THE AMOUNT D-LINK
RECEIVED FROM THE END-USER FOR THE PRODUCT.
Table of Contents
Preface ............................................................................................................... 15
1. NetDefendOS Overview ..................................................................................... 18
1.1. Features ............................................................................................... 18
1.2. NetDefendOS Architecture ...................................................................... 22
1.2.1. State-based Architecture .............................................................. 22
1.2.2. NetDefendOS Building Blocks ........................................................ 22
1.2.3. Basic Packet Flow ......................................................................... 23
1.3. NetDefendOS State Engine Packet Flow ..................................................... 26
2. Management and Maintenance .......................................................................... 31
2.1. Managing NetDefendOS ......................................................................... 31
2.1.1. Overview .................................................................................... 31
2.1.2. The Default Administrator Account ................................................ 32
2.1.3. The Web Interface ........................................................................ 33
2.1.4. The CLI ....................................................................................... 38
2.1.5. CLI Scripts ................................................................................... 48
2.1.6. Secure Copy ................................................................................ 53
2.1.7. The Console Boot Menu ................................................................ 55
2.1.8. Changing Management Access ...................................................... 56
2.1.9. Management Advanced Settings ................................................... 61
2.1.10. Working with Configurations ....................................................... 62
2.2. Events and Logging ................................................................................ 69
2.2.1. Overview .................................................................................... 69
2.2.2. Log Messages ............................................................................. 69
2.2.3. Log Receiver Types ...................................................................... 70
2.2.4. Logging to the MemoryLogReceiver (Memlog) ................................. 70
2.2.5. Logging to Syslog Hosts ............................................................... 71
2.2.6. Severity Filter and Message Exceptions ........................................... 73
2.2.7. SNMP Traps ................................................................................ 74
2.2.8. Advanced Log Settings ................................................................. 75
2.3. RADIUS Accounting ................................................................................ 77
2.3.1. Overview .................................................................................... 77
2.3.2. RADIUS Accounting Messages ....................................................... 77
2.3.3. Interim Accounting Messages ........................................................ 79
2.3.4. Configuring RADIUS Accounting .................................................... 79
2.3.5. RADIUS Accounting Security ......................................................... 81
2.3.6. RADIUS Accounting and High Availability ........................................ 81
2.3.7. Handling Unresponsive RADIUS Servers .......................................... 81
2.3.8. Accounting and System Shutdowns ............................................... 82
2.3.9. Limitations with NAT .................................................................... 82
2.3.10. Advanced RADIUS Settings .......................................................... 82
2.4. Monitoring ............................................................................................ 84
2.4.1. The Link Monitor ......................................................................... 84
2.4.2. SNMP Monitoring ........................................................................ 87
2.4.3. Hardware Monitoring ................................................................... 90
2.4.4. Memory Monitoring Settings ......................................................... 92
2.5. The pcapdump Command ....................................................................... 94
2.6. Maintenance ......................................................................................... 97
2.6.1. Auto-Update Mechanism .............................................................. 97
2.6.2. Backing Up Configurations ............................................................ 97
2.6.3. Restore to Factory Defaults ............................................................ 99
3. Fundamentals ................................................................................................ 103
3.1. The Address Book ................................................................................ 103
3.1.1. Overview .................................................................................. 103
3.1.2. IP Addresses ............................................................................. 104
3.1.3. Ethernet Addresses .................................................................... 106
3.1.4. Address Groups ......................................................................... 106
4
User Manual
User Manual
User Manual
User Manual
User Manual
List of Figures
1.1. Packet Flow Schematic Part I ............................................................................ 26
1.2. Packet Flow Schematic Part II ........................................................................... 27
1.3. Packet Flow Schematic Part III .......................................................................... 28
1.4. Expanded Apply Rules Logic ............................................................................. 29
3.1. VLAN Connections ....................................................................................... 138
3.2. An ARP Publish Ethernet Frame ...................................................................... 152
3.3. Simplified NetDefendOS Traffic Flow ............................................................... 161
4.1. A Typical Routing Scenario ............................................................................ 206
4.2. Using Local IP Address with an Unbound Network .............................................. 208
4.3. A Route Failover Scenario for ISP Access .......................................................... 215
4.4. A Proxy ARP Example .................................................................................... 222
4.5. The RLB Round Robin Algorithm ..................................................................... 232
4.6. The RLB Spillover Algorithm ........................................................................... 233
4.7. A Route Load Balancing Scenario .................................................................... 235
4.8. A Simple OSPF Scenario ................................................................................ 239
4.9. OSPF Providing Route Redundancy ................................................................. 240
4.10. Virtual Links Connecting Areas ..................................................................... 244
4.11. Virtual Links with Partitioned Backbone ......................................................... 245
4.12. NetDefendOS OSPF Objects ......................................................................... 246
4.13. Dynamic Routing Rule Objects ..................................................................... 254
4.14. An OSPF Example ....................................................................................... 260
4.15. Multicast Forwarding - No Address Translation ................................................ 270
4.16. Multicast Forwarding - Address Translation .................................................... 272
4.17. Multicast Snoop Mode ................................................................................ 274
4.18. Multicast Proxy Mode .................................................................................. 275
4.19. Tunneling Multicast using GRE ..................................................................... 282
4.20. Non-transparent Mode Internet Access .......................................................... 290
4.21. Transparent Mode Internet Access ................................................................ 291
4.22. Transparent Mode Scenario 1 ....................................................................... 292
4.23. Transparent Mode Scenario 2 ....................................................................... 294
4.24. An Example BPDU Relaying Scenario ............................................................. 298
5.1. DHCP Server Objects .................................................................................... 306
6.1. Deploying an ALG ........................................................................................ 320
6.2. HTTP ALG Processing Order ........................................................................... 324
6.3. FTP ALG Hybrid Mode ................................................................................... 326
6.4. SMTP ALG Processing Order ........................................................................... 338
6.5. Anti-Spam Filtering ...................................................................................... 340
6.6. PPTP ALG Usage ........................................................................................... 347
6.7. TLS Termination ........................................................................................... 376
6.8. Dynamic Web Content Filtering Flow .............................................................. 385
6.9. Anti-Virus Malicious File Message ................................................................... 399
6.10. Anti-Virus Malicious URL Message ................................................................. 399
6.11. IDP Database Updating ............................................................................... 407
6.12. IDP Signature Selection ............................................................................... 408
7.1. NAT IP Address Translation ............................................................................ 429
7.2. A NAT Example ............................................................................................ 431
7.3. Anonymizing with NAT ................................................................................. 434
7.4. SAT Address Translation ................................................................................ 445
8.1. Normal LDAP Authentication ......................................................................... 471
8.2. LDAP for PPP with CHAP, MS-CHAPv1 or MS-CHAPv2 ......................................... 472
8.3. User Identity Awareness ................................................................................ 483
8.4. The Identity Awareness Agent Interface ........................................................... 487
9.1. The AH protocol ........................................................................................... 516
9.2. The ESP protocol .......................................................................................... 517
9.3. PPTP Client Usage ........................................................................................ 554
9.4. An L2TPv3 Example ...................................................................................... 556
10
User Manual
11
List of Examples
1. Example Notation ............................................................................................. 15
2.1. Remote Management via HTTPS with CA Signed Certificates ................................. 37
2.2. Enabling SSH Remote Access ........................................................................... 44
2.3. Changing the Management Validation Timeout .................................................. 58
2.4. Changing the Management Interface IP Address ................................................. 59
2.5. Changing a Remote Access Rule ....................................................................... 59
2.6. Changing the HA Management IP Address ......................................................... 60
2.7. Enabling Remote Management via HTTPS .......................................................... 61
2.8. Listing Configuration Objects ........................................................................... 63
2.9. Displaying a Configuration Object .................................................................... 63
2.10. Editing a Configuration Object ....................................................................... 64
2.11. Adding a Configuration Object ....................................................................... 65
2.12. Deleting a Configuration Object ..................................................................... 66
2.13. Undeleting a Configuration Object .................................................................. 66
2.14. Listing Modified Configuration Objects ............................................................ 66
2.15. Activating and Committing a Configuration ..................................................... 67
2.16. Enable Logging to a Syslog Host ..................................................................... 72
2.17. Enabling Syslog RFC 5424 Compliance with Hostname ....................................... 73
2.18. Sending SNMP Traps to an SNMP Trap Receiver ................................................. 75
2.19. RADIUS Accounting Server Setup .................................................................... 80
2.20. Link Monitor Setup ....................................................................................... 86
2.21. Enabling SNMP Monitoring ............................................................................ 88
2.22. Performing a Complete System Backup ........................................................... 99
2.23. Complete Hardware Reset to Factory Defaults ................................................ 100
3.1. Adding an IP Host Address ............................................................................. 104
3.2. Adding an IP Network ................................................................................... 105
3.3. Adding an IP Range ...................................................................................... 105
3.4. Deleting an Address Object ........................................................................... 105
3.5. Adding an Ethernet Address .......................................................................... 106
3.6. Adding IPv6 Host Addresses .......................................................................... 109
3.7. Enabling IPv6 Globally .................................................................................. 110
3.8. Enabling IPv6 on an Interface ......................................................................... 111
3.9. Enabling IPv6 Advertisements ........................................................................ 111
3.10. Adding an IPv6 Route and Enabling Proxy ND ................................................. 113
3.11. Listing the Available Services ........................................................................ 118
3.12. Viewing a Specific Service ............................................................................ 119
3.13. Creating a Custom TCP/UDP Service .............................................................. 122
3.14. Adding an IP Protocol Service ....................................................................... 124
3.15. Defining a VLAN ......................................................................................... 139
3.16. Configuring a PPPoE Client .......................................................................... 142
3.17. Creating an Interface Group ......................................................................... 147
3.18. Displaying the ARP Cache ............................................................................ 149
3.19. Flushing the ARP Cache ............................................................................... 149
3.20. Defining an ARP/Neighbor Discovery Object ................................................... 152
3.21. Adding an Allow IP Rule ............................................................................... 164
3.22. Setting up a Policy to Allow Connections to a DMZ .......................................... 170
3.23. Setting up a SAT Policy to an Internal Web Server ............................................ 171
3.24. Specifying an Application Control Policy ........................................................ 173
3.25. Using an Application Control Rule Set ............................................................ 174
3.26. Setting up a Time-Scheduled Security Policy ................................................... 181
3.27. Uploading a Certificate with Web Interface ..................................................... 186
3.28. Associating Certificates with IPsec Tunnels ..................................................... 187
3.29. Setting the Current Date and Time ................................................................ 189
3.30. Setting the Time Zone ................................................................................. 190
3.31. Enabling DST ............................................................................................. 190
3.32. Enabling Time Synchronization using SNTP .................................................... 192
12
User Manual
User Manual
14
Preface
Intended Audience
The target audience for this reference guide is Administrators who are responsible for
configuring and managing NetDefend Firewalls which are running the NetDefendOS operating
system. This guide assumes that the reader has some basic knowledge of networks and network
security.
Screenshots
This guide contains a minimum of screenshots. This is deliberate and is done because the manual
deals specifically with NetDefendOS and administrators have a choice of management user
interfaces. It was decided that the manual would be less cluttered and easier to read if it
concentrated on describing how NetDefendOS functions rather than including large numbers of
screenshots showing how the various interfaces are used. Examples are given but these are
largely textual descriptions of management interface usage.
Examples
Examples in the text are denoted by the header Example and appear with a gray background as
shown below. They contain a CLI example and/or a Web Interface example as appropriate. (The
NetDefendOS CLI Reference Guide documents all CLI commands.)
Example 1. Example Notation
Information about what the example is trying to achieve is found here, sometimes with an
explanatory image.
Command-Line Interface
The Command Line Interface example would appear here. It would start with the command
prompt followed by the command:
gw-world:/> somecommand someparameter=somevalue
15
Preface
Web Interface
The Web Interface actions for the example are shown here. They are also typically a numbered
list showing what items need to be opened followed by information about the data items that
need to be entered:
1.
2.
Now enter:
DataItem1: datavalue1
DataItem2: datavalue2
Highlighted Content
Sections of text which the reader should pay special attention to are indicated by icons on the
left hand side of the page followed by a short paragraph in italicized text. Such sections are of
the following types with the following purposes:
Note
This indicates some piece of information that is an addition to the preceding text. It may
concern something that is being emphasized, or something that is not obvious or
explicitly stated in the preceding text.
Tip
This indicates a piece of non-critical information that is useful to know in certain
situations but is not essential reading.
Caution
This indicates where the reader should be careful with their actions as an undesirable
situation may result if care is not exercised.
Important
This is an essential point that the reader should read and understand.
Warning
This is essential reading for the user as they should be aware that a serious situation
may result if certain actions are taken or not taken.
Trademarks
16
Preface
Certain names in this publication are the trademarks of their respective owners.
Windows, Windows XP, Windows Vista and Windows 7 are either registered trademarks or
trademarks of Microsoft Corporation in the United States and/or other countries.
17
1.1. Features
D-Link NetDefendOS is the base software engine that drives and controls the range of NetDefend
Firewall hardware products.
NetDefendOS Objects
From the administrator's perspective the conceptual approach of NetDefendOS is to visualize
operations through a set of logical building blocks or objects. These objects allow the
configuration of NetDefendOS in an almost limitless number of different ways. This granular
control allows the administrator to meet the requirements of the most demanding network
security scenarios.
Key Features
NetDefendOS has an extensive feature set. The list below presents the key features of the
product:
IP Routing
18
Address Translation
VPN
TLS Termination
Application Control
Anti-Virus Scanning
Note
Full IDP is available on all D-Link NetDefend
product models as a subscription service. On
some models, a simplified IDP subsystem is
provided as standard.
Traffic Management
Note
Threshold Rules are only available on certain
D-Link NetDefend product models.
ZoneDefense
Note
NetDefendOS ZoneDefense is only available on
certain D-Link NetDefend product models and is
discussed further in Chapter 12, ZoneDefense.
20
IPv6
NetDefendOS Documentation
Reading through the available documentation carefully will ensure getting the most out of the
NetDefendOS product. In addition to this document, the reader should also be aware of the
companion reference guides:
The CLI Reference Guide which details all NetDefendOS CLI commands.
The NetDefendOS Log Reference Guide which details all NetDefendOS log event messages.
Together, these documents form the essential reference material for NetDefendOS operation.
21
Stateful Inspection
NetDefendOS employs a technique called stateful inspection which means that it inspects and
forwards traffic on a per-connection basis. NetDefendOS detects when a new connection is
being established, and keeps a small piece of information or state in its state table for the lifetime
of that connection. By doing this, NetDefendOS is able to understand the context of the network
traffic which enables it to perform in-depth traffic scanning, apply bandwidth management and
a variety of other functions.
The stateful inspection approach additionally provides high throughput performance with the
added advantage of a design that is highly scalable. The NetDefendOS subsystem that
implements stateful inspection will sometimes be referred to in documentation as the
NetDefendOS state-engine.
Interfaces
Interfaces are the doorways through which network traffic enters or leaves the NetDefend
Firewall. Without interfaces, a NetDefendOS system has no means for receiving or sending traffic.
The following types of interface are supported in NetDefendOS:
Tunnel interfaces - Used for receiving and sending traffic through VPN tunnels.
Interface Symmetry
The NetDefendOS interface design is symmetric, meaning that the interfaces of the device are
not fixed as being on the "insecure outside" or "secure inside" of a network topology. The notion
of what is inside and outside is totally for the administrator to define.
Logical Objects
Logical objects can be seen as predefined building blocks for use by the rule sets. The address
book, for instance, contains named objects representing host and network addresses.
22
Another example of logical objects are services which represent specific protocol and port
combinations. Also important are the Application Layer Gateway (ALG) objects which are used to
define additional parameters on specific protocols such as HTTP, FTP, SMTP and H.323.
An Ethernet frame is received on one of the Ethernet interfaces in the system. Basic Ethernet
frame validation is performed and the packet is dropped if the frame is invalid.
2.
The packet is associated with a Source Interface. The source interface is determined as
follows:
If the Ethernet frame contains a VLAN ID (Virtual LAN identifier), the system checks for a
configured VLAN interface with a corresponding VLAN ID. If one is found, that VLAN
interface becomes the source interface for the packet. If no matching interface is found,
the packet is dropped and the event is logged.
If the Ethernet frame contains a PPP payload, the system checks for a matching PPPoE
interface. If one is found, that interface becomes the source interface for the packet. If no
matching interface is found, the packet is dropped and the event is logged.
If none the above is true, the receiving Ethernet interface becomes the source interface
for the packet.
3.
The IP datagram within the packet is passed on to the NetDefendOS Consistency Checker.
The consistency checker performs a number of sanity checks on the packet, including
validation of checksums, protocol flags, packet length and so on. If the consistency checks
fail, the packet gets dropped and the event is logged.
4.
NetDefendOS now tries to lookup an existing connection by matching parameters from the
incoming packet. A number of parameters are used in the match attempt, including the
source interface, source and destination IP addresses and IP protocol.
If a match cannot be found, a connection establishment process starts which includes steps
from here to 9 below. If a match is found, the forwarding process continues at step 10
below.
5.
The Access Rules are evaluated to find out if the source IP address of the new connection is
allowed on the received interface. If no Access Rule matches then a reverse route lookup will
be done in the routing tables.
In other words, by default, an interface will only accept source IP addresses that belong to
networks routed over that interface. A reverse lookup means that we look in the routing
tables to confirm that there is a route with this network as the destination on the same
interface.
23
If the Access Rule lookup or the reverse route lookup determine that the source IP is invalid,
then the packet is dropped and the event is logged.
6.
A route lookup is being made using the appropriate routing table. The destination interface
for the connection has now been determined.
7.
The IP rules are now searched for a rule that matches the packet. The following parameters
are part of the matching process:
TCP/UDP ports
ICMP types
8.
The Intrusion Detection and Prevention (IDP) Rules are now evaluated in a similar way to the
IP rules. If a match is found, the IDP data is recorded with the state. By doing this,
NetDefendOS will know that IDP scanning is supposed to be conducted on all packets
belonging to this connection.
9.
The Traffic Shaping and the Threshold Limit rule sets are now searched. If a match is found,
the corresponding information is recorded with the state. This will enable proper traffic
management on the connection.
10. From the information in the state, NetDefendOS now knows what to do with the incoming
packet:
If the contents of the packet is encapsulated (such as with IPsec, PPTP/L2TP or some
other type of tunneled protocol), then the interface lists are checked for a matching
interface. If one is found, the packet is decapsulated and the payload (the plaintext) is
sent into NetDefendOS again, now with source interface being the matched tunnel
interface. In other words, the process continues at step 3 above.
If traffic management information is present, the packet might get queued or otherwise
be subjected to actions related to traffic management.
11. Eventually, the packet will be forwarded out on the destination interface according to the
state. If the destination interface is a tunnel interface or a physical sub-interface, additional
processing such as encryption or encapsulation might occur.
The next section provides a set of diagrams illustrating the flow of packets through
NetDefendOS.
25
26
27
28
Apply Rules
The figure below presents the detailed logic of the Apply Rules function in Figure 1.2, Packet Flow
Schematic Part II above.
29
30
Management Interfaces
NetDefendOS provides the following management interfaces:
The Web Interface
The Web Interface (also known as the Web User Interface or WebUI) is
built into NetDefendOS and provides a user-friendly and intuitive
graphical management interface, accessible from a standard web
browser.
The browser connects to one of the hardware's Ethernet interfaces
31
The Command Line Interface (CLI), accessible locally via serial console
port or remotely using the Secure Shell (SSH) protocol, provides the
most fine-grained control over all parameters in NetDefendOS.
This feature is fully described in Section 2.1.4, The CLI.
Secure Copy
Important
For security reasons, it is recommended to change the default password of the default
account as soon as possible after connecting with the NetDefend Firewall.
32
On the NetDefend DFL-210, 260, 800, 860, 1600 and 2500, the default management interface
IP address is 192.168.1.1.
On the NetDefend DFL-260E, 860E, 1660, 2560 and 2560G, the default management interface
IP address is 192.168.10.1.
Changing the management interface and/or IP address from the default is described in
Section 2.1.8, Changing Management Access.
DFL-210/260/800/860/1600/2500
DFL-260E/860E/1660/2560/2560G
IP Address: 192.168.1.30
IP Address: 192.168.10.30
DFL-260E/860E/1660/2560/2560G
IP Address: 192.168.1.1
IP Address: 192.168.10.1
When performing initial connection to NetDefendOS, the administrator must use https:// as the
URL protocol in the browser (in other words, https://192.168.1.1 or https://192.168.10.1
according to model ). Using HTTPS ensures that communication with NetDefendOS is secure.
If communication with the NetDefendOS is successfully established, a user authentication dialog
similar to the one shown below will then be shown in the browser window.
Enter the username and password and click the Login button. The factory default username and
password is admin and admin . If the user credentials are correct, you will be transferred to the
main Web Interface page.
34
Multi-language Support
The Web Interface login dialog offers the option to select a language other than English for the
interface. Language support is provided by a set of separate resource files. These files can be
downloaded from the D-Link website.
It may occasionally be the case that a NetDefendOS upgrade can contain features that
temporarily lack a complete non-English translation because of time constraints. In this case the
original English will be used as a temporary solution in place of a translation to the selected
language.
For information about the default user name and password, see Section 2.1.2, The Default
Administrator Account .
35
Interface Layout
The main Web Interface page is divided into three major sections:
A. Menu bar
The menu bar located at the top of the Web Interface contains a series of
buttons for accessing different aspects of the configuration.
B. Object Navigator
C. Main Window
36
Web Interface
1.
Go to: System > Device > Remote Management > Advanced Settings
2.
Under WebUI enter the HTTPS Certificate and the Remote Management certificates.
3.
Click OK
These same CA signed certificates are also used by the NetDefendOS SSL VPN feature when a
user is connecting for the first time and a dialog of options is displayed.
37
set - Sets some property of an object to a value. For example, this might be used to set the
source interface on an IP rule.
show - Displays the current categories or display the values of a particular object.
For example, to display an IP address object called my_address, the command would be:
gw-world:/> show Address IP4Address my_address
The object category in this case is Address and the type within this category is IPAddress.
When typing commands, the object category can be left out where the command's meaning is
38
unambiguous. For example, the show command above could have been entered as:
gw-world:/> show IPAddress my_address
However, tab completion will always assume the category is included. For example, tab
completion would not be able to help complete the above command if the tab is pressed during
or after the IPAddress object type.
The same object name could be used within two different categories or types although this is
best avoided in order to avoid ambiguity when reading configurations.
A command like add can also include object properties. To add a new IP4Address object with an IP
address of 10.49.02.01, the command would be:
gw-world:/> add IP4Address my_address Address=10.49.02.01
The object type can be optionally preceded by the object category. A category groups together a
set of types and mainly used with tab completion which is described below.
Tab Completion
Remembering all the commands and their options can be difficult. NetDefendOS provides a
feature called tab completion which means that pressing the tab key will cause automatically
completion of the current part of the command. If completion is not possible then pressing the
tab key will alternatively display the possible command options that are available.
39
For example, when creating an IP rule for a particular IP rule set, the command line might begin:
gw-world:/> add IPRule
If the tab key is now pressed, the mandatory parameters are displayed by NetDefendOS:
A value is required for the following properties:
Action
DestinationInterface
DestinationNetwork
Service
SourceInterface
SourceNetwork
The Name parameter is not in this list since it is not mandatory because rules can be referenced
with their index number. Similarly, the following might be entered:
gw-world:/> add IPRule Na
If the tab key is now pressed, the letters Na will not be completed to be Name= because Name is
optional and all the mandatory parameters must be entered before tab completion works for
optional parameters.
If the tab key is now pressed, the letters Na will now be completed to be Name= because all the
mandatory parameters have already been entered.
40
This severity list can then be edited with the back arrow and backspace keys. A default value is
not always available. For example, the Action of an IP rule has no default.
This same sequence can be used to get the current property value in a Set command. For
example:
gw-world:/> set LogReceiver LogReceiverSyslog log_example Address=.<tab>
This will display the current value for the Address property.
If a period "." followed by a tab is now entered, NetDefendOS displays the current value for
Address. If that value were the IPv4 list 10.6.58.10,192.168.2.1 then the unfinished command line
will automatically become:
gw-world:/> set Address IPAddress If1_ip Address=10.6.58.10,192.168.2.1
The displayed values can then be added to or changed with the backspace and back arrow keys
before completing the command.
Object Categories
It has been mentioned that objects are grouped by type, such as IP4Address. Types themselves
are grouped by category. The type IP4Address belongs to the category Address. The main use of
categories is in tab completion when searching for the right object type to use.
If a command such as add is entered and then the tab key is pressed, NetDefendOS displays all
the available categories. By choosing a category and then pressing tab again all the object types
for that category is displayed. Using categories means that the user has a simple way to specify
what kind of object they are trying to specify and a manageable number of options are displayed
after pressing tab.
Not all object types belong in a category. The object type UserAuthRule is a type without a
category and will appear in the category list after pressing tab at the beginning of a command.
The category is sometimes also referred to as the CLI context. The category does not have to be
entered for the command to be valid but always appears when using tab completion. As
discussed later, when commands are created automatically using CLI scripting, NetDefendOS
omits the category in the commands it creates.
41
Notice that the command prompt changes to indicate the current category. The route can now
be added:
gw-world:/main> add Route Name=new_route1 Interface=lan Network=If1_net
The categories that require an initial cc command before object manipulation have a "/"
character following their names when displayed by a show command. For example:
RoutingTable/ .
Referencing by Name
The naming of some objects is optional and is done with the Name= parameter in an add
command. An object, such as a threshold rule, will always have an Index value which indicates its
position in the rule list but can optionally be allocated a name as well. Subsequent manipulation
of such a rule can be done either by referring to it by its index, that is to say its list position, or by
alternatively using the name assigned to it.
The CLI Reference Guide lists the parameter options available for each NetDefendOS object,
including the Name= and Index= options.
names, however it is strongly recommended to avoid this. If a duplicate IP rule name is used in
two IP rules then only the Index value can uniquely identify each IP rule in subsequent CLI
commands. Referencing an IP rule with a duplicated name will fail and result in an error message.
When DNS lookup needs to be done, at least one public DNS server must be configured in
NetDefendOS for hostnames to be translated to IP addresses.
A terminal or a computer with a serial port and the ability to emulate a terminal (such as
using the Hyper Terminal software included in some Microsoft Windows editions). The serial
console port uses the following default settings: 9600 bps, No parity, 8 data bits and 1 stop bit.
2.
Connect one of the connectors of the RS-232 cable directly to the console port on the
NetDefend Firewall system.
3.
Connect the other end of the cable to the terminal or the serial connector of the computer
running the communications software.
4.
Press the enter key on the terminal. The NetDefendOS login prompt should appear on the
terminal screen.
43
NetDefendOS supports version 1, 1.5 and 2 of the SSH protocol. SSH access is regulated by the
remote management policy in NetDefendOS, and is disabled by default.
Example 2.2. Enabling SSH Remote Access
This example shows how to enable remote SSH access from the lannet network through the lan
interface by adding a rule to the remote management policy.
Command-Line Interface
gw-world:/> add RemoteManagement RemoteMgmtSSH ssh
Network=lannet
Interface=lan
LocalUserDatabase=AdminUsers
Web Interface
1.
Go to: System > Device > Remote Management > Add > Secure Shell Management
2.
Enter a Name for the SSH remote management policy, for example ssh_policy
3.
4.
Interface: lan
Network: lannet
Click OK
If a welcome message has been set then it will be displayed directly after the logon. For security
reasons, it is advisable to either disable or anonymize the CLI welcome message.
44
First we must change the current category to be the LocalUserDatabase called AdminUsers (which
exists by default):
gw-world:/> cc LocalUserDatabase AdminUsers
We are now in AdminUsers and can change the password of the admin user:
gw-world:/AdminUsers> set User admin Password="my-password"
where Device is the model number of the NetDefend Firewall. This can be customized, for
example, to my-prompt:/>, by using the CLI command:
gw-world:/> set device name="my-prompt"
The CLI Reference Guide uses the command prompt gw-world:/> throughout.
45
Most of the examples in this guide deal with editing a NetDefendOS configuration. The
final activation step is usually not explicitly stated.
If the commit command is not entered after a activate command within a given time period (the
default is 30 seconds) then the changes are automatically undone and the old configuration
restored. This topic is discussed further in Section 2.1.8, Changing Management Access.
This command performs a graceful shutdown of all connections and VPN tunnels before the
restart and is sufficient for most situations that require a system restart. In includes a reloading of
the configuration (in other words, a reconfiguration operation).
To shut down and restart both NetDefendOS and completely reinitialize the hardware, including
the NetDefendOS loader (equivalent to switching the hardware off then on), use the command:
gw-world:/> shutdown -reboot
The -reboot option is rarely needed in normal circumstances and because it requires more time
for the restart it is best not to use it. When NetDefendOS is upgraded the -reboot option is
executed automatically during the upgrade process.
The same restart functions can be performed with the Web Interface by selecting the option
Status > Maintenance > Reset & Restore > Restart.
Apart from reloading the configuration, many of NetDefendOS's internal data structures related
to rules and traffic processing are reinitialized. It is not usual to execute a reconfigure during
normal operation but it can sometimes be a way to solve transient problems related to
NetDefendOS memory management.
Unlike the system restart described above, a reconfiguration does not usually affect current
connections or VPN tunnels. However, with some IPsec tunnel changes, a reconfiguration will
mean the tunnels are lost and have to be re-established because the tunnel SAs are no longer
valid.
46
After changing a NetDefendOS configuration and before issuing the activate and commit
commands, it is possible to explicitly check for any problems in a configuration using the
command:
gw-world:/> show -errors
This will cause NetDefendOS to scan the configuration about to be activated and list any
problems. A possible problem that might be found in this way is a reference to an IP object in the
address book that does not exist in a restored configuration backup.
The network IP address for the interface must also be set to the appropriate value:
gw-world:/> set Address IP4Address InterfaceAddresses/If2_net
Address=10.8.1.0/24
In this example, local IP addresses are used for illustration but these could be public IPv4
addresses instead. It is also assumed that the default address objects for the configuration are
stored in an address book folder called InterfaceAddresses.
Next, create a remote HTTP management access object, in this example called HTTP_If2:
gw-world:/> add RemoteManagement RemoteMgmtHTTP HTTP_If2
Interface=If2
Network=all-nets
LocalUserDatabase=AdminUsers
AccessLevel=Admin
HTTP=Yes
If we now activate and commit the new configuration, remote management access via the IPv4
address 10.8.1.34 is now possible using a web browser. If SSH management access is required
then a RemoteMgmtSSH object should be added.
The assumption made with the above commands is that an all-nets route exists to the ISP's
gateway. In other words, Internet access has been enabled for the NetDefend Firewall.
The command without any options gives a summary of currently open sessions:
gw-world:/> sessionmanager
Session Manager status
---------------------Active connections
Maximum allowed connections
Local idle session timeout
NetCon idle session timeout
:
:
:
:
3
64
900
600
To see a list of all sessions use the -list option. Below, is some typical output showing the local
console session:
gw-world:/> sessionmanager -list
User
Database
IP
-------- ---------------- --------local
<empty>
0.0.0.0
Type
Mode
------- ------local
console
Access
-------admin
If the user has full administrator privileges, they can forcibly terminate another management
session using the -disconnect option of the sessionmanager command.
The sessionmanager command options are fully documented in the CLI Reference Guide.
Create a text file with a text editor containing a sequential list of CLI commands, one per
line.
The D-Link recommended convention is for these files to use the file extension .sgs (Security
Gateway Script). The filename, including the extension, should not be more than 16
characters.
2.
Upload the file to the NetDefend Firewall using Secure Copy (SCP). Script files must be
stored in a directory under the root called /scripts. SCP uploading is discussed in detail in
Section 2.1.6, Secure Copy.
3.
Use the CLI command script -execute to run the script file.
The CLI script command is the tool used for script management and execution. The complete
syntax of the command is described in the CLI Reference Guide and specific examples of usage are
detailed in the following sections. See also Section 2.1.4, The CLI in this manual.
Note
Uploaded CLI script files are not held in permanent memory and will disappear after
48
system restarts.
Executing Scripts
As mentioned above, the script -execute command launches a named script file that has been
previously uploaded to the NetDefend Firewall. For example, to execute the script file
my_script.sgs which has already been uploaded, the CLI command would be:
gw-world:/> script -execute -name=my_script.sgs
Script Variables
A script file can contain any number of script variables which are called:
$1, $2, $3, $4......$n
The values substituted for these variable names are specified as a list at the end of the script
-execute command line. The number n in the variable name indicates the variable value's position
in this list. $1 comes first, $2 comes second and so on.
For example, a script called my_script.sgs is to be executed with IP address 126.12.11.01 replacing
all occurrences of $1 in the script file and the string If1 address replacing all occurrences of $2.
The file my_script.sgs contains the single CLI command line:
add IP4Address If1_ip Address=$1 Comments=$2
To run this script file after uploading, the CLI command would be:
gw-world:/> script -execute -name=my_script.sgs 126.12.11.01 "If1 address"
When the script file runs, the variable replacement would mean that the file becomes:
add IP4Address If1_ip Address=126.12.11.01 Comments="If1 address"
49
Error Handling
If an executing CLI script file encounters an error condition, the default behavior is for the script
to terminate. This behavior can be overridden by using the -force option.
For example, to run a script file called my_script2.sgs in this way so that errors do not terminate
execution, the CLI command would be:
gw-world:/> script -execute -name=my_script2.sgs -force
If -force is used, the script will continue to execute even if errors are returned by a command in
the script file.
Script Output
Any output from script execution will appear at the CLI console. Normally this output only
consists of any error messages that occur during execution. To see the confirmation of each
command completing, the -verbose option should be used:
gw-world:/> script -execute -name=my_script2.sgs -verbose
Saving Scripts
When a script file is uploaded to the NetDefend Firewall, it is initially kept only in temporary RAM
memory. If NetDefendOS restarts then any uploaded scripts will be lost from this volatile
memory and must be uploaded again to run. To store a script between restarts, it must explicitly
be moved to non-volatile NetDefendOS disk memory by using the script -store command.
For example, to move my_script.sgs to non-volatile memory, the command would be:
gw-world:/> script -store -name=my_script.sgs
Alternatively, all scripts can be moved to non-volatile memory with the command:
gw-world:/> script -store -all
Removing Scripts
To remove a saved script, the script -remove command can be used. For example, to remove the
my_script.sgs script file, the command would be:
gw-world:/> script -remove -name=my_script.sgs
50
Listing Scripts
The script on its own, command without any parameters, lists all the scripts currently available
and indicates the size of each script as well as the type of memory where it resides (residence in
non-volatile memory is indicated by the word "Disk" in the Memory column).
gw-world:/> script
Name
-------------my_script.sgs
my_script2.sgs
Storage
-----------RAM
Disk
Size (bytes)
-------------8
10
To list the content of a specific uploaded script file, for example my_script.sgs the command
would be:
gw-world:/> script -show -name=my_script.sgs
This creates a script file called new_script_sgs which contains all the CLI commands necessary to
create all IP4Address address objects in that unit's configuration. The created file's contents
might, for example, be:
add
add
add
add
IP4Address
IP4Address
IP4Address
IP4Address
If1_ip Address=10.6.60.10
If1_net Address=10.6.60.0/24
If1_br Address=10.6.60.255
If1_dns1 Address=141.1.1.1
"
"
"
The file new_script_sgs can then be downloaded with SCP to the local management workstation
and then uploaded and executed on the other NetDefend Firewalls. The end result is that all
units will have the same IP4Address objects in their address book.
The following should be noted for automatically created scripts:
51
This is instead of the usual way of qualifying the object with its category name:
add Address IP4Address...
Both are valid forms of the command. If an object type can be uniquely identified with its
name, its object category need not be specified. With automatically generated scripts, this is
always the case. This shortened form can also be used when typing the entire command in a
CLI console although tab completion will always include the object category.
COMPortDevice
Ethernet
EthernetDevice
Device
These node types are skipped when the script file is created and NetDefendOS gives the
message No objects of selected category or type.
52
NetDefendOS allows the script file my_script2.sgs to execute another script file and so on. The
maximum depth of this script nesting is 5.
The following table summarizes the operations that can be performed between an SCP client
and NetDefendOS:
File type
Upload possible
Download possible
Firmware upgrades
Yes
No
Certificates
Yes
No
Yes
No
Yes
Yes
Yes
Yes
53
Apart from the individual files, the objects types listed are:
HTTPALGBanners/ - The banner files for user authentication HTML. Uploading these is
described further in Section 6.3.4.4, Customizing WCF HTML Pages.
HTTPAuthBanner/ - The banner files for HTML ALG dynamic content filtering. Uploading these
is described further in Section 6.3.4.4, Customizing WCF HTML Pages.
script/ - The object type for all CLI scripts. Scripts are described further in Section 2.1.5, CLI
Scripts.
To download a configuration backup to the current local directory, the command would be:
> scp [email protected]:config.bak ./
To upload a file to an object type under the root, the command is slightly different. If we have a
local CLI script file called my_script.sgs then the upload command would be:
> scp my_script.sgs [email protected]:script/
54
If we have the same CLI script file called my_scripts.sgs stored on the NetDefend Firewall then the
download command would be:
> scp [email protected]:script/my_script.sgs ./
Activating Uploads
Like all configuration changes, SCP uploads only become active after the CLI commands activate
have been issued and this must be followed by commit to make the change permanent.
Uploads of firmware upgrades (packaged in .upg files) or a full system backup (full.bak) are the
exception. Both of these file types will result in an automatic system reboot. The other exception
is for script uploads which do not affect the configuration.
If any console key is pressed during these 3 seconds then NetDefendOS startup pauses and the
console boot menu is displayed.
Start firewall
This initiates the complete startup of the NetDefendOS software on the NetDefend Firewall.
55
2.
3.
4.
The 1. Start firewall option re-continues the interrupted NetDefendOS startup process. If the 2.
Login option is chosen, the console password must be entered and the full boot menu described
above is entered.
56
What kind of access the configuration's remote management rules allow. This decides the
interface on which management access is allowed, which protocol is allowed and from which
IP range.
The IP address assigned to a management interface. This IP address can be changed as long
as the new IP belongs to the network allowed by the relevant remote management rule.
A RemoteMgmtHTTP object which controls HTTP and HTTPS access through the Web
Interface. By default, only HTTPS is allowed from the 192.168.1.0/24 network on the default
management interface.
For other types of access such as using SSH and SNMP, additional objects for remote access must
be defined.
This activates the new configuration but the changes are not made permanent until the
following command is issued:
gw-world:/> commit
If the commit command is not issued within a fixed period of time (the default is 30 seconds)
after the activate, NetDefendOS assumes communication has been lost and the original
configuration is restored.
If a configuration change breaks SSH communication, the administrator must login in again
over SSH in order to issue the commit command and make the changes persistent.
57
If the default 30 second delay is too short, the delay can be changed in the configuration's
advanced settings. The setting's name is Validation Timeout in the Web Interface
(NetconBiDirTimeout in the CLI) and is a global setting.
Example 2.3. Changing the Management Validation Timeout
This example will change the validation timeout from its default value of 30 seconds to 60
seconds.
Command-Line Interface
gw-world:/> set Settings RemoteMgmtSettings NetconBiDirTimeout=60
Web Interface
1.
Go to: System > Device > Remote Management > Advanced Settings
2.
3.
Validation Timeout: 60
Click OK
Login using the existing remote management interface and add a new remote
management object for HTTP/HTTPS and/or SSH for the new interface. Then activate and
commit the change.
2.
Disconnect and reconnect using the interface specified by the new remote management
object.
3.
Delete or disable the old remote management object, then activate and commit the
change.
58
Change the IP address of the interface directly. For example, the CLI for this would be:
gw-world:/> set Interface Ethernet <interface> IP=<ip_address>
This is not recommended since the address object in the address book for this IP address
would not change and therefore would any of the other rules and object that refer to it.
Change the IP address of the address object for the interface IP. This is the recommended
method of setting a new management IP address.
Web Interface
1.
2.
3.
4.
5.
IP address: 192.168.1.2
Click OK
59
Web Interface
1.
2.
3.
Interface: If2
Network: management_net
Click OK
Web Interface
1.
2.
3.
4.
Click OK
This change will now by synched over to the other unit in the cluster when it is activated and
committed.
60
Web Interface
1.
Go to: System > Device > Remote Management > Add > HTTP/HTTPS Management
2.
Enter a Name for the HTTP/HTTPS remote management rule, in this case https_access
3.
4.
5.
Interface: If2
Network: all-nets
Click OK
61
Default: Enabled
Validation Timeout
Specifies the amount of seconds to wait for the administrator to log in before reverting to the
previous configuration.
Default: 30
HTTPS Certificate
Specifies which certificate to use for HTTPS traffic. Only RSA certificates are supported.
Default: HTTPS
Object Types
A configuration object has a well-defined type. The type defines the properties that are available
for the configuration object, as well as the constraints for those properties. For instance, the
IP4Address type is used for all configuration objects representing a named IPv4 address.
Object Organization
In the Web Interface the configuration objects are organized into a tree-like structure based on
the type of the object.
62
In the CLI, similar configuration object types are grouped together in a category. These categories
are different from the structure used in the Web Interface to allow quick access to the
configuration objects in the CLI. The IP4Address, IP4Group and EthernetAddress types are, for
instance, grouped in a category named Address, as they all represent different addresses.
Consequently, Ethernet and VLAN objects are all grouped in a category named Interface, as they
are all interface objects. The categories have actually no impact on the system configuration;
they are merely provided as means to simplify administration.
The following examples show how to manipulate objects.
Example 2.8. Listing Configuration Objects
To find out what configuration objects exist, you can retrieve a listing of the objects. This
example shows how to list all service objects.
Command-Line Interface
gw-world:/> show Service
2.
Add Button - Displays a dropdown menu when clicked. The menu will list all types of
configuration items that can be added to the list.
Header - The header row displays the titles of the columns in the list. The tiny arrow images
next to each title can be used for sorting the list according to that column.
Rows - Each row in the list corresponds to one configuration item. Most commonly, each row
starts with the name of the object (if the item has a name), followed by values for the
columns in the list.
A single row in the list can be selected by clicking on the row on a spot where there is no
hyperlink. The background color of the row will turn dark blue. Right-clicking the row will display
a menu which gives the option to edit or delete the object as well as modify the order of the
objects.
Value
------telnet
63
DestinationPorts:
Type:
SourcePorts:
SYNRelay:
PassICMPReturn:
ALG:
MaxSessions:
Comments:
23
TCP
0-65535
No
No
<empty>
1000
Telnet
The Property column lists the names of all properties in the ServiceTCPUDP class and the Value
column lists the corresponding property values.
Web Interface
1.
2.
3.
Note
When accessing object via the CLI you can omit the category name and just use the type
name. The CLI command in the above example, for instance, could be simplified to:
gw-world:/> show ServiceTCPUDP telnet
Value
------telnet
23
TCP
0-65535
No
No
<empty>
1000
Modified Comment
Web Interface
1.
64
2.
3.
4.
Click OK
Verify that the new comment has been updated in the list.
Value
------------myhost
192.168.10.10
<empty>
No
<empty>
Web Interface
1.
2.
3.
4.
5.
6.
Click OK
7.
Verify that the new IP4 address object has been added to the list
65
Web Interface
1.
2.
3.
The row will be rendered with a strike-through line indicating that the object is marked for
deletion.
Web Interface
1.
2.
3.
66
Type
------------IP4Address
ServiceTCPUDP
Object
-----myhost
telnet
A "+" character in front of the row indicates that the object has been added. A "*" character
indicates that the object has been modified. A "-" character indicates that the object has been
marked for deletion.
Web Interface
1.
If the new configuration is validated, NetDefendOS will wait for a short period (30 seconds by
default) during which a connection to the administrator must be re-established. As described
previously, if the configuration was activated via the CLI with the activate command then a
commit command must be issued within that period. If a lost connection could not be
re-established or if the commit command was not issued, then NetDefendOS will revert to using
the previous configuration. This is a fail-safe mechanism and, amongst others things, can help
prevent a remote administrator from locking themselves out.
Example 2.15. Activating and Committing a Configuration
This example shows how to activate and commit a new configuration.
Command-Line Interface
gw-world:/> activate
The system will validate and start using the new configuration. When the command prompt is
shown again:
gw-world:/> commit
67
2.
Click OK to confirm
The web browser will automatically try to connect back to the Web Interface after 10 seconds. If
the connection succeeds, this is interpreted by NetDefendOS as confirmation that remote
management is still working. The new configuration is then automatically committed.
68
Message Format
All event messages have a common format, with attributes that include category, severity and
recommended actions. These attributes enable easy filtering of messages, either within
NetDefendOS prior to sending to an event receiver, or as part of the analysis after logging and
storing messages on an external log server.
A list of all event messages can be found in the NetDefendOS Log Reference Guide. That guide
also describes the design of event messages, the meaning of severity levels and the various
attributes available.
Event Severity
The default severity of each log event is predefined and it can be, in order of highest to lowest
severity, one of:
69
Emergency
Alert
Critical
Error
Warning
Notice
Info
Debug
By default, NetDefendOS sends any generated messages of level Info and above to any
configured log servers but the level required for sending can be changed by the administrator.
The Debug severity is intended for system troubleshooting only and is not normally used. All
individual log event messages with their meaning are described in the separate NetDefendOS
Log Reference Guide.
MemoryLogReceiver
NetDefendOS has its own logging mechanism also known as the MemLog. This retains all
event log messages in memory and allows direct viewing of recent log messages through the
Web Interface.
This is enabled by default but can be disabled.
This receiver type is discussed further below in Section 2.2.4, Logging to the
MemoryLogReceiver (Memlog).
Syslog Receiver
Syslog is the de-facto log message standard for logging events from network devices. If other
network devices are already logging to Syslog servers, using Syslog for NetDefendOS log
messages can simplify overall administration.
This receiver type is discussed further below in Section 2.2.5, Logging to Syslog Hosts.
70
Overview
The MemoryLogReceiver (also known as Memlog) is a NetDefendOS feature that allows logging
direct to memory in the NetDefend Firewall instead of sending messages to an external server.
These messages can be examined through the standard user interfaces.
Memlog Timestamps
The timestamp shown is Memlog console output is always the local system time of the firewall.
This is different from the timestamp on log messages sent to external log Receivers which are
always timestamped with GMT time.
Message Format
Most Syslog recipients preface each log entry with a timestamp and the IP address of the
machine that sent the log data:
Feb 5 2000 09:45:23 firewall.ourcompany.com
In order to facilitate automated processing of all messages, NetDefendOS writes all log data to a
single line of text. All data following the initial text is presented in the format name=value. This
enables automatic filters to easily find the values they are looking for without assuming that a
specific piece of data is in a specific location in the log entry.
Web Interface
1.
Go to: System > Device > Log and Event Receivers > Add > Syslog Receiver
2.
3.
4.
5.
6.
Click OK
72
Web Interface
1.
Go to: System > Device > Log and Event Receivers > Add > Syslog Receiver
2.
3.
4.
5.
6.
7.
8.
Click OK
The Severity Filter is a means of specifying what severities, if any, are sent to the receiver. By
default, all log messages except Debug are sent. This can be restricted further so, for example,
only Emergency, Alert and Critical messages are sent.
Category and ID
This specifies the log messages that will be affected by the exception. If the ID number of the
log message is not specified then all log messages for the specified category will be included.
The ID of specific log messages can be found in the Log Reference Guide.
Type
This can be one the following:
i.
Exclude - This will exclude the specified log message(s) even if they are allowed by the
severity filter.
ii.
Include - This will include the specified log message(s) even if they are excluded by the
severity filter.
In addition, the Severity of the included message(s) can be specified. If this is set to
Default the original severity is used. Otherwise, the severity is set to the specified value.
This provides the ability to raise (or lower) the severity of specific log messages.
74
This information can be cross-referenced to the separate Log Reference Guide using the ID.
Web Interface
1.
2.
Specify the name for the event receiver, in this example my_snmp
3.
4.
5.
6.
Click OK
75
Send Limit
This setting specifies the maximum log messages that NetDefendOS will send per second. This
value should never be set too low as this may result in important events not being logged. When
the maximum is exceeded, the excess messages are dropped and are not buffered.
The administrator must make a case by case judgment about the message load that log servers
can deal with. This can often depend on the server hardware platform being used and if the
resources of the platform are being shared with other tasks.
Default: 2000
76
RADIUS Architecture
The RADIUS protocol is based on a client/server architecture. The NetDefend Firewall acts as the
client of the RADIUS server, creating and sending requests to a dedicated server(s). In RADIUS
terminology the firewall acts as the Network Access Server (NAS).
For user authentication, the RADIUS server receives the requests, verifies the user's information
by consulting its database, and returns either an "accept" or "reject" reply to the requesting
client.
With the RFC 2866 standard, RADIUS was extended to handle the delivery of accounting
information and this is the standard followed by NetDefendOS for user accounting. In this way,
all the benefits of centralized servers are thus extended to user connection accounting.
The usage of RADIUS for NetDefendOS authentication is discussed in Section 8.2, Authentication
Setup.
77
Type - Marks this AccountingRequest as signalling the beginning of the service (START).
NAS Port - The port of the NAS on which the user was authenticated (this is a physical
interface and not a TCP or UDP port).
User IP Address - The IP address of the authenticated user. This is sent only if specified on
the authentication server.
How Authenticated - How the user was authenticated. This is set to either RADIUS if the user
was authenticated via RADIUS, or LOCAL if the user was authenticated via a local user
database.
Delay Time - The time delay (in seconds) since the AccountingRequest packet was sent and
the authentication acknowledgement was received. This can be subtracted from the time of
arrival on the server to find the approximate time of the event generating this
AccountingRequest. Note that this does not reflect network delays. The first attempt will have
this parameter set to 0.
Timestamp - The number of seconds since 1st January, 1970. Used to set a timestamp when
this packet was sent from NetDefendOS.
Type - Marks this accounting request as signalling the end of a session (STOP).
NAS Port - The port on the NAS on which the user was authenticated. (This is a physical
interface and not a TCP or UDP port).
User IP Address - The IP address of the authenticated user. This is sent only if specified on
the authentication server.
78
How Authenticated - How the user was authenticated. This is set to either RADIUS if the user
was authenticated via RADIUS, or LOCAL if the user was authenticated via a local user
database.
Timestamp - The number of seconds since 1970-01-01. Used to set a timestamp when this
packet was sent from the NetDefend Firewall.
Input Gigawords - Indicates how many times the Input Bytes counter has wrapped. This is
only sent if Input Bytes has wrapped, and if the Input Bytes attribute is sent.
Output Gigawords - Indicates how many times the Output Bytes counter has wrapped. This
is only sent if Output Bytes has wrapped, and if the Output Bytes attribute is sent.
Message Frequency
The frequency of interim accounting messages can be specified either on the authentication
server or in NetDefendOS. Switching on the setting in NetDefendOS will override the setting on
the accounting server.
A user authentication object must have a rule associated with it where a RADIUS server is
specified.
79
RADIUS Accounting will not function where a connection is subject to a FwdFast rule in the IP
rule set.
The same RADIUS server does not need to handle both authentication and accounting; one
server can be responsible for authentication while another is responsible for accounting
tasks.
Multiple RADIUS servers can be configured in NetDefendOS to deal with the event when the
primary server is unreachable.
Web Interface
1.
Go to: Policies > User Authentication > RADIUS > Add > RADIUS Server
2.
Now enter:
Name: my-accounting
IP Address: 192.168.3.1
Port: 1813
Retry Timeout: 2
80
3.
Click OK
A problem with accounting information synchronization could occur if an active unit has an
authenticated user for whom the associated connection times out before it is synchronized
on the inactive unit.
To get around this problem, a special AccountingUpdate event is sent to the passive unit on
a timeout and this contains the most recent accounting information for connections.
81
Allow on error
If there is no response from a configured RADIUS accounting server when sending accounting
data for a user that has already been authenticated, then enabling this setting means that the
user will continue to be logged in.
Disabling the setting will mean that the user will be logged out if the RADIUS accounting server
cannot be reached even though the user has been previously authenticated.
Default: Enabled
Logout at shutdown
If there is an orderly shutdown of the NetDefend Firewall by the administrator, then
NetDefendOS will delay the shutdown until it has sent RADIUS accounting STOP messages to
any configured RADIUS server.
If this option is not enabled, NetDefendOS will shutdown even though there may be RADIUS
accounting sessions that have not been correctly terminated. This could lead to the situation
that the RADIUS server will assume users are still logged in even though their sessions have been
terminated.
Default: Enabled
82
The maximum number of contexts allowed with RADIUS. This applies to RADIUS use with both
accounting and authentication.
Default: 1024
83
2.4. Monitoring
The real-time performance of NetDefendOS can be monitored in a number of ways. They are:
A NetDefendOS reconfigure.
84
The reconfigure that can be triggered by the link monitor has one special aspect to it. The link
monitor reconfigure has the additional action of restarting all interfaces. This means that if there
is a problem related to a particular Ethernet NIC, perhaps due to overload, then this can be
cleared by interface initialization. This results in only a momentary delay in throughput while the
reconfigure takes place.
An external device develops an occasional problem with its link to the NetDefend Firewall
and the physical link needs to be renegotiated. Such problems can occur sometimes with
some older equipment such as ADSL Modems. For this scenario action 1. Reconfigure
should be selected.
A reconfigure means that the NetDefendOS configuration will be reloaded. All connections
and states are saved but reloading means all traffic is suspended for a short period and all
interface links to external devices are renegotiated.
In an HA cluster setup, the link from the master to the external Internet (or other part of a
network) can be continually monitored so that should the link fail, the slave will take over
(assuming that the slave has a different physical connection to the monitored address). The
action chosen for HA should be either 2. Failover or 3. Failover and reconfigure.
If the first action option 1. Reconfigure is chosen in an HA cluster, then the reconfigure will
also cause a failover since it will temporarily suspend the master's operation while the
reconfigure takes place and the slave will take over when it detects this inactivity. If
reconfiguration with failover is desirable it is better to select the option 3. Failover and
reconfigure since this performs the failover first and is nearly instantaneous with almost no
traffic interruption. Reconfiguration first is slower and results in some traffic interruption.
To preserve all tunnels in a VPN scenario, it is best to choose the 2. Failover option since a
reconfiguration can cause some tunnels to be lost.
85
If the IPsec tunnel was a LAN-to-LAN tunnel, it will be automatically re-established provided
traffic flows within the keepalive time specified for the tunnel.
Any IPsec tunnels from external clients will be lost and will not be re-established
automatically. The client must initiate a new connection.
Addresses
Max Loss
Do not allow the link monitor to trigger an action for this number
of seconds after the last reconfiguration. This avoids false
positives during initial link negotiation. The default value is 45
seconds.
Ping Interval
Routing Table
This is the routing table used for looking up the route for the host
IP addresses. The default is the main routing table.
Use Shared IP
86
This example creates a Link Monitor object that will monitor the availability of the host found at
the IPv4 address my_host. It is assumed this IPv4 address is already defined in the NetDefendOS
address book.
The action for the monitor is HA Failover if it detects that the host is unavailable.
Command-Line Interface
gw-world:/> add LinkMonitor Action=HAFailover Addresses=my_host
Web Interface
1.
Go to: System > Device > Link Monitors > Add > Link Monitor
2.
3.
Action: HA Failover
Addresses: my_host
Click OK
87
Network - The IP address or network from which SNMP requests will come.
Community - The community string which provides password security for the accesses.
88
Network=mgmt-net
SNMPGetCommunity=Mg1RQqR
Should it be necessary to enable SNMP Before Rules (which is enabled by default) then the
command is:
gw-world:/> set Settings RemoteMgmtSettings SNMPBeforeRules=Yes
Web Interface
1.
Go to: System > Device > Remote Management > Add > SNMP management
2.
3.
4.
Community: Mg1RQqR
Interface: lan
Network: mgmt-net
Click OK
Should it be necessary to enable SNMP Before Rules (which is enabled by default) then the
setting can be found in System > Device > Remote Management > Advanced Settings.
System Contact
The contact person for the managed node.
Default: N/A
89
System Name
The name for the managed node.
Default: N/A
System Location
The physical location of the node.
Default: N/A
Interface Alias
What to display in the SNMP ifMIB ifAlias variables.
Default: Hardware
Configuring and performing hardware monitoring can be done either through the CLI or
through the Web Interface.
Poll Interval
Polling interval for the Hardware Monitor which is the delay in milliseconds between readings of
hardware monitor values.
Minimum value: 100
Maximum value: 10000
Default: 500
Some typical output from this command for two temperature sensors is shown below:
gw-world:/> hwm -a
Name
Current value (unit)
---------------------------------SYS Temp
=
44.000 (C)
(x)
CPU Temp
=
41.500 (C)
(x)
The SYS temperature is for the overall temperature inside the hardware unit. The CPU
temperature relates specifically to the unit's central processor which can be lower than the
overall temperature due to the method of cooling.
The -verbose option displays the current values plus the configured ranges:
gw-world:/> hwm -a -v
2 sensors available
Poll interval time = 500ms
Name [type][number] = low_limit] current_value [high_limit (unit)
----------------------------------------------------------------SYS Temp
[TEMP ][ 0] =
44.000]
45.000 [ 0.000 (C)
CPU Temp
[TEMP ][ 1] =
42.000]
42.500 [ 0.000 (C)
Time to probe sensors: 2.980000e-05 seconds
Each physical attribute listed on the left is given a minimum and maximum range within which it
should operate. When the value returned after polling falls outside this range, NetDefendOS
optionally generates a log message that is sent to the configured log servers.
91
Type
This is the type of sensor shown in the CLI output above and is presented as a list of choices in
the Web Interface. For example, Temp.
Sensor
This is the number of the sensor as shown in the CLI output above. For example, the SYS Temp
number is 0.
Name
This is the Name of the sensor as shown in the CLI output above. For example, SYS Temp.
Enabled
An individual sensor can be enabled or disabled used this setting. When enabled, an "(x)" is
displayed next to the sensor in the output from the hwm command.
This means that a new event message must now wait for 900 seconds after the previous one has
been sent.
All the options for LogSettings can be found in Section 2.2.8, Advanced Log Settings.
92
Alert Level
Generate an Alert log message if free memory is below this number of bytes. Disable by setting
to 0. Maximum value is 10,000.
Default: 0
Critical Level
Generate a Critical log message if free memory is below this number of bytes. Disable by setting
to 0. Maximum value is 10,000.
Default: 0
Warning Level
Generate a Warning log message if free memory is below this number of bytes. Disable by
setting to 0. Maximum value 10,000.
Default: 0
93
A Simple Example
An example of pcapdump usage is the following sequence:
gw-world:/>
gw-world:/>
gw-world:/>
gw-world:/>
gw-world:/>
pcapdump
pcapdump
pcapdump
pcapdump
pcapdump
4. The same information is written in its complete form to a file called cap_lan.cap.
gw-world:/> pcapdump -write lan -filename=cap_lan.cap
At this point, the file cap_lan.cap should be downloaded to the management workstation for
analysis.
5. A final cleanup is performed and all memory taken is released.
gw-world:/> pcapdump -cleanup
1.
All capture from all executions goes to the same memory buffer.
The command can be launched multiple times with different interfaces specified. In this
case the packet flow for the different executions will be grouped together in different
sections of the report.
If a clearer picture of packets flowing between interfaces is required in the output then it is
best to issue one pcapdump command with the interfaces of interest specified.
2.
3.
The -stop option without an interface specified will halt capture on all interfaces.
4.
pcapdump prevents capture running more than once on the same interface by detecting
command duplication.
Filter Expressions
Seeing all packets passing through a particular interface often provides an excess of information
to be useful. To focus on particular types of traffic the pcapdump command has the option to add
an filter expression which has one of the following forms:
-eth=<macaddr> - Filter on source or destination MAC address.
-ethsrc=<macaddr> - Filter on source MAC address.
-ethdest=<macaddr> - Filter on destination MAC address.
-ip=<ipaddr> - Filter source or destination IP address.
-ipsrc=<ipaddr> - Filter on source IP address.
-ipdest=<ipaddr> - Filter on destination IP address.
-port=<portnum> - Filter on source or destination port number.
-srcport=<portnum> - Filter on source port number.
-destport=<portnum> - Filter on destination port number.
-proto=<id> - Filter on protocol where id is the decimal protocol id.
-<protocolname> - Instead of the protocol number, the protocol name alone can be specified
and can be one of -tcp, -udp or -icmp.
95
Excluding the filename extension, the name may not exceed 8 characters in length.
The filename and extension can only contain the characters A-Z, 0-9, "-" and "_".
Combining Filters
It is possible to use several of these filter expressions together in order to further refine the
packets that are of interest. For example we might want to examine the packets going to a
particular destination port at a particular destination IP address.
96
2.6. Maintenance
2.6.1. Auto-Update Mechanism
A number of the NetDefendOS security features rely on external servers for automatic updates
and content filtering. The Intrusion Prevention and Detection system and Anti-Virus modules
require access to updated signature databases in order to provide protection against the latest
threats.
To facilitate the Auto-Update feature D-Link maintains a global infrastructure of servers
providing update services for NetDefend Firewalls. To ensure availability and low response times,
NetDefendOS employs a mechanism for automatically selecting the most appropriate server to
supply updates.
For more details on these features see the following sections:
A Configuration Backup
This is the entire current NetDefendOS configuration saved into a single file. It does not
include the installed NetDefendOS version. This is useful when restoring only the
configuration.
It is important to create, at the minimum, a configuration backup on a regular basis so that a
configuration can be easily recreated in the event of hardware replacement. The alternative is
to recreate a configuration by manually adding its contents, piece by piece.
A System Backup
This a complete backup of both the configuration and the installed NetDefendOS software
saved into a single file. This is useful if restoring both the configuration and the NetDefendOS
version upgraded.
A complete system backup is a much larger file than a configuration backup and can be
many megabytes, it is therefore not recommended to perform this on a regular basis because
of the time involved. However, it is recommended to create this at least once when the
NetDefend Firewall is initially configured and goes live. This is because it a full system backup
makes it easier to restore the current configuration on new hardware.
97
Version Compatibility
Since a full system backup includes a NetDefendOS version, compatibility is not an issue with
these types of backup.
With configuration only backups, the following should be noted:
Operation Interruption
Backups can be created at any time without disturbing NetDefendOS operation. For restores,
however, it is not recommended to have live traffic flowing since the restored configuration may
significantly alter the security policies of the firewall.
After restoring a backup it is necessary to Activate the new configuration, as is done with a
normal configuration change.
A complete system restore will require that NetDefendOS reinitializes, with the loss of all existing
connections. Initialization may require some seconds to complete depending on the hardware
type and normal operation will not be possible during this time.
98
SCP can be used to download either of these files. When the download is complete the filename
will be altered to include the date. For example, full.bak might become full-20081121.bak to show
it is a snapshot of the state on November 21st, 2008.
To restore a backup file, the administrator should upload the file to the NetDefend Firewall. The
name of the file does not need to be changed in any way and can retain the date since
NetDefendOS will read a header in the file to determine what it is.
Go to: Status > Maintenance > Backup and Restore > Backup System
2.
A file dialog is shown - choose a directory for the created file and change the filename from
the default if desired.
3.
Web Interface
1.
Go to: Status > Maintenance > Reset & Restore > Reset
2.
Select Restore the entire unit to factory defaults then confirm and wait for the restore to
complete.
Reset Procedure for the NetDefend DFL-210, 260, 260E, 800, 860 and 860E
To reset the NetDefend DFL-210, 260, 260E, 800, 860 and 860E models, hold down the reset
button located at the rear of the unit for 10-15 seconds while powering on the unit. After that,
release the reset button and the unit will continue to load and startup with its default factory
settings.
The IPv4 address 192.168.1.1 will be assigned to the LAN interface on the DFL-210, 260, 800 and
860 models. The IPv4 address 192.168.10.1 is assigned to the LAN interface on the DFL-260E and
DFL-860E models.
Reset Procedure for the NetDefend DFL-1600, 1660, 2500, 2560 and 2560G
To reset the DFL-1600, 1660, 2500, 2560 and 2560G models, press any key on the keypad when
the Press keypad to Enter Setup message appears on the front display. Now, select the Reset
firewall option and confirm by selecting Yes. Then wait for the reset process to complete after
which the unit will startup with its default factory settings.
The IPv4 address 192.168.1.1 will be assigned to the default management interface LAN1 on the
DFL-1600 and DFL-2500 models. The management interface IP address for the DFL-1660,
DFL-2560 and DFL-2560G models will default to 192.168.10.1.
The default IP address factory setting for the default management interface is discussed further
in Section 2.1.3, The Web Interface.
100
101
102
Chapter 3: Fundamentals
This chapter describes the fundamental logical objects which make up a NetDefendOS
configuration. These objects include such items as IP addresses and IP rules. Some exist by
default and some must be defined by the administrator.
In addition, the chapter explains the different interface types and explains how security policies
are constructed by the administrator.
The Address Book, page 103
IPv6 Support, page 109
Services, page 118
Interfaces, page 127
ARP, page 148
IP Rules and IP Policies, page 158
Schedules, page 180
Certificates, page 183
Date and Time, page 189
DNS, page 196
ICMP Ping, page 199
103
Chapter 3: Fundamentals
Using address object names instead of entering numerical addresses reduces errors.
By defining an IP address object just once in the address book, changing the definition
automatically also changes all references to it.
3.1.2. IP Addresses
IP Address objects are used to define symbolic names for various types of IP addresses.
Depending on how the address is specified, an IP Address object can represent either a single IP
address (a specific host), a network or a range of IP addresses.
In addition, IP Address objects can be used for specifying the credentials used in user
authentication. For more information about this topic, see Chapter 8, User Authentication.
The following list presents the various types of addresses an IP Address object can hold, along
with what format that is used to represent that specific type:
Host
IP Network
IP Range
Web Interface
1.
Go to: Objects > Address Book > Add > IP4 Address
2.
3.
4.
Click OK
104
Chapter 3: Fundamentals
Web Interface
1.
Go to: Objects > Address Book > Add > IP4 Address
2.
3.
4.
Click OK
Web Interface
1.
Go to: Objects > Address Book > Add > IP4 Address
2.
3.
4.
Click OK
105
Chapter 3: Fundamentals
Web Interface
1.
2.
3.
4.
Click OK
Web Interface
1.
Go to: Objects > Address Book > Add > Ethernet Address
2.
Specify a suitable name for the Ethernet Address object, for example wwwsrv1_mac
3.
4.
Click OK
106
Chapter 3: Fundamentals
Address objects can be grouped in order to simplify configuration. Consider a number of public
servers that should be accessible from the Internet. The servers have IP addresses that are not in
a sequence, and can therefore not be referenced to as a single IP range. Consequently, individual
IP Address objects have to be created for each server.
Instead of having to cope with the burden of creating and maintaining separate filtering policies
allowing traffic to each server, an Address Group named, for example web-servers, could be
created with the web server hosts as group members. Now, a single policy can be used with this
group, thereby greatly reducing the administrative workload.
192.168.0.10 - 192.168.0.15
192.168.0.14 - 192.168.0.19
The result of combining these two will be a single address range containing 192.168.0.10 192.168.0.19.
Interface Addresses
For each Ethernet interface in the system, two IP Address objects are predefined; one object
for the IPv4 address of the actual interface, and one object representing the local network for
that interface.
Interface IPv4 address objects are named <interface-name>_ip and network objects are
named <interface-name>_net. As an example, an interface named If1 will have an associated
interface IP object named If1_ip, and a network object named If1_net.
These addresses are stored in an address book folder called InterfaceAddresses.
When changing the IP address of an Ethernet interface, it is strongly recommended to
change the address of the default address book object and not change the IP address directly
107
Chapter 3: Fundamentals
108
Chapter 3: Fundamentals
Routing tables.
Routing rules.
Web Interface
Add the network address (the IPv6 prefix):
1.
Go to: Objects > Address Book > Add > IP6 Address
2.
3.
4.
Click OK
109
Chapter 3: Fundamentals
Go to: Objects > Address Book > Add > IP6 Address
2.
3.
4.
Click OK
Web Interface
1.
2.
3.
Click OK
110
Chapter 3: Fundamentals
Web Interface
1.
Go to: Network > Interfaces and VPN > Ethernet > wan
2.
3.
Now enter:
4.
IP Address: wan_ip6
Network: wan_net6
Click OK
An IPv6 gateway address could also be entered for the interface if it is connected to an ISP router.
111
Chapter 3: Fundamentals
Web Interface
1.
Go to: Network > Interfaces and VPN > Ethernet > wan
2.
Go to: Advanced and enable the option: Enable router advertisement for this interface
3.
Click OK
112
Chapter 3: Fundamentals
113
Chapter 3: Fundamentals
Web Interface
1.
Go to: Network > Routing > Routing Tables > main > Add > RouteIPv6
2.
Now enter:
Interface: If1
Network: my_ipv6_net
3.
Go to: Proxy ND and move the interface If3 from Available to Selected
4.
Click OK
This provides the means to determine if an IPv6 host is reachable and responding.
Ping can also be initiated in the Web Interface by going to: Status > Tools > Ping.
Outgoing ICMP messages from the firewall do not require an IP rule which allows them since the
gateway is trusted. However, if the firewall is to be pinged by an external host then an IP rule or
IP policy must be set up to allow this, just as it is needed for IPv4. Such an IP rule or policy would
use the predefined Service object called ping6-inbound The service object called all_icmpv6
covers all IPv6 ICMP messages except mobile ICMP messages.
An appropriate IP rule to allow NetDefendOS to respond to IPv6 ping messages would be the
following:
Action
Source
Interface
Source
Network
Destination
Interface
Destination
Network
Service
Allow
wan
all-nets6
core
wan_ip6
ping6-inbound
The above rule assumes that IPv6 has been enabled on the wan interface.
A general discussion of ping and its options along with IPv4 usage can be found in Section 3.11,
ICMP Ping.
Management access with any NetDefendOS management interface is not possible using IPv6.
IP rules using IPv4 and IPv6 addresses can coexist in the same IP rule set but a single rule
cannot combine IPv4 and IPv6.
IPv6 addresses are not currently supported in IP rules with the following actions:
i.
NAT
ii.
SAT
114
Chapter 3: Fundamentals
iii.
SLB SAT
iv.
Multiplex SAT
Routes using IPv4 and IPv6 addresses can coexist in the same routing table set but a single
route cannot combine IPv4 and IPv6.
Routing rules using IPv4 and IPv6 addresses coexist but a single rule cannot combine IPv4
and IPv6.
IPv6 cannot be used for VPN or with ALGs, IDP or traffic shaping.
INCOMPLETE
Address resolution is in progress and the link-layer address of the neighbor has not yet been
determined.
REACHABLE
The neighbor is known to have been reachable recently (within the last tens of seconds).
STALE
The neighbor is no longer known to be reachable but until traffic is sent, no attempt will be
115
Chapter 3: Fundamentals
DELAY
The neighbor is no longer known to be reachable and traffic has recently been sent. Before
probing reachability, wait for a short time to allow reachability confirmation.
PROBE
The neighbor is no longer known to be reachable and unicast neighbor solicitation probes
are being sent to verify reachability.
When static entries are added by the administrator. These are regarded as always being in
the REACHABLE state.
The key advanced settings for neighbor discovery are the following:
NDMatchEnetSender
Check if the Ethernet sender address does not match the sender Ethernet address derived
from the source/target link-layer address option in a packet. This can be a sign of address
spoofing and the default is to have this setting enabled so that non-matching packets are
dropped. In some situations it might be desirable to skip this check.
NDValSenderIP
When enabled, NetDefendOS requires that the non-link local source address of neighbor
discovery packets match the routing table routes. If they do not, the packets are dropped.
When no such matching routes have been configured, this setting needs to be disabled if the
neighbor discovery packets are to be processed.
NDChanges
If occasional loss of connectivity to certain hosts is being experienced, this setting should be
given the value AcceptLog. This can help identify if the cause is the same IPv6 address moving
between hardware Ethernet addresses.
NDCacheSize
The neighbor discovery cache provides higher traffic throughput speeds by reducing
neighbor discovery traffic and the time required to process this traffic. The size of the cache
can be adjusted with this setting to suit particular scenarios with different network sizes.
A larger cache means a greater allocation of physical memory. However, if the cache is too
small, items may be discarded because they cannot fit and this will lead to higher latency
times and more neighbor discovery traffic.
Timing Settings
There are a number of timing settings associated with neighbor discovery:
116
Chapter 3: Fundamentals
NDMulticastSolicit
NDMaxUnicastSolicit
NDBaseReachableTime
NDDelayFirstProbeTime
NDRetransTimer
Lower values for these means that the cache is better able to deal with stray hosts that only
communicate for a short period but it also leads to an increase in neighbor discovery traffic.
In order to increase the time an entry stays in the cache before triggering a time-out or
sending probes, it is recommended to increase the value of NDBaseReachableTime.
All settings relevant to neighbor discovery can be found in the separate NetDefendOS CLI
Reference Guide under the object name ARPNDSettings.
117
Chapter 3: Fundamentals
3.3. Services
3.3.1. Overview
A Service object is a reference to a specific IP protocol with associated parameters. A service
definition is usually based on one of the major transport protocols such as TCP or UDP which is
associated with a specific source and/or destination port number(s). For example, the HTTP
service is defined as using the TCP protocol with the associated destination port 80 and any
source port.
However, service objects are not restricted to just the TCP or UDP protocols. They can be used to
encompass ICMP messages as well as a user-definable IP protocol.
A Service is Passive
Services are passive NetDefendOS objects in that they do not themselves carry out any action in
the configuration. Instead, service objects must be associated with the security policies defined
by various NetDefendOS rule sets and then act as a filter to apply those rules only to a specific
type of traffic.
For example, an IP rule in a NetDefendOS IP rule set has a service object associated with it as a
filtering parameter to decide whether or not to allow a specific type of traffic to traverse the
NetDefend Firewall. Inclusion in IP rules is one the most important usage of service objects and it
is also how ALGs become associated with IP rules since an ALG is associated with a service and
not directly with an IP rule.
For more information on how service objects are used with IP rules, see Section 3.6, IP Rules and
IP Policies.
Predefined Services
A large number of service objects are predefined in NetDefendOS. These include common
services such as HTTP, FTP, Telnet and SSH.
Predefined services can be used and also modified just like custom, user defined services.
However, it is recommended to not make any changes to predefined services and instead create
custom services with the desired characteristics.
Custom service creation in detail later in Section 3.3.2, Creating Custom Services.
Example 3.11. Listing the Available Services
To produce a listing of the available services in the system:
Command-Line Interface
gw-world:/> show Service
The output will look similar to the following listing with the services grouped by type with the
service groups appearing first:
ServiceGroup
Name
-----------all_services
Comments
-------------------------------------------------All ICMP, TCP and UDP services
118
Chapter 3: Fundamentals
all_tcpudp
ipsec-suite
l2tp-ipsec
l2tp-raw
pptp-suite
ServiceICMP
Name
-----------all_icmp
"
"
Comments
-------------------------------------------------All ICMP services
Web Interface
1.
Value
---------------echo
7
TCPUDP (TCP/UDP)
0-65535
No
<empty>
1000
Echo service
Web Interface
1.
2.
3.
Chapter 3: Fundamentals
TCP/UDP Service
A service based on the UDP or TCP protocol or both. This type of service is discussed further
in this section.
ICMP Service
A service based on the ICMP protocol. This is discussed further in Section 3.3.3, ICMP Services.
IP Protocol Service A service based on a user defined protocol. This is discussed further in
Section 3.3.4, Custom IP Protocol Services.
Service Group
A service group consisting of a number of services. This is discussed further in Section 3.3.5,
Service Groups.
Port Ranges
120
Chapter 3: Fundamentals
ALG
A TCP/UDP service can be linked to an Application Layer Gateway (ALG) to enable deeper
inspection of certain protocols. This is the way that an ALG is associated with an IP rule. First,
associate the ALG with a service and then associate the service with an IP rule.
121
Chapter 3: Fundamentals
Max Sessions
An important parameter associated with a service is Max Sessions. This parameter is given a
default value when the service is associated with an ALG. The default value varies according
to the ALG it is associated with. If the default is, for example 100, this would mean that only
100 connections are allowed in total for this service across all interfaces.
For a service involving, for example, an HTTP ALG the default value can often be too low if
there are large numbers of clients connecting through the NetDefend Firewall. It is therefore
recommended to consider if a higher value is required for a particular scenario.
122
Chapter 3: Fundamentals
Web Interface
1.
2.
3.
Now enter:
4.
Type: TCP
Source: 0-65535
Destination: 3306
Click OK
Specifying Codes
If a type is selected then the codes for that type can be specified in the same way that port
numbers are specified. For example, if the Destination Unreachable type is selected with the
comma delimited code list 0,1,2,3 then this will filter Network unreachable, Host unreachable,
Protocol unreachable and Port unreachable.
When a message type is selected but no code values are given then all codes for that type is
assumed.
Destination Unreachable
123
Chapter 3: Fundamentals
Redirect
Parameter Problem
Echo Reply
Source Quenching
The source is sending data too fast for the receiver, the buffer
has filled up.
Time Exceeded
IP protocol numbers
The currently assigned IP protocol numbers and references are published by the Internet
Assigned Numbers Authority (IANA) and can be found at:
http://www.iana.org/assignments/protocol-numbers
Example 3.14. Adding an IP Protocol Service
This example shows how to add an IP Protocol service, with the Virtual Router Redundancy
Protocol.
124
Chapter 3: Fundamentals
Command-Line Interface
gw-world:/> add Service ServiceIPProto VRRP IPProto=112
Web Interface
1.
2.
3.
4.
5.
Click OK
Initial Timeout
This is the time allowed for a new connection to be open.
Chapter 3: Fundamentals
Closing Timeout
The is the time allowed for the connection to be closed.
The administrator must make a judgement as what the acceptable values should be for a
particular protocol. This may depend, for example, on the expected responsiveness of servers to
which clients connect.
126
Chapter 3: Fundamentals
3.4. Interfaces
3.4.1. Overview
An Interface is an important logical building block in NetDefendOS. All network traffic that
transits through, originates from or is terminated in the NetDefend Firewall, does so through one
or more interfaces.
All traffic passing through NetDefendOS has both a source and destination interface. As explained
in more depth later, the special logical interface core is used when NetDefendOS itself is the
source or destination for traffic.
Interface Types
NetDefendOS supports a number of interface types, which can be divided into the following four
major groups:
Ethernet Interfaces
Each Ethernet interface represents a physical Ethernet interface on a NetDefendOS-based
product. All network traffic that originates from or enters a NetDefend Firewall will pass
through one of the physical interfaces.
NetDefendOS currently supports Ethernet as the only physical interface type. For more
information about Ethernet interfaces, see Section 3.4.2, Ethernet Interfaces.
Sub-interfaces
Some interfaces require a binding to an underlying physical interface in order to transfer
data. This group of interfaces is called Physical Sub-Interfaces.
NetDefendOS has support for two types of sub-interfaces:
Virtual LAN (VLAN) interfaces as specified by IEEE 802.1Q. When routing IP packets over a
Virtual LAN interface, they will be encapsulated in VLAN-tagged Ethernet frames. For
more information about Virtual LAN interfaces, please see Section 3.4.3, VLAN.
127
Chapter 3: Fundamentals
Tunnel Interfaces
Tunnel interfaces are used when network traffic is being tunneled between the system and
another tunnel end-point in the network, before it gets routed to its final destination. VPN
tunnels are often used to implement virtual private networks (VPNs) which can secure
communication between two firewalls.
To accomplish tunneling, additional headers are added to the traffic that is to be tunneled.
Furthermore, various transformations can be applied to the network traffic depending on the
type of tunnel interface. For example, when routing traffic over an IPsec interface, the
payload is usually encrypted to achieve confidentiality.
NetDefendOS supports the following tunnel interface types:
i.
IPsec interfaces are used as end-points for IPsec VPN tunnels. More information about
this topic can be found in Section 9.3, IPsec Components.
ii.
PPTP/L2TP interfaces are used as end-points for PPTP or L2TP tunnels. More information
about this topic can be found in Section 9.5, PPTP/L2TP.
iii.
GRE interfaces are used to establish GRE tunnels. More information about this topic can
be found in Section 3.4.5, GRE Tunnels.
Warning
If an interface definition is removed from a NetDefendOS configuration, it is important
to first remove or change any references to that interface. For example, rules in the IP
rule set that refer to that interface should be removed or changed.
core indicates that it is NetDefendOS itself that will deal with traffic to and from this interface.
Examples of the use of core are when the NetDefend Firewall acts as a PPTP or L2TP server or
responds to ICMP "Ping" requests. By specifying the Destination Interface of a route as core,
NetDefendOS will then know that it is itself that is the ultimate destination of the traffic.
128
Chapter 3: Fundamentals
Disabling an Interface
Should it be desirable to disable an interface so that no traffic can flow through it, this can be
done with the CLI using the command:
gw-world:/> set Interface Ethernet <interface-name> -disable
Ethernet Frames
Devices broadcast data as Ethernet frames and other devices "listen" to determine if they are the
intended destination for any of these frames. A frame is a sequence of bits which specify the
originating device plus the destination device plus the data payload along with error checking
bits. A pause between the broadcasting of individual frames allows devices time to process each
frame before the next arrives and this pause is progressively smaller with the faster data
transmission speeds found in normal Ethernet, then Fast Ethernet and finally Gigabit Ethernet.
129
Chapter 3: Fundamentals
The specifications for different hardware models will indicate where this is the case.
Ethernet Properties
An Ethernet object in a NetDefendOS configuration corresponds to a physical Ethernet interface.
The following are the key properties that can be set for this type of object:
Interface Name
The names of the Ethernet interfaces are predefined by the system, and are mapped to the
names of the physical interfaces.
The names of the Ethernet interfaces can be changed to better reflect their usage. For
example, if an interface named dmz is connected to a wireless LAN, it might be convenient to
change the interface name to radio. For maintenance and troubleshooting, it is
recommended to tag the corresponding physical interface with the new name.
IP Address
Each Ethernet interface is required to have an Interface IP Address, which can be either a static
address or an address provided by DHCP. The interface IP address is used as the primary
address for communicating with the system through the specific Ethernet interface.
NetDefendOS IP4 Address objects are usually used to define the IPv4 addresses of Ethernet
interfaces. Those objects are normally auto-generated by the system. For more information,
please see Section 3.1.5, Auto-Generated Address Objects.
Network
In addition to the interface IP address, a Network address is also specified for an Ethernet
interface. The Network address provides information to NetDefendOS about what IP
addresses are directly reachable through the interface. In other words, those residing on the
same LAN segment as the interface itself. In the routing table associated with the interface,
NetDefendOS will automatically create a direct route to the specified network over the actual
interface.
Default Gateway
130
Chapter 3: Fundamentals
A Default Gateway address can optionally be specified for an Ethernet interface. This is
normally the address of a router and very often the router which acts as the gateway to the
Internet.
Normally, only one default all-nets route to the default gateway needs to exist in the routing
table.
ii.
iii.
iv.
v.
vi.
vii. Specify an address range for DHCP servers from which leases will be accepted.
DHCP Hostname
In some, infrequent cases a DHCP server may require a hostname to be sent by the DHCP
client.
131
Chapter 3: Fundamentals
Hardware Settings
In some circumstances it may be necessary to change hardware settings for an interface. The
available options are:
i.
The speed of the link can be set. Usually this is best left as Auto.
ii.
The MAC address can be set if it needs to be different to the MAC address built into the
hardware. Some ISP connections might require this.
Virtual Routing
To implement virtual routing where the routes related to different interfaces are kept in
separate routing table, there are a number of options:
i.
Make the interface a member of all routing tables. This option is enabled by default and
means that traffic arriving on the interface will be routed according to the main routing
table. Routes for the interface IP will be inserted into all routing tables.
ii.
The alternative to the above is to insert the route for this interface into only a specific
routing table. The specified routing table will be used for all route lookups unless
overridden by a routing rule.
i.
Add a route for this interface for the given network. This is enabled by default.
ii.
Add a default route for this interface using the given default gateway. This is enabled by
default.
MTU
This determines the maximum size of packets in bytes that can be sent on this interface. By
default, the interface uses the maximum size supported.
High Availability
There are two options which are specific to high availability clusters:
i.
ii.
Quality Of Service
132
Chapter 3: Fundamentals
The option exists to copy the IP DSCP precedence to the VLAN priority field for any VLAN
packets. This is disabled by default.
Promiscuous Mode
In most situations, an interface will run in normal, non-promiscuous mode. This means that when
an arriving packet has a destination MAC address which does not match the MAC address of the
receiving interface, the packet is discarded by the interface without being passed on to
NetDefendOS for processing. However, this behavior is incorrect with the following
NetDefendOS features:
Multicast
High Availability
OSPF
For these features, the packet needs to be passed to NetDefendOS even though there is a
mismatch of MAC addresses. To do this, promiscuous mode must be enabled on the interface but
the administrator does not need to do this manually. NetDefendOS will automatically switch an
interface to promiscuous mode when required. With multicast only, the automatic usage of
promiscuous mode can be controlled using the Ethernet object property Receive Multicast Traffic
which has a default value of Auto so the correct mode is selected by NetDefendOS.
The current mode of an Ethernet interface can be viewed by using the ifstat <ifname> command
and looking at the value for Receive Mode. This value will be Normal for non-promiscuous mode
or it will be set automatically by NetDefendOS to Promiscuous as shown in the CLI example
below (note that the output is truncated here):
gw-world:/> ifstat If1
Iface f1
Builtin e1000 - Gigabit Ethernet Bus 0 Slot 4 Port 0 IRQ 0
Media
: "Autonegotiated"
Link Status
: 100 Mbps Full Duplex
Receive Mode : Promiscuous
Change the IP address directly on the interface. For example, if we want to change the IPv4
address of the lan interface to 10.1.1.2, we could use the CLI command:
gw-world:/> set Interface Ethernet lan IP=10.1.1.2
As explained next, this way of changing the IPv4 address is not recommended.
Instead, the lan_ip object in the NetDefendOS Address Book should be assigned the new
address since it is this object that is used by many other NetDefendOS objects such as IP
rules. The CLI command to do this would be:
gw-world:/> set Address IP4Address InterfaceAddresses/lan_ip
Address=10.1.1.2
This same operation could also be done through the Web Interface.
A summary of CLI commands that can be used with Ethernet interfaces can be found in
Section 3.4.2.1, Useful CLI Commands for Ethernet Interfaces.
133
Chapter 3: Fundamentals
This changes the logical name of the interface (and all references to it) but does not change the
underlying physical name. For example, the CLI command ifstat shows the names of only the
physical interfaces and this list is unaffected by the above name change.
In the CLI, a physical interface is represented by the object EthernetInterface. To display all the
characteristics of an interface, for example for interface If1, the CLI command is:
gw-world:/> show EthernetDevice If1
The output from this command shows details about the physical Ethernet card including the bus,
slot and port number of the card as well as the Ethernet driver being used. These details are not
relevant to the logical interface object associated with the physical interface.
Value
-----------------------wan_net
0.0.0.0/0
<empty>
No
Network on interface wan
134
Chapter 3: Fundamentals
Property
--------------------Name:
Address:
UserAuthGroups:
NoDefinedCredentials:
Comments:
Value
--------------------------------wan_gw
0.0.0.0
<empty>
No
Default gateway for interface wan
By using the tab key at the end of a line, tab completion can be used to complete the command:
gw-world:/> show Address IP4Address InterfaceAddresses/wan_<tab>
[<Category>] [<Type> [<Identifier>]]:
InterfaceAddresses/wan_br
InterfaceAddresses/wan_dns1
InterfaceAddresses/wan_dns2
InterfaceAddresses/wan_gw
InterfaceAddresses/wan_ip
InterfaceAddresses/wan_net
Here, tab completion is used again at the end of the command line:
gw-world:/> set Address IP4Address<tab>
[<Category>] <Type> [<Identifier>]:
dnsserver1_ip
InterfaceAddresses/aux_ip
InterfaceAddresses/aux_net
InterfaceAddresses/dmz_ip
InterfaceAddresses/dmz_net
InterfaceAddresses/lan_ip
InterfaceAddresses/lan_net
InterfaceAddresses/wan_br timesyncsrv1_ip
InterfaceAddresses/wan_dns1
InterfaceAddresses/wan_dns2
InterfaceAddresses/wan_gw
InterfaceAddresses/wan_ip
InterfaceAddresses/wan_net
Server
Enabling DHCP
The CLI can be used to enable DHCP on the interface:
gw-world:/> set Interface Ethernet wan DHCPEnabled=yes
Modified Ethernet wan.
This command lists all Ethernet interfaces. Those defined as logical interfaces in the current
configuration are marked by a plus "+" symbol on the left of the listing.
135
Chapter 3: Fundamentals
Those interfaces that physically exist but are not part of the configuration are indicated with a
minus "-" symbol at the left. These will be deleted after the configuration is activated. If a deleted
interface in the interface list is to be restored, this can be done with the undelete command:
gw-world:/> undelete EthernetDevice <interface>
Individual interface details can be displayed, for example for the interface If1, with the command:
gw-world:/> show EthernetDevice If1
Property
--------------Name:
EthernetDriver:
PCIBus:
PCISlot:
PCIPort:
Value
---------------------If1
E1000EthernetPCIDriver
0
17
0
"
"
The set command can be used to control an Ethernet interface. For example, to disable an
interface lan, the following command can be used:
gw-world:/> set EthernetDevice lan -disable
For example, if the driver name is IXP4NPEEthernetDriver for the bus, slot, port combination 0, 0, 2
on the wan interface, the set command would be:
gw-world:/> set EthernetDevice lan
EthernetDriver=IXP4NPEEthernetDriver
PCIBus=0
PCISlot=0
PCIPort=2
This command is useful when a restored configuration contains interface names that do not
match the interface names of new hardware. By assigning the values for bus, slot, port and driver
of a physical interface to a logical interface in the configuration, the logical interface is mapped
to the physical interface. However, this mapping must be done before the configuration is
activated.
For a complete list of all CLI options see the CLI Reference Guide.
3.4.3. VLAN
Overview
Virtual LAN (VLAN) support in NetDefendOS allows the definition of one or more Virtual LAN
interfaces which are associated with a particular physical interface. These are then considered to
be logical interfaces by NetDefendOS and can be treated like any other interfaces in
NetDefendOS rule sets and routing tables.
136
Chapter 3: Fundamentals
VLANs are useful in several different scenarios. A typical application is to allow one Ethernet
interface to appear as many separate interfaces. This means that the number of physical Ethernet
interfaces on a NetDefend Firewall need not limit how many totally separated external networks
can be connected.
Another typical usage of VLANs is to group together clients in an organization so that the traffic
belonging to different groups is kept completely separate in different VLANs. Traffic can then
only flow between the different VLANs under the control of NetDefendOS and is filtered using
the security policies described by the NetDefendOS rule sets.
As explained in more detail below, VLAN configuration with NetDefendOS involves a
combination of VLAN trunks from the NetDefend Firewall to switches and these switches are
configured with port based VLANs on their interfaces. Any physical firewall interface can, at the
same time, carry both non-VLAN traffic as well VLAN trunk traffic for one or multiple VLANs.
VLAN Processing
NetDefendOS follows the IEEE 802.1Q specification. The specifies how VLAN functions by adding
a Virtual LAN Identifier (VLAN ID) to Ethernet frame headers which are part of a VLAN's traffic.
The VLAN ID is a number between 0 and 4095 which is used to identify the specific Virtual LAN to
which each frame belongs. With this mechanism, Ethernet frames can belong to different Virtual
LANs but can still share the same physical Ethernet link.
The following principles are followed when NetDefendOS processes VLAN tagged Ethernet
frames at a physical interface:
Ethernet frames received on a physical interface by NetDefendOS, are examined for a VLAN
ID. If a VLAN ID is found and a matching VLAN interface has been defined for that interface,
NetDefendOS will use the VLAN interface as the logical source interface for further rule set
processing.
If there is no VLAN ID attached to an Ethernet frame received on an interface then the source
of the frame is considered to be the physical interface and not a VLAN.
If VLAN tagged traffic is received on a physical interface and there is no VLAN defined for that
interface in the NetDefendOS configuration with a corresponding VLAN ID then that traffic is
dropped by NetDefendOS and an unknown_vlanid log message is generated.
The VLAN ID must be unique for a single NetDefendOS physical interface but the same VLAN
ID can be used on more than one physical interface. In other words, the same VLAN can span
many physical interfaces.
A physical interface does not need to be dedicated to VLANs and can carry a mixture of VLAN
and non-VLAN traffic.
137
Chapter 3: Fundamentals
One of more VLANs are configured on a physical NetDefend Firewall interface and this is
connected directly to a switch. This link acts as a VLAN trunk. The switch used must support
port based VLANs. This means that each port on the switch can be configured with the ID of
the VLAN or VLANs that a port is connected to. The port on the switch that connects to the
firewall should be configured to accept the VLAN IDs that will flow through the trunk.
In the illustration above the connections between the interfaces if1 and if2 to the switches
Switch1 and Switch2 are VLAN trunks.
Other ports on the switch that connect to VLAN clients are configured with individual VLAN
IDs. Any device connected to one of these ports will then automatically become part of the
VLAN configured for that port. In Cisco switches this is called configuring a Static-access VLAN.
On Switch1 in the illustration above, one interface is configured to be dedicated to VLAN2 and
two others are dedicated to VLAN1.
The switch could also forward trunk traffic from the firewall into another trunk if required.
More than one interface on the firewall can carry VLAN trunk traffic and these will connect to
separate switches. More than one trunk can be configured to carry traffic with the same VLAN
ID.
138
Chapter 3: Fundamentals
License Limitations
The number of VLAN interfaces that can be defined for a NetDefendOS installation is limited by
the parameters of the license used. Different hardware models have different licenses and
different limits on VLANs.
2.
3.
4.
5.
6.
Create the required route(s) for the VLAN in the appropriate routing table.
7.
Create rules in the IP rule set to allow traffic through on the VLAN interface.
It is important to understand that the administrator should treat a VLAN interface just like a
physical interface in that they require both appropriate IP rules and routes to exist in the
NetDefendOS configuration for traffic to flow through them. For example, if no IP rule with a
particular VLAN interface as the source interface is defined allowing traffic to flow then packets
arriving on that interface will be dropped.
139
Chapter 3: Fundamentals
Network=all-nets
VLANID=10
Web Interface
1.
Go to: Network > Interfaces and VPN > VLAN > Add > VLAN
2.
Now enter:
3.
Interface: lan
VLAN ID: 10
IP Address: vlan10_ip
Network: all-nets
Click OK
3.4.4. PPPoE
Point-to-Point Protocol over Ethernet (PPPoE) is a tunneling protocol used for connecting multiple
users on an Ethernet network to the Internet through a common serial interface, such as a single
DSL line, wireless device or cable modem. All the users on the Ethernet share a common
connection, while access control can be done on a per-user basis.
Internet server providers (ISPs) often require customers to connect through PPPoE to their
broadband service. Using PPPoE the ISP can:
Allocate IP address automatically for PC users (similar to DHCP). IP address provisioning can
be per user group
PPP Authentication
PPP authentication is optional with PPP. Authentication protocols supported are Password
140
Chapter 3: Fundamentals
Authentication Protocol (PAP), Challenge Handshake Authentication Protocol (CHAP) and Microsoft
CHAP (version 1 and 2). If authentication is used, at least one of the peers has to authenticate
itself before the network layer protocol parameters can be negotiated using NCP. During the LCP
and NCP negotiation, optional parameters such as encryption, can be negotiated.
IP address information
PPPoE uses automatic IP address allocation which is similar to DHCP. When NetDefendOS
receives this IP address information from the ISP, it stores it in a network object and uses it as the
IP address of the interface.
User authentication
If user authentication is required by the ISP, the username and password can be setup in
NetDefendOS for automatic sending to the PPPoE server.
Dial-on-demand
If dial-on-demand is enabled, the PPPoE connection will only be up when there is traffic on the
PPPoE interface. It is possible to configure how the firewall should sense activity on the interface,
either on outgoing traffic, incoming traffic or both. Also configurable is the time to wait with no
activity before the tunnel is disconnected.
Unnumbered PPPoE
When NetDefendOS acts as a PPPoE client, support for unnumbered PPPoE is provided by default.
The additional option also exists to force unnumbered PPPoE to be used in PPPoE sessions.
Unnumbered PPPoE is typically used when ISPs want to allocate one or more preassigned IP
addresses to users. These IP addresses are then manually entered into client computers. The ISP
does not assign an IP address to the PPPoE client at the time it connects.
A further option with the unnumbered PPPoE feature in NetDefendOS is to allow the
specification of a single IP address which is used as the address of the PPPoE client interface. This
address can serve the following purposes:
The IP address specified will be sent to the PPPoE server as the "preferred IP". If unnumbered
PPPoE is not forced, the server may choose to not accept the preferred IP and instead assign
another IP address to the PPPoE client.
When the option to force unnumbered PPPoE is selected, the client (that is to say
141
Chapter 3: Fundamentals
The IP address specified, or possibly the address assigned by the PPPoE server when
unnumbered PPPoE is not forced, will serve as the IP address of the PPPoE client interface.
This will be used as the local IP address for traffic leaving the interface when the traffic is
originated or NATed by the NetDefend Firewall.
Web Interface
1.
Go to: Network > Interfaces and VPN > PPPoE > Add > PPPoE Tunnel
2.
Then enter:
Name: PPPoEClient
Remote Network: all-nets (as we will route all traffic into the tunnel)
142
Chapter 3: Fundamentals
3.
Under Advanced, if Add route for remote network is enabled then a new route will be
added for the interface
Click OK
Using GRE
GRE is typically used to provide a method of connecting two networks together across a third
network such as the Internet. The two networks being connected together communicate with a
common protocol which is tunneled using GRE through the intervening network. Examples of
GRE usage are:
Where a UDP data stream is to be multicast and it is necessary to transit through a network
device which does not support multicasting. GRE allows tunneling through the network
device.
Setting Up GRE
Like other tunnels in NetDefendOS such as an IPsec tunnel, a GRE Tunnel is treated as a logical
interface by NetDefendOS, with the same filtering, traffic shaping and configuration capabilities
as a standard interface. The GRE options are:
IP Address
This is the IPv4 address of the inside of the tunnel on the local side. This cannot be left blank
and must be given a value.
The specified IP address is then used for the following:
143
Chapter 3: Fundamentals
i.
ii.
Log messages related to the tunnel will be generated with this IP address as the source.
iii.
If NAT is being used then it will not be necessary to set the source IP on the IP rule that
performs NAT on traffic going through the tunnel. This IP address will be used as the
source address for NAT.
Remote Network
The remote network which the GRE tunnel will connect with.
Remote Endpoint
This is the IPv4 address of the remote device which the tunnel will connect with.
Automatically add route for remote network - This option would normally be checked in
order that the routing table is automatically updated. The alternative is to manually create
the required route.
144
Chapter 3: Fundamentals
The diagram above shows a typical GRE scenario, where two NetDefend Firewalls A and B must
communicate with each other through the intervening internal network 172.16.0.0/16.
Any traffic passing between A and B is tunneled through the intervening network using a GRE
tunnel and since the network is internal and not public there is no need for encryption.
2.
remote_net_B: 192.168.11.0/24
remote_gw: 172.16.1.1
ip_GRE: 192.168.0.1
Create a GRE Tunnel object called GRE_to_B with the following parameters:
IP Address: ip_GRE
3.
Define a route in the main routing table which routes all traffic to remote_net_B on the
GRE_to_B GRE interface. This is not necessary if the option Add route for remote network
is enabled in the Advanced tab, since this will add the route automatically.
4.
Create the following rules in the IP rule set that allow traffic to pass through the tunnel:
Name
Action
Src Int
Src Net
Dest Int
Dest Net
Service
To_B
Allow
lan
lannet
GRE_to_B
remote_net_B
all_services
From_B
Allow
GRE_to_B
remote_net_B
lan
lannet
all_services
145
Chapter 3: Fundamentals
2.
remote_net_A: 192.168.10.0/24
remote_gw: 172.16.0.1
ip_GRE: 192.168.0.2
Create a GRE Tunnel object called GRE_to_A with the following parameters:
IP Address: ip_GRE
3.
Define a route in the main routing table which routes all traffic to remote_net_A on the
GRE_to_A GRE interface. This is not necessary if the option Add route for remote network
is enabled in the Advanced tab, since this will add the route automatically.
4.
Create the following rules in the IP rule set that allow traffic to pass through the tunnel:
Name
Action
Src Int
Src Net
Dest Int
Dest Net
Service
To_A
Allow
lan
lannet
GRE_to_A
remote_net_A
all_services
From_A
Allow
GRE_to_A
remote_net_A
lan
lannet
all_services
This will show us what is happening with the tunnel and the ifstat command options can provide
various details.
Chapter 3: Fundamentals
type. A group might consist, for example, of a combination of two Ethernet interfaces and four
VLAN interfaces.
Web Interface
1.
Go to: Network > Interfaces and VPN > Interface Groups > Add > InterfaceGroup
2.
3.
Click OK
147
Chapter 3: Fundamentals
3.5. ARP
3.5.1. Overview
Address Resolution Protocol (ARP) allows the mapping of a network layer protocol (OSI layer 3)
address to a data link layer hardware address (OSI layer 2). In data networks it is used to resolve
an IPv4 address into its corresponding Ethernet address. ARP operates at the OSI layer 2, data link
layer, and is encapsulated by Ethernet headers for transmission.
IPv4 Address
Ethernet Address
Expires
Dynamic
192.168.0.10
08:00:10:0f:bc:a5
45
Dynamic
193.13.66.77
0a:46:42:4f:ac:65
136
Publish
10.5.16.3
4a:32:12:6c:89:a4
The first entry in this ARP Cache is a dynamic ARP entry which tells us that IPv4 address
192.168.0.10 is mapped to an Ethernet address of 08:00:10:0f:bc:a5.
The second entry in the table dynamically maps the IPv4 address 193.13.66.77 to Ethernet
address 0a:46:42:4f:ac:65.
The third entry is a static ARP entry binding the IPv4 address 10.5.16.3 to Ethernet address
4a:32:12:6c:89:a4.
148
Chapter 3: Fundamentals
= 1000:0000:4009
= 0002:a529:1f65
Expire=196
Expire=506
149
Chapter 3: Fundamentals
Usage
Publishing may be done for a number of reasons:
To give the impression that an interface in NetDefendOS has more than one IP address.
This is useful if there are several separate IP spans on a single LAN. The hosts on each IP span
may then use a gateway in their own span when these gateway addresses are published on
the corresponding NetDefendOS interface.
An ARP object can be created for any interface by defining a single address which is to be ARP
published on that interface.
When a static route is created for an IPv4 address or network, the route option called Proxy
ARP can be used to publish the address or network on all or selected interfaces.
Using ARP objects, single IP addresses only can be published one at a time. However, the
Proxy ARP feature can publish entire networks. It also provides a single step to publish on all
interfaces.
150
Chapter 3: Fundamentals
Proxy ARP is covered in Section 4.2.6, Proxy ARP and is not discussed further in this section.
The type of ARP object. As explained above, this can be one of:
Interface
IP Address
MAC Address
The MAC address for the MAC/IP mapping. If it is omitted, the MAC address of
the Ethernet interface is used.
The three publishing mode options for ARP objects of Static, Publish and XPublishare further
explained next.
151
Chapter 3: Fundamentals
The MAC address in the Ethernet frame of the Ethernet interface sending the response.
2.
The MAC address in the ARP response which is contained within this frame. This is usually
the same as (1) the source MAC address in the Ethernet frame but does not have to be.
These are shown in the illustration below of an Ethernet frame containing an ARP response:
The Publish option uses the real MAC address of the sending interface for the address (1) in the
Ethernet frame.
In rare cases, some network equipment will require that both MAC addresses in the response (1
and 2 above) are the same. In this case XPublish is used since it changes both MAC addresses in
the response to be the published MAC address. In other words, XPublish "lies" about the source
address of the ARP response.
If a published MAC address is the same as the MAC address of the physical interface, it will make
no difference if Publish or XPublish is selected, the result will be the same.
152
Chapter 3: Fundamentals
Web Interface
1.
Go to: Network > Interfaces and VPN > ARP/NeighborDiscovery > Add >
ARP/NeighborDiscovery
2.
3.
4.
Mode: Static
Interface: lan
IP Address: 192.168.10.15
MAC: 4b-86-f6-c5-a2-14
Click OK
153
Chapter 3: Fundamentals
ARP Requests
The ARP specification states that a host should update its ARP Cache with data from ARP
requests received from other hosts. However, as this procedure can facilitate hijacking of local
connections, NetDefendOS will normally not allow this.
To make the behavior compliant with the RFC 826 specification, the administrator can modify
the setting ARP Requests. Even if this is set to Drop (meaning that the packet is discarded
without being stored), NetDefendOS will reply to it provided that other rules approve the
request.
Sender IP 0.0.0.0
NetDefendOS can be configured for handling ARP queries that have a sender IP of 0.0.0.0. Such
sender IPs are never valid as responses, but network units that have not yet learned of their IP
address sometimes ask ARP questions with an "unspecified" sender IP. Normally, these ARP
replies are dropped and logged, but the behavior can be changed by modifying the setting ARP
Query No Sender.
Chapter 3: Fundamentals
but network units that have not yet learned of their IP address sometimes ask ARP questions with
an "unspecified" sender IP.
Default: DropLog
ARP Sender IP
Determines if the IP sender address must comply with the rules in the Access section.
Default: Validate
ARP Requests
Determines if NetDefendOS will automatically add the data in ARP requests to its ARP table. The
ARP specification states that this should be done, but as this procedure can facilitate hijacking of
local connections, it is not normally allowed. Even if ARPRequests is set to "Drop", meaning that
the packet is discarded without being stored, NetDefendOS will, provided that other rules
approve the request, reply to it.
Default: Drop
ARP Changes
Determines how NetDefendOS will deal with situations where a received ARP reply or ARP
request would alter an existing item in the ARP table. Allowing this to take place may facilitate
hijacking of local connections. However, not allowing this may cause problems if, for example, a
network adapter is replaced, as NetDefendOS will not accept the new address until the previous
ARP table entry has timed out.
Default: AcceptLog
155
Chapter 3: Fundamentals
ARP Expire
Specifies how long a normal dynamic item in the ARP table is to be retained before it is removed
from the table.
Default: 900 seconds (15 minutes)
ARP Multicast
Determines how NetDefendOS is to deal with ARP requests and ARP replies that state that they
are multicast addresses. Such claims are usually never correct, with the exception of certain load
balancing and redundancy devices, which make use of hardware layer multicast addresses.
Default: DropLog
ARP Broadcast
Determines how NetDefendOS deals with ARP requests and ARP replies that state that they are
broadcast addresses. Such claims are usually never correct.
Default: DropLog
ARP IP Collision
156
Chapter 3: Fundamentals
Determines the behavior when receiving an ARP request with a sender IP address that collides
with one already used on the receive interface. Possible actions: Drop or Notify.
Default: Drop
157
Chapter 3: Fundamentals
Source Network
Destination Interface
Destination Network
Service
IP Rules
IP Rule objects determine which traffic is permitted to pass through the NetDefend Firewall as
well as determining if the traffic is subject to address translation. The network filter for these
rules can be IPv4 or IPv6 addresses (but not both in a single rule). They are described further
later in this section.
IP Policies
The IP Policy object is an alternative to using IP Rule objects. They are designed to simply the
158
Chapter 3: Fundamentals
creation of policies and make it easier to define such common tasks as address translation. IP
Policy objects are implemented in the background by IP Rule objects and one IP Policy may
correspond to more than one IP Rule.
Pipe Rules
These determine which traffic triggers traffic shaping to take place and are described in
Section 10.1, Traffic Shaping.
Authentication Rules
These determine which traffic triggers authentication to take place (source net/interface
only) and are described in Chapter 8, User Authentication.
To provide the best security, the first of these approaches is adopted by NetDefendOS. This
means that when first installed and started, the NetDefendOS has no rules defined in the main IP
rule set and all traffic is therefore dropped. In order to permit any traffic to traverse the
NetDefend Firewall (as well as allowing NetDefendOS to respond to ICMP Ping requests), some IP
rules must be defined by the administrator.
Each IP rule or IP policy that is added by the administrator will define the following basic filtering
criteria:
What action the rule will take when a match on the filter triggers.
159
Chapter 3: Fundamentals
For a source or destination network, the all-nets option is equivalent to the IP address
0.0.0.0/0 which will mean that any IP address is acceptable.
For source or destination interface, the any option can be used so that NetDefendOS will not
care about the interface which the traffic is going to or coming from.
The destination interface can be specified as core. This means that traffic, such as an ICMP
Ping, is destined for the NetDefend Firewall itself and NetDefendOS will respond to it.
New connections that are initiated by NetDefendOS itself do not need an explicit IP rule as
they are allowed by default. For this reason, the interface core is not used as the source
interface. Such connections include those needed to connect to the external databases
needed for such NetDefendOS features as IDP and dynamic web content filtering.
The Service can be specified as all_services which includes all possible protocols.
Tip: Include the rule set name in the drop all name
There may be several IP rule sets in use. It is recommended to include the IP rule set name
in the name of the drop all rule so it can be easily identified in log messages.
For example, the drop all rule for the main rule set should be called main_drop_all or
similar.
Action
Source Iface
Source Net
Dest Iface
Dest Net
Service
DropAll
Drop
any
all-nets
any
all-nets
all_services
DropAll6
Drop
any
all-nets6
any
all-nets6
all_services
For further discussion of this topic, see Section 3.2, IPv6 Support.
A route must exist in a NetDefendOS routing table which specifies on which interface packets
should leave in order to reach their destination.
160
Chapter 3: Fundamentals
A second route must also exist that indicates the source of the traffic is found on the interface
where the packets enter.
An IP rule in a NetDefendOS IP rule set which specifies the security policy that allows the
packets from the source interface and network bound for the destination network to leave
the NetDefend Firewall on the interface decided by the route.
If the IP rule used is an Allow rule then this is bi-directional by default.
The ordering of these steps is important. The route lookup occurs first to determine the exiting
interface and then NetDefendOS looks for an IP rule that allows the traffic to leave on that
interface. If a rule does not exist then the traffic is dropped.
This description of traffic flow is an extremely simplified version of the full flow description found
in Section 1.3, NetDefendOS State Engine Packet Flow.
For example, before the route lookup is done, NetDefendOS first checks that traffic from the
source network should, in fact, be arriving on the interface where it was received. This is done by
NetDefendOS performing a reverse route lookup which means that the routing tables are
searched for a route that indicates the network should be found on that interface.
This second route should logically exist if a connection is bi-directional and it must have a pair of
routes associated with it, one for each direction.
161
Chapter 3: Fundamentals
Stateful Inspection
After initial rule evaluation of the opening connection, subsequent packets belonging to that
connection will not need to be evaluated individually against the rule set. Instead, a much faster
search of the state table is performed for each packet to determine if it belongs to an established
connection.
This approach to packet processing is known as stateful inspection and is applied not only to
stateful protocols such as TCP but is also applied to stateless protocols such as UDP and ICMP by
using the concept of "pseudo-connections" . This approach means that evaluation against the IP
rule set is only done in the initial opening phase of a connection. The size of the IP rule set
therefore has negligible effect on overall throughput.
Non-matching Traffic
Incoming packets that do not match any rule in the rule set and that do not have an already
opened matching connection in the state table, will automatically be subject to a Drop action. As
mentioned above, to be able to log non-matching traffic, it is recommended to create an explicit
rule called DropAll as the final rule in the rule set with an action of Drop with Source/Destination
Network all-nets and Source/Destination Interface all. This allows logging to be turned on for
traffic that matches no IP rule.
Source Interface
Source Network
Destination Interface
Destination Network
Service
162
Chapter 3: Fundamentals
When an IP rule is triggered by a match then one of the following Actions can occur:
Allow
The packet is allowed to pass. As the rule is applied to only the opening of a
connection, an entry in the "state table" is made to record that a connection is open.
The remaining packets related to this connection will pass through the
NetDefendOS "stateful engine".
FwdFast
Let the packet pass through the NetDefend Firewall without setting up a state for it
in the state table. This means that the stateful inspection process is bypassed and is
therefore less secure than Allow or NAT rules. Packet processing time is also slower
than Allow rules since every packet is checked against the entire rule set.
NAT
This functions like an Allow rule, but with dynamic address translation (NAT) enabled
(see Section 7.2, NAT in Chapter 7, Address Translation for a detailed description).
SAT
This tells NetDefendOS to perform static address translation. A SAT rule always
requires a matching Allow, NAT or FwdFast IP rule further down the rule set (see
Section 7.4, SAT in Chapter 7, Address Translation for a detailed description).
Drop
Reject
This acts like Drop but will return a TCP RST or ICMP Unreachable message, informing
the sending computer that the packet was dropped. This is a "polite" version of the
Drop IP rule action.
Reject is useful where applications that send traffic wait for a timeout to occur before
realizing that the traffic was dropped. If an explicit reply is sent indicating that the
traffic was dropped, the application need not wait for the timeout.
Logging
When an IP Rule or IP Policy object is created the default is that logging is enabled. This means
that a log message is generated whenever either is triggered. This behavior can be altered by
disabling logging on the individual rule or policy object.
Bi-directional Connections
A common mistake when setting up IP Rules is to define two rules, one rule for traffic in one
direction and another rule for traffic coming back in the other direction. In fact nearly all IP Rules
types allow bi-directional traffic flow once the initial connection is set up. The Source Network
and Source Interface in the rule means the source of the initial connection request. If a
connection is permitted and then becomes established, traffic can flow in either direction over it.
The exception to this bi-directional flow is FwdFast rules. If the FwdFast action is used, the rule
will not allow traffic to flow from the destination back to the source. If bi-directional flow is
163
Chapter 3: Fundamentals
required then two FwdFast rules are needed, one for either direction. This is also the case if a
FwdFast rule is used with a SAT rule.
Using Reject
In certain situations the Reject action is recommended instead of the Drop action because a
"polite" reply is required from NetDefendOS. An example of such a situation is when responding
to the IDENT user identification protocol. Some applications will pause for a timeout if Drop is
used and Reject can avoid such processing delays.
Delete
This will remove the rule permanently from the rule set.
Disable/Enable
This allows the rule to be disabled but left in the rule set. While disabled
the rule set line will not affect traffic flow and will appear grayed out in the
user interface. It can be re-enabled at any time.
Move options
The last section of the context menu allows the rule to be moved to a
different position in the rule set and therefore have a different precedence
164
Chapter 3: Fundamentals
2.
3.
Now enter:
4.
Action: Allow
Service: http
Click OK
165
Chapter 3: Fundamentals
A Simple Example
As an example, consider the IP rule set main which contains just two rules to allow web surfing
from an internal network and a third Drop-all rule to catch any other traffic so that it can be
logged:
Note
The screen images used in this example show just the first few columns of the object
properties.
If it is desirable to create an object group for the two IP rules for web surfing, this is done with the
following steps:
Select the first object to be in the new group by right clicking it.
A group is now created with a title line and the IP rule as its only member. The default title of
"(new Group)" is used.
The entire group is also assigned a default color and the group member is also indented. The
object inside the group retains the same index number to indicate its position in the whole
table. The index is not affected by group membership. The group title line does not have or
need an index number since it is only a textual label.
166
Chapter 3: Fundamentals
In this example, we might change the name of the group to be Web surfing and also change the
group color to green. The resulting group display is shown below:
167
Chapter 3: Fundamentals
Once we do this for the second IP rule in our example then the result will be the following:
To add any object to the group we must first position it immediately following the group and
then select the Join Preceding option. This is explained in more detail next.
ii.
Enter the index of the position immediately following the target group.
iii.
After the object has been moved to the new position, right click the object again and select
the Join Preceding option.
Moving Groups
Groups can be moved in the same way as individual objects. By right clicking the group title line,
the context menu includes options to move the entire group. For example, the Move to Top
option moves the entire group to the top of the table.
Leaving a Group
If an object in a group is right clicked then the context menu contains the option Leave Group.
Selecting this removes the object from the group AND moves it down to a position immediately
following the group.
Removing a Group
By right clicking on a group title, the displayed context menu includes the Ungroup option. This
removes the group, however all the group's member objects remain. The group title line
168
Chapter 3: Fundamentals
disappears and the individual members appear unindented in the normal ungrouped color.
Individual object index positions within the table are not affected.
A group is also removed if there are no members left. If there is only one member of a group,
when this leaves the group, the group will no longer exist and the title line will disappear..
3.6.7. IP Policies
The IP Rule objects described previously provide very finely grained control over how arriving
traffic is handled by NetDefendOS. The IP Policy object provides the ability to achieve the same
results as IP rules but in a more intuitive way so that simple policies can be quickly defined.
The aim with an IP policy is to hide some of the potential complexities of IP rules. For example, a
NAT policy might require several IP rules but may be achievable with a single IP policy. The
several IP rules are still created in the background but the administrator is only aware of the IP
policy object.
It is up to the administrator to decide if they will use an IP rule or an IP policy to describe what is
required from NetDefendOS. Where there is a choice, using an IP policy is recommended.
Creating IP Policies
An IP policy has the following basic properties:
Service
This identifies the type of protocol for the policy. When using an IP policy with certain
options, only services that have the Protocol property set can be used. These are listed below.
Policy Options
The traffic identified by the filter is subject to one of more of possible options. These are:
i.
ii.
Anti-Virus - An Anti-Virus policy can be selected. This requires a Service object with the
Protocol property set.
169
Chapter 3: Fundamentals
iii.
Web Content Filtering - A WCF policy can be selected. This requires a Service object with
the Protocol property set.
iv.
Application Control - An Application Control policy can be selected. Any Service object
can be used with this option.
v.
URL Filter - When the service includes the protocols HTTP and/or HTTPS, this can be
selected to whitelist or blacklist URLs. This requires a Service object with the Protocol
property set.
vi.
File Control - This can block or allow specific filetypes. It is only applicable to the HTTP,
SMTP, POP3 and FTP protocols. This requires a Service object with the Protocol property
set.
vii. Advanced Actions - It is possible to specify the Reject action for denied connections (no
acknowledgement is sent to the source host).
170
Chapter 3: Fundamentals
Web Interface
1.
2.
Now enter:
3.
Name: lan_to_dmz
Action: Allow
Service: http-all
Select OK
Web Interface
1.
2.
Now enter:
Name: http_to_server
Action: Allow
171
Chapter 3: Fundamentals
Service: http-all
3.
4.
5.
These two methods of configuring application control and these are examined next.
Enable application control, select the option to use manual configuration and add the
applications that are to be allowed or denied.
If the Deny option is selected but no applications are selected then everything is allowed. If
the Allow option is selected but no applications are selected then nothing will be allowed.
172
Chapter 3: Fundamentals
This creates a list with a designation of 1. Next, the list is used in an IP rule.
gw-world:/> add IPRule Action=Allow
SourceInterface=lan
SourceNetwork=lannet
DestinationInterface=all
DestinationNetwork=all-nets
Service=all_services
AppControl=Yes
AC_AppAction=Deny
AC_Applications=1
Name=Allow_Comp
Web Interface
1.
2.
3.
Now enter:
4.
5.
Action: Allow
Service: all_services
Using the Add button, select yahoo_groups and google_groups from the application
definitions.
Click OK
173
Chapter 3: Fundamentals
Authentication Settings
For an Allow rule, the requesting client is only permitted the connection if they already been
authenticated by NetDefendOS and are one of the usernames specified for the rule or belong
to one of the specified groups.
For a Deny rule, the requesting client is denied the connection if they are authenticated and
are one of the usernames specified or belong to one of the specified groups.
Authentication may have performed using any of the methods available in NetDefendOS
Authentication Rule objects, including Identity Awareness.
If no groups or usernames are specified in the rule, authentication is ignored.
Assume that this filter list is the third filter list created and is therefore assigned the list number 3.
All filters can be displayed with the command:
gw-world:/> appcontrol -show_lists
174
Chapter 3: Fundamentals
gw-world:/bt_app_list>
gw-world:/>
Web Interface
First, define the Application Rule Set:
1.
Go to: Policies > Firewalling > Application Control > Add > Application Rule Set
2.
3.
4.
Click OK
Go to: Policies > Firewalling > Application Control > bt_app_list > Add > Application
Rule
2.
3.
Enable Application Control and add the signatures bittorrentandutp (both are required for
BitTorrent).
4.
175
Chapter 3: Fundamentals
5.
Select Traffic Shaping Settings and move the pipe narrow_025_pipe into the Selected list
for both the Forward chain and Return chain
6.
Click OK
2.
3.
4.
In the dialog:
5.
Click OK
If tab completion is used after the command, all the definition families are displayed. For
example:
gw-world:/> appcontrol <tab>
antivirus/
application_service/
audio_video/
authentication/
compression/
database/
encrypted/
erp/
file_server/
file_transfer/
forum/
game/
instant_messaging/
mail/
messenger/
microsoft_office/
middleware/
music_player/
network_management/
network_service/
peer_to_peer/
printer/
qosmos/
routing/
security_service/
telephony/
terminal/
thin_client/
tunneling/
unclassified/
wap/
web/
webmail/
These families consist of the individual definitions. For example, to view the two definitions in
the compression family, use the command:
176
Chapter 3: Fundamentals
To view a single definition, the individual name can be used without the family. For example, to
display the comp definition within the compression family:
gw-world:/> appcontrol comp
comp - Compression
COMP protocol is used for data compression over PPP.
Family:
Risk Level:
Tags:
Revision:
Enabled:
Compression
1 - Very low risk
0
Yes
The Tags and Risk Level add further information to each definition but are not part of the
definition herarchy. The Risk Level indicates the degree of threat that this particular application
poses. The Tags provide more information about the data traffic related to the application, for
example High Bandwidth might be a typical tag.
It is possible to search the definition database by using any of the filter parameters:
name
family
name
risk
tag
The name parameter must always be the first in a search but the asterisk "*" character can be
used as a wildcard. For example:
gw-world:/> appcontrol -name=* -family=mail -risk=HIGH
As demonstrated earlier, the -save_list option is used to save a filter list so it can be used with IP
rules and IP policies.
Managing Filters
As shown in the application example above for controlling BitTorrent, the appcontrol CLI
command is also used to create saved filters which are then used with the CLI in ApplicationRule
objects. For example, the following will create a saved filter for BitTorrent:
gw-world:/> appcontrol -filter -application=bittorrent,utp -save_list
The -application parameter specifies the individual signatures by name. An alternative is to use
the -name parameter which allows wildcarding and searches the signatures names looking for
character pattern matches. For example, we could have specified:
gw-world:/> appcontrol -filter -name=bit* -save_list
All the signatures with names that begin with the prefix bit would have been selected. It would
not have been possible to select bittorrent and utp using the -name parameter.
177
Chapter 3: Fundamentals
To delete all saved filters, use the command: All the saved filters can be deleted with the
command:
gw-world:/> appcontrol -delete_lists=all
Individual saved filters can be deleted by specifying the number of the filter after -delete_lists=.
Risk Guidelines
The following are guidelines for how the risk parameter for each application control signature
should be viewed by the administrator:
Risk Level 5
Very high risk. This traffic should be blocked unless special circumstances or requirements
exist. For example, PHP-, CGI-, HTTPS-proxies; known attack sites.
Risk Level 4
High risk. This traffic should be reviewed and a block or allow action taken. Site-to-site
tunnelling should be used where possible. For example, SSH, LDAP, RADIUS, Dropbox and
similar.
Risk Level 3
Medium risk. Signatures with this risk level can affect network security, bandwidth usage and
company integrity if care is not taken. For example, Facebook and other social networks,
Google Analytics and similar aggregators, P2P/filesharing
Risk Level 2
Moderate risk. Signatures with this risk level can affect network security and/or affect
bandwidth usage. For example, video streaming sites, Java/Flash game sites
Risk Level 1
Low-risk. Signatures that could be candidates for blocking. Typically not a threat. For
example, E-commerce sites, news portals.
Chapter 3: Fundamentals
Application control is a subscription service, so the expiry date for the feature may be different to
the expiry date of the license itself. Should the application control subscription expire, the
following will happen if application control has been configured on any IP Policy objects:
Application control will continue to function so that traffic continues to flow through
NetDefendOS but, whenever it triggers, the data type will be set to Unknown.
For example, if the administrator had configured BitTorrent traffic to be dropped, it will no
longer be dropped because it has been recognized and then reclassified as Unknown traffic.
The current status of application control licensing can be viewed with the Web Interface by
going to Status > Maintenance > License.
179
Chapter 3: Fundamentals
3.7. Schedules
In some scenarios, it might be useful to control not only what functionality is enabled, but also
when that functionality is being used.
For instance, the IT policy of an enterprise might stipulate that web traffic from a certain
department is only allowed access outside that department during normal office hours. Another
example might be that authentication using a specific VPN connection is only permitted on
weekdays before noon.
Schedule Objects
NetDefendOS addresses this requirement by providing Schedule objects (often referred to as
simply schedules) that can be selected and used with various types of security policies to
accomplish time-based control.
Schedule Parameters
Each schedule object consists of the following parameters:
Name
The name of the schedule. This is used in user interface display and as a
reference to the schedule from other objects.
Scheduled Times
These are the times during each week when the schedule is applied.
Times are specified as being to the nearest hour. A schedule is either
active or inactive during each hour of each day of a week.
Start Date
If this option is used, it is the date after which this schedule object
becomes active.
End Date
If this option is used, it is the date after which this schedule object is no
longer active.
Comment
This functionality is not limited to IP Rules, but is valid for most types of policies, including Traffic
Shaping rules, Intrusion Detection and Prevention (IDP) rules and Virtual Routing rules. including
Traffic Shaping rules and Intrusion Detection and Prevention (IDP) rules. A Schedule object is, in
other words, a very powerful component that can allow detailed regulation of when functions in
NetDefendOS are enabled or disabled.
180
Chapter 3: Fundamentals
policies will be enabled and disabled at the right time. For more information, please see
Section 3.9, Date and Time.
2.
Name: OfficeHours
3.
4.
Click OK
1.
2.
3.
Name: AllowHTTP
Action: NAT
Service: http
Schedule: OfficeHours
SourceInterface: lan
181
Chapter 3: Fundamentals
4.
SourceNetwork lannet
DestinationInterface: any
DestinationNetwork: all-nets
Click OK
182
Chapter 3: Fundamentals
3.8. Certificates
3.8.1. Overview
The X.509 Standard
NetDefendOS supports digital certificates that comply with the ITU-T X.509 standard. This
involves the use of an X.509 certificate hierarchy with public-key cryptography to accomplish key
distribution and entity authentication. References in this document to certificates mean X.509
certificates.
When distributed to another party, a certificate performs two functions:
A certificate acts as a digital proof of identity. It links an identity to a public key in order to
establish whether a public key truly belongs to the supposed owner. By doing this, it prevents
data transfer interception by a malicious third-party who might post a fake key with the name
and user ID of an intended recipient.
Certificate Components
A certificate consists of the following:
A public key.
Digital signatures that verify that the information enclosed in the certificate has been verified
by a CA.
By binding the above information together, a certificate is a public key with identification
attached, coupled with a stamp of approval by a trusted party.
Certificate Authorities
A certificate authority (CA) is a trusted entity that issues certificates to other entities. The CA
digitally signs all certificates it issues. A valid CA signature in a certificate verifies the identity of
the certificate holder, and guarantees that the certificate has not been tampered with by any
third party.
A CA is responsible for making sure that the information in every certificate it issues is correct. It
also has to make sure that the identity of the certificate matches the identity of the certificate
holder.
183
Chapter 3: Fundamentals
Certificate Chains
A CA can also issue certificates to other CAs. This leads to a chain-like certificate hierarchy. The
highest certificate is called the Root Certificate and it is signed by the Root CA. Each certificate in
the chain is signed by the CA of the certificate directly above it in the chain. However, the root
certificate is signed by itself (it is "self-signed"). Certificates in the chain between the root
certificate and the end certificate are called Intermediate Certificates.
A Certification Path refers to the path of certificates from one certificate to another. When
verifying the validity of a user certificate, the entire path from the user certificate up to the
trusted root certificate has to be examined before establishing the validity of the user certificate.
The CA certificate is just like any other certificate, except that it allows the corresponding private
key to sign other certificates. Should the private key of the CA be compromised, the whole CA,
including every certificate it has signed, is also compromised.
Chained certificates are supported in the following NetDefendOS features:
IPsec VPN.
SSL VPN.
In NetDefendOS IPsec VPN, the maximum length of a certificate chain is 4. In VPN scenarios with
roaming clients, the client's certificate will be the bottom of the certificate chain.
Validity Time
A certificate is not valid forever. Each certificate contains values for two points in time between
which the certificate is valid. When this validity period expires, the certificate can no longer be
used and a new certificate must be issued.
184
Chapter 3: Fundamentals
A Certificate Revocation List (CRL) contains a list of all certificates that have been canceled before
their expiration date. They are normally held on an external server which is accessed to
determine if the certificate is still valid. The ability to validate a user certificate in this way is a key
reason why certificate security simplifies the administration of large user communities.
CRLs are published on servers that all certificate users can access, using either the LDAP or HTTP
protocols. Revocation can happen for several reasons. One reason could be that the keys of the
certificate have been compromised in some way, or perhaps that the owner of the certificate has
lost the rights to authenticate using that certificate, perhaps because they have left the
company. Whatever the reason, server CRLs can be updated to change the validity of one or
many certificates.
Certificates often contain a CRL Distribution Point (CDP) field, which specifies the location from
where the CRL can be downloaded. In some cases, certificates do not contain this field. In those
cases the location of the CRL has to be configured manually.
A CA usually updates its CRL at a given interval. The length of this interval depends on how the
CA is configured. Typically, this is somewhere between an hour to several days.
Trusting Certificates
When using certificates, NetDefendOS trusts anyone whose certificate is signed by a given CA.
Before a certificate is accepted, the following steps are taken to verify the validity of the
certificate:
Fetch the CRL for each certificate to verify that none of the certificates have been revoked.
Identification Lists
In addition to verifying the signatures of certificates, NetDefendOS also employs identification
lists. An identification list is a list naming all the remote identities that are allowed access through
a specific VPN tunnel, provided the certificate validation procedure described above succeeded.
Other Considerations
A number of other factors should be kept in mind when using certificates:
If Certificate Revocation Lists (CRLs) are used then the CRL distribution point is defined as an
FQDN (for example, caserver.somecompany.com) which must be resolved to an IP address
using a public DNS server. At least one DNS server that can resolve this FQDN should
therefore be defined in NetDefendOS.
Do not get the Host Certificate files and Root Certificate files mixed up. Although it is not
possible to use a Host Certificate in NetDefendOS as a Root Certificate, it is possible to
accidentally use a Host Certificate as a Root Certificate.
Certificates have two files associated with them and these have the filetypes .key file and .cer.
185
Chapter 3: Fundamentals
The filename of these files must be the same for NetDefendOS to be able to use them. For
example, if the certificate is called my_cert then the files my_cert.key and my_cert.cer.
Uploading Certificates
Certificates can be uploaded to NetDefendOS in one of two ways:
The following command lines show how a typical SCP utility might upload a certificate consisting
of the two files called cert-1.cer and cert-1.key to a firewall which has the management IP address
192.168.3.1:
> scp C:\cert-1.cer [email protected]:certificate/MyCert
The certificate object name in NetDefendOS is MyCert for the certificate and this is how it is
referenced by other objects in the configuration.
All certificate uploads should be followed by the configuration being activated since it has been
changed with new objects.
Example 3.27. Uploading a Certificate with Web Interface
The certificate may either be self-signed or belonging to a remote peer or CA server.
Web Interface
1.
2.
3.
4.
Chapter 3: Fundamentals
they must be explicitly associated with a NetDefendOS object. For example, an IPsec tunnel
object that uses certificates must be assigned a Gateway and Root certificate.
Example 3.28. Associating Certificates with IPsec Tunnels
To associate an imported certificate with an IPsec tunnel.
Web Interface
1.
2.
3.
Select Authentication
4.
5.
6.
Click OK
Create a gateway certificate on the Windows CA server and export it as a file in the .pfx format.
Take out the relevant parts of the .pem file to form the required .cer and .key files.
Create the gateway certificate on the Windows CA server and export it to a .pfx file on the
local NetDefendOS management workstation disk.
2.
Now convert the local .pfx file to a .pem file. This can be done with the OpenSSL utility using
the console command line:
> openssl pkcs12 -in gateway.pfx -out gateway.pem -nodes
In this command line example, the file exported from the CA server is assumed to be called
gateway.pfx and it is assumed to be in the same local directory as the OpenSSL executable.
187
Chapter 3: Fundamentals
Note
OpenSSL is being used here as a conversion utility and not in its normal role as a
communication utility.
3.
Create two blank text files with a text editor, such as Windows Notepad. Give the files the
same filename but use the extension .cer for one and .key for the other. For example,
gateway.cer and gateway.key might be the names.
4.
Start a text editor and open the downloaded .pem file and locate the line that begins:
-----BEGIN RSA PRIVATE KEY-----
5.
Mark and copy into the system clipboard that line and everything under it, up to and
including the line:
-----END RSA PRIVATE KEY-----
6.
Now paste the copied text into the .key file and save it.
7.
and copy into the system clipboard that line and everything under it, up to and including:
-----END CERTIFICATE-----
8.
Now paste this copied text into the .cer file and save it.
The saved .key and .cer files are now ready for upload into NetDefendOS.
188
Chapter 3: Fundamentals
Where YYYY-mm-DD HH:MM:SS is the new date and time. Note that the date order is year, then
month and then day. For example, to set the date and time to 9:25 in the morning on April 27th,
2008 the command would be:
gw-world:/> time -set 2008-04-27 09:25:00
Web Interface
1.
2.
3.
Set year, month, day and time via the dropdown controls
4.
Click OK
189
Chapter 3: Fundamentals
Time Zones
The world is divided up into a number of time zones with Greenwich Mean Time (GMT) in
London at zero longitude being taken as the base time zone. All other time zones going east and
west from zero longitude are taken as being GMT plus or minus a given integer number of hours.
All locations counted as being inside a given time zone will then have the same local time and
this will be one of the integer offsets from GMT.
The NetDefendOS time zone setting reflects the time zone where the NetDefend Firewall is
physically located.
Example 3.30. Setting the Time Zone
To modify the NetDefendOS time zone to be GMT plus 1 hour, follow the steps outlined below:
Command-Line Interface
gw-world:/> set DateTime Timezone=GMTplus1
Web Interface
1.
2.
3.
Click OK
190
Chapter 3: Fundamentals
Command-Line Interface
gw-world:/> set DateTime DSTEnabled=Yes
Web Interface
1.
2.
3.
Click OK
SNTP
Defined by RFC 2030, The Simple Network Time Protocol (SNTP) is a lightweight
implementation of NTP (RFC 1305). This is used by NetDefendOS to query NTP servers.
UDP/TIME
The Time Protocol (UDP/TIME) is an older method of providing time synchronization service
over the Internet. The protocol provides a site-independent, machine-readable date and
time. The server sends back the time in seconds since midnight on January first, 1900.
Most public Time Servers run the NTP protocol and are accessible using SNTP.
191
Chapter 3: Fundamentals
that Time Server URLs can be resolved (see Section 3.10, DNS). This is not needed if
using IP addresses for the servers.
Web Interface
1.
2.
3.
Now enter:
4.
Click OK
The time server URLs must have the prefix dns: to specify that they should be resolved with a
DNS server. NetDefendOS must therefore also have a DNS server defined so this resolution can
be performed.
Note
If the TimeSyncInterval parameter is not specified when using the CLI to set the
synchronization interval, the default of 86400 seconds (equivalent to one day) is used.
192
Chapter 3: Fundamentals
Web Interface
1.
2.
For the setting Maximum time drift that a server is allowed to adjust, enter the
maximum time difference in seconds that an external server is allowed to adjust for. There
may be a valid reason why there is a significant difference such as an incorrect NetDefendOS
configuration.
3.
Click OK
Sometimes it might be necessary to override the maximum adjustment. For example, if time
synchronization has just been enabled and the initial time difference is greater than the
maximum adjust value. It is then possible to manually force a synchronization and disregard the
maximum adjustment parameter.
Example 3.35. Forcing Time Synchronization
This example demonstrates how to force time synchronization, overriding the maximum
adjustment setting.
Command-Line Interface
gw-world:/> time -sync -force
Synchronization Intervals
193
Chapter 3: Fundamentals
The interval between each synchronization attempt can be adjusted if needed. By default, this
value is 86,400 seconds (1 day), meaning that the time synchronization process is executed once
in a 24 hour period.
Web Interface
1.
2.
3.
Click OK
As mentioned above, it is important to have an external DNS server configured so that the D-Link
Time Server URLs can be resolved during the access process.
Time Zone
Time zone offset in minutes.
Default: 0
DST Offset
Daylight saving time offset in minutes.
Default: 0
194
Chapter 3: Fundamentals
Default: none
Group interval
Interval according to which server responses will be grouped.
Default: 10
195
Chapter 3: Fundamentals
3.10. DNS
Overview
A DNS server can resolve a Fully Qualified Domain Name (FQDN) into the corresponding numeric
IP address. FQDNs are unambiguous textual domain names which specify a node's unique
position in the Internet's DNS tree hierarchy. FQDN resolution allows the actual physical IP
address to change while the FQDN can stay the same.
A Uniform Resource Locator (URL) differs from an FQDN in that the URL includes the access
protocol along with the FQDN. For example the protocol might be specified http//: for world
wide web pages.
FQDNs are used in many aspects of a NetDefendOS configuration where IP addresses are
unknown or where it makes more sense to make use of DNS resolution instead of using static IP
addresses.
UTM features that require access to external servers such as anti-virus and IDP.
Web Interface
1.
2.
196
Chapter 3: Fundamentals
3.
Click OK
Multiple HTTP Poster objects can be defined, each with a different URL and different optional
settings.
By default, an HTTP Poster object sends an HTTP GET request to the defined URL. Some servers
require an HTTP POST request and to achieve this the option HTTP Post the Values should be
enabled. This is usually needed when authentication parameters are being sent in the URL.
By default, HTTP Poster does not automatically send the server request after NetDefendOS
reconfiguration. This behavior can be changed by enabling the option Repost on each
reconfiguration.
There is one exception to the default behavior and that is after a reconfigure which is the
result of getting a new local IP address on the interface that connects to the DNS server.
In this case, NetDefendOS always waits a predefined period of 20 seconds before reposting
after the reconfiguration.
The default Repost Delay is 1200 seconds (20 minutes). This can be altered.
The predefined DynDNS client has an predefined refetch time of 30 days which cannot be
changed.
The difference between HTTP Poster and the predefined named DNS servers is that HTTP Poster
can be used to send any URL. The named services are a convenience that make it easy to
correctly format the URL needed for that particular service. For example, the http:// URL for the
dyndns.org service might be:
myuid:[email protected]/nic/update?hostname=mydns.dyndns.org
197
Chapter 3: Fundamentals
This could be sent by using HTTP Poster. Alternatively, the URL could be automatically formatted
for the administrator by NetDefendOS through using the DynDNS option and entering only the
information required for dyndns.org.
The CLI console command httpposter can be used to troubleshoot problems by seeing what
NetDefendOS is sending and what the servers are returning:
gw-world:/> httpposter
Where <index> is the position of the object in the list of posters. For example, to force a report of
the second in the list:
gw-world:/> httpposter -repost=2
198
Chapter 3: Fundamentals
Here, the RTT is the round trip time for the ICMP echo request and reply messages. The TTL value
is the Time To Live which is a hop counter. The initial TTL value is set by the sender and
decremented by each router passed. When it reaches zero, the packet is discarded preventing
packets from circulating forever.
This basic form of the ping command is also available in the NetDefendOS Web Interface by
going to: Status > Tools > Ping.
Note: The -pbr option cannot be used with the -srcif option
The -pbr option cannot be used with packet simulation using the -srcif option described
later. This is because the routing table lookup for the outgoing interface is not relevant
when simulating incoming packets.
199
Chapter 3: Fundamentals
ping-inbound. An example IP rule for ping messages arriving on the wan interface would be the
following:
Action
Source
Interface
Source
Network
Destination
Interface
Destination
Network
Service
Allow
wan
all-nets
core
wan_ip
ping-inbound
Here, the IPv4 address 192.168.3.20 is the IP address of the Ethernet interface on the firewall from
which the ping is sent. The output shows the route lookup that was performed to find the correct
interface.
When packet simulation is performed with the -scrif option (discussed later), the -verbose option
is required in order to show the rules that are triggered.
This allows the remote hosts responsiveness to an incoming TCP connection to be established.
For testing UDP connectivity, use the -udp option with the -port option. The UDP message size
must also be specified using the -count option to specify the number of packets and the -length
option to specify each packet's length. For example:
gw-world:/> ping 10.6.58.10 -udp -port=53 -verbose -count=1 -length=30
Sending 30-byte UDP ping to 10.6.58.10:53 from 192.168.3.20:22307
using PBR table "main"
... using route "0.0.0.0/0 via ext, gw 192.168.3.1" in PBR table "main"
UDP Reply from 10.6.58.10:53 to :192.168.3.20:22307 seq=0 time=50 ms TTL=58
Ping Results:
200
Chapter 3: Fundamentals
This command will construct an ICMP packet with destination IP 10.6.58.10 and NetDefendOS will
behave as though the packet has arrived on the specified source interface (in this case, wan).
As the packet appears to arrive on the interface specified, the administrator can observe the
behavior of the configuration and which IP rules/policies and routes are triggered. The IP address
specified could be an actual host in which case the packet will be forwarded to it through the
firewall.
If there is no route that matches the combination of source IP and receiving interface (the -srcif
parameter), the packet it will be dropped by the default access rule. For example:
gw-world:/> ping 10.6.58.10 -srcif=wan -verbose
Rule and routing information for ping:
PBR selected by rule "iface_member_main" - PBR table "main"
DROPPED by rule "Default_Access_Rule"
For the ping not to be dropped, there must not only be a route that matches the IP address and
interface combination but also an IP rule that allows the packet on that interface. If administrator
simulates the packet coming from the public Internet on the wan interface and going to some
host on the protected lannet, the allowing IP rule might look similar to the following:
Action
Source
Interface
Source
Network
Destination
Interface
Destination
Network
Service
NAT
lan
lannet
wannet
all-nets
ping-inbound
If there is no IP rule or IP policy that permits the packet it will also be dropped. For example:
gw-world:/> ping 10.6.58.10 -srcif=wan -verbose
Rule and routing information for ping:
PBR selected by rule "iface_member_main" - PBR table "main"
DROPPED by rule "Default_Rule"
The -srcif option is usually used in combination with the -srcip option described next.
Again, this is a feature that is intended for use by administrators for network testing purposes.
201
Chapter 3: Fundamentals
The above output shows how a Pipe Rule object called out_pipe is triggered.
These options could also be combined further with the -tcp and port options.
202
Chapter 3: Fundamentals
203
Chapter 4: Routing
This chapter describes how to configure IP routing in NetDefendOS.
Overview, page 204
Static Routing, page 205
Policy-based Routing, page 224
Route Load Balancing, page 231
OSPF, page 238
Multicast Routing, page 268
Transparent Mode, page 285
4.1. Overview
IP routing is one of the most fundamental functions of NetDefendOS. Any IP packet flowing
through a NetDefend Firewall will be subjected to at least one routing decision at some point in
time, and properly setting up routing is crucial for the system to function as expected.
NetDefendOS offers support for the following types of routing mechanisms:
Static routing
Dynamic routing
Additionally, NetDefendOS supports route monitoring to achieve route and link redundancy with
fail-over capability.
204
Chapter 4: Routing
Interface
The interface to forward the packet on in order to reach the destination network. In other
words, the interface to which the destination IP range is connected, either directly or through
a router.
The interface might be a physical interface of the firewall or it might be VPN tunnel (tunnels
are treated like physical interfaces by NetDefendOS).
Network
This is the destination network IP address range which this route will reach. The route chosen
from a routing table is the one that has a destination IP range which includes the IP address
being sought. If there is more than one such matching route, the route chosen is the one
which has the smallest IP address range.
The destination network all-nets is usually always used in the route for public Internet access
via an ISP.
Gateway
The IP address of the gateway which is the next router in the path to the destination network.
This is optional. If the destination network is connected directly to the interface, this is not
needed.
When a router lies between the NetDefend Firewall and the destination network, a gateway
IP must be specified. For example, if the route is for public Internet access via an ISP then the
205
Chapter 4: Routing
Local IP address
This parameter usually does not need to be specified. If it is specified, NetDefendOS responds
to ARP queries sent to this address. A special section below explains this parameter in more
depth.
Local IP Address and Gateway are mutually exclusive and either one or the other should be
specified.
Metric
This is a metric value assigned to the route and is used as a weight when performing
comparisons between alternate routes. If two routes are equivalent but have different metric
values then the route with the lowest metric value is taken.
The metric value is also used by Route Failover and Route Load Balancing.
For more information, see Section 4.4, Route Load Balancing and Section 4.2.3, Route
Failover.
In the above diagram, the LAN interface is connected to the network 192.168.0.0/24 and the
DMZ interface is connected to the network 10.4.0.0/16. The WAN interface is connected to the
network 195.66.77.0/24 and the address of the ISP gateway to the public Internet is 195.66.77.4.
The associated routing table for this would be as follows:
206
Chapter 4: Routing
Route #
Interface
Destination
lan
192.168.0.0/24
dmz
10.4.0.0/16
wan
195.66.77.0/24
wan
all-nets
Gateway
195.66.77.4
Route #1
All packets going to hosts on the 192.168.0.0/24 network should be sent out on the lan
interface. As no gateway is specified for the route entry, the host is assumed to be located on
the network segment directly reachable from the lan interface.
Route #2
All packets going to hosts on the 10.4.0.0/16 network are to be sent out on the dmz interface.
Also for this route, no gateway is specified.
Route #3
All packets going to hosts on the 195.66.77.0/24 network will be sent out on the wan
interface. No gateway is required to reach the hosts.
Route #4
All packets going to any host (the all-nets network will match all hosts) will be sent out on the
wan interface and to the gateway with IP address 195.66.77.4. That gateway will then consult
its routing table to find out where to send the packets next.
A route with the destination all-nets is often referred to as the Default Route as it will match all
packets for which no specific route has been configured. This route usually specifies the
interface which is connected to the public internet.
207
Chapter 4: Routing
ARP queries. ARP works because the clients and the NetDefendOS interface are part of the same
network.
A second network might then be added to the same physical interface via a switch, but with a
new network range that does not include the physical interface's IP address. This network is said
to be not bound to the physical interface. Clients on this second network won't then be able to
communicate with the NetDefend Firewall because ARP won't function between the clients and
the interface.
To solve this problem, a new route is added to NetDefendOS with the following parameters:
When the Default Gateway of the second network's clients is now set to the same value as the
Local IP Address of the above route, the clients will be able to communicate successfully with the
interface. The IP address chosen in the second network is not significant, as long as it is the same
value for the Default Gateway of the clients and the Local IP Address.
The effect of adding the route with the Local IP Address is that the firewall will act as a gateway
with the Local IP Address and respond to, as well as send out, ARP queries as though the interface
had that IP address.
The diagram below illustrates a scenario where this feature could be used. The network
10.1.1.0/24 is bound to a physical interface that has an IP address within the network of 10.1.1.1. If
we now attach a second network 10.2.2.0/24 to the interface via the switch, it is unbound since
the interface's IP address does not belong to it.
By adding a NetDefendOS route for this second network with the Local IP Address specified as
10.2.2.1, the interface will then respond to ARP requests from the 10.2.2.0/24 network. The clients
208
Chapter 4: Routing
in this second network must also have their Default Gateway set to 10.2.2.1 in order to reach the
NetDefend Firewall.
This feature is normally used when an additional network is to be added to an interface but it is
not desirable to change the existing IP addresses of the network. From a security standpoint,
doing this can present significant risks since different networks will typically be joined together
through a switch which imposes no controls on traffic passing between those networks. Caution
should therefore be exercised before using this feature.
Chapter 4: Routing
Iface
Gateway
Local IP
-------- -------------- --------lan
wan
wan
192.168.0.1
Metric
-----20
1
20
A separate route does not need to be defined that includes the gateway IP address.
It does not matter even if there is a separate route which includes the gateway IP address and
that routes traffic to a different interface.
210
Chapter 4: Routing
Interface
--------wan
lan
wan
Network
Gateway
Local IP
-------- ------------- -------all-nets 213.124.165.1 <empty>
lannet
<empty>
<empty>
wannet
<empty>
<empty>
Iface
Gateway
Local IP
------- --------------- -------lan
wan
wan
213.124.165.1
211
Metric
-----0
0
0
Chapter 4: Routing
Web Interface
To see the configured routing table:
1.
2.
These automatically added routes cannot be removed manually by deleting them one at a time
from a routing table. Instead, the properties of the interface must be selected and the advanced
option Automatically add a route for this interface using the given network must be
disabled. This will remove any route that was added automatically at startup. This option has no
other purpose but to delete the automatically added routes.
212
Chapter 4: Routing
Web Interface
1.
Go to: Network > Routing > Routing Tables > main > Add > Route
2.
Now enter:
3.
Interface: wan
Network: all-nets
Gateway: isp_gw_ip
Click OK
213
Chapter 4: Routing
Route #
Interface
Destination
core
192.168.0.10
core
193.55.66.77
Gateway
When the system receives an IP packet whose destination address is one of the interface IPs, the
packet will be routed to the core interface. In other words, it is processed by NetDefendOS itself.
There is also a core route added for all multicast addresses:
Route #
Interface
Destination
core
224.0.0.0/4
Gateway
To include the core routes when the active routing table is displayed, it is necessary to explicitly
specify that all routes are to be displayed. This is shown in the example below.
Example 4.3. Displaying the Core Routes
This example illustrates how to display the core routes in the active routing table.
Command-Line Interface
gw-world:/> routes -all
Flags Network
----- -----------------127.0.0.1
192.168.0.1
213.124.165.181
127.0.3.1
127.0.4.1
192.168.0.0/24
213.124.165.0/24
224.0.0.0/4
0.0.0.0/0
Iface
Gateway
Local IP Metric
---------- ------------- -------- -----core
(Shared IP)
0
core
(Iface IP)
0
core
(Iface IP)
0
core
(Iface IP)
0
core
(Iface IP)
0
lan
0
wan
0
core
(Iface IP)
0
wan
213.124.165.1
0
Web Interface
1.
Select the Routes item in the Status dropdown menu in the menu bar
2.
Check the Show all routes checkbox and click the Apply button
3.
The main window will list the active routing table, including the core routes
214
Chapter 4: Routing
Overview
NetDefend Firewalls are often deployed in mission-critical locations where availability and
connectivity is crucial. For example, an enterprise relying heavily on access to the Internet could
have operations severely disrupted if a single connection to the external Internet via a single
Internet Service Provider (ISP) fails.
It is therefore not unusual to have backup Internet connectivity using a secondary ISP. The
connections to the two service providers often use different routes to avoid a single point of
failure.
To allow for a situation with multiple ISPs, NetDefendOS provides a Route Failover capability so
that should one route fail, traffic can automatically failover to another, alternate route.
NetDefendOS implements route failover through the use of Route Monitoring in which
NetDefendOS monitors the availability of routes and then switches traffic to an alternate route
should the primary, preferred route fail.
Gateway Monitoring
Chapter 4: Routing
Failover Processing
Whenever monitoring determines that a route is not available, NetDefendOS will mark the route
as disabled and instigate route failover for existing and new connections. For already established
connections, a route lookup will be performed to find the next best matching route and the
connections will then switch to using the new route. For new connections, route lookup will
ignore disabled routes and the next best matching route will be used instead.
The table below defines two default routes, both having all-nets as the destination, but using two
different gateways. The first, primary route has the lowest metric and also has route monitoring
enabled. Route monitoring for the second, alternate route is not meaningful since it has no
failover route.
Route #
Interface
Destination
Gateway
Metric
Monitoring
wan
all-nets
195.66.77.1
10
On
wan
all-nets
193.54.68.1
20
Off
When a new connection is about to be established to a host on the Internet, a route lookup will
result in the route that has the lowest metric being chosen. If the primary WAN router should
then fail, this will be detected by NetDefendOS, and the first route will be disabled. As a
consequence, a new route lookup will be performed and the second route will be selected with
the first one being marked as disabled.
216
Chapter 4: Routing
Re-enabling Routes
Even if a route has been disabled, NetDefendOS will continue to check the status of that route.
Should the route become available again, it will be re-enabled and existing connections will
automatically be transferred back to it.
Src Iface
Src Net
Dest Iface
Dest Net
Parameters
NAT
lan
lannet
wan
all-nets
http
Destination
Gateway
Metric
Monitoring
wan
all-nets
195.66.77.1
10
Off
Now a secondary route is added over a backup DSL connection and Route Monitoring is enabled
for this. The updated routing table will look like this:
Route #
Interface
Destination
Gateway
Metric
Monitoring
wan
all-nets
195.66.77.1
10
On
dsl
all-nets
193.54.68.1
20
Off
Notice that Route Monitoring is enabled for the first route but not the backup, failover route.
As long as the preferred wan route is healthy, everything will work as expected. Route
Monitoring will also be functioning, so the secondary route will be enabled if the wan route
should fail.
There are, however, some problems with this setup: if a route failover occurs, the default route
will then use the dsl interface. When a new HTTP connection is established, a route lookup will
be made resulting in a destination interface of dsl. The IP rules will then be evaluated, but the
original NAT rule assumes the destination interface to be wan so the new connection will be
dropped by the rule set.
In addition, any existing connections matching the NAT rule will also be dropped as a result of
the change in the destination interface. Clearly, this is undesirable.
To overcome this issue, potential destination interfaces should be grouped together into an
Interface Group and the Security/Transport Equivalent flag should be enabled for the Group.
The Interface Group is then used as the Destination Interface when setting policies. For more
information on groups, see Section 3.4.6, Interface Groups.
217
Chapter 4: Routing
reason for this is to notify surrounding systems that there has been a route change. This behavior
can be controlled by the advanced setting Gratuitous ARP on Fail.
In a complex network topology it is more reliable to check accessibility to external hosts. Just
monitoring a link to a local switch may not indicate a problem in another part of the internal
network.
Host monitoring can be used to help in setting the acceptable Quality of Service level of
Internet response times. Internet access may be functioning but it may be desirable to
instigate route failover if response latency times become unacceptable using the existing
route.
Specifying Hosts
For each host specified for host monitoring there are a number of property parameters that
should be set:
Method
The method by which the host is to be polled. This can be one of:
TCP - A TCP connection is established to and then disconnected from the host. An IP
address must be specified for this.
218
Chapter 4: Routing
HTTP - A normal HTTP server request using a URL. A URL must be specified for this as well
as a text string which is the beginning (or complete) text of a valid response. If no text is
specified, any response from the server will be valid.
IP Address
The IP address of the host when using the ICMP or TCP option.
Port Number
The port number for polling when using the TCP option.
Interval
The interval in milliseconds between polling attempts. The default setting is 10,000 and the
minimum value allowed is 100 ms.
Sample
The number of polling attempts used as a sample size for calculating the Percentage Loss and
the Average Latency. This value cannot be less than 1.
HTTP Parameters
If the HTTP polling method is selected then two further parameters can be entered:
Request URL
The URL which is to be requested.
Expected Response
The text that is expected back from querying the URL.
Testing for a specific response text provides the possibility of testing if an application is
219
Chapter 4: Routing
offline. If, for example, a web page response from a server can indicate if a specific database is
operational with text such as "Database OK", then the absence of that response can indicate
that the server is operational but the application is offline.
Grace time
The length of time in seconds between startup or reconfigure and monitoring start.
Default: 30
consecutive fails
The number of consecutive failures that occurs before a route is marked as being unavailable.
Default: 5
Consecutive success
The number of consecutive successes that must occur before a route is marked as being
220
Chapter 4: Routing
available.
Default: 5
A Typical Scenario
As an example of a typical proxy ARP scenario, consider a network split into two sub-networks
with a NetDefend Firewall between the two.
Host A on one sub-network might send an ARP request to find out the MAC address for the IP
address of host B on the other sub-network. With the proxy ARP feature configured,
NetDefendOS responds to this ARP request instead of host B. NetDefendOS sends its own MAC
address in reply, pretending to be the target host. After receiving the reply, Host A then sends
data directly to NetDefendOS which forwards the data to host B. In the process NetDefendOS
checks the traffic against the configured rule sets.
221
Chapter 4: Routing
Route #
Network
Interface
net_1
if1
if2
net_2
if2
if1
In this way there is complete separation of the sub-networks but the hosts are unaware of this.
The routes are a pair which are a mirror image of each other but there is no requirement that
proxy ARP is used in a pairing like this.
Keep in mind that if the host has an ARP request for an IP address outside of the local network
then this will be sent to the gateway configured for that host. The entire example is illustrated
below.
222
Chapter 4: Routing
Proxy ARP cannot be enabled for automatically added routes. For example, the routes that
NetDefendOS creates at initial startup for physical interfaces are automatically added routes. The
reason why Proxy ARP cannot be enabled for these routes is because automatically created
routes have a special status in the NetDefendOS configuration and are treated differently.
If Proxy ARP is required on an automatically created route, the route should first be deleted and
then manually recreated as a new route. Proxy ARP can then be enabled on the new route.
223
Chapter 4: Routing
Source-based Routing
A different routing table may need to be chosen based on the source of traffic. When more
than one ISP is used to provide Internet services, policy-based routing can route traffic
originating from different sets of users through different routes.
For example, traffic from one address range might be routed through one ISP, whilst traffic
from another address range might be through a second ISP.
Service-based Routing
A different routing table might need to be chosen based on the service. Policy-based routing
can route a given protocol such as HTTP, through proxies such as Web caches. Specific
services might also be routed to a specific ISP so that one ISP handles all HTTP traffic.
User-based Routing
A different routing table might need to be chosen based on the user identity or the group to
which the user belongs.
This is particularly useful in provider-independent metropolitan area networks where all users
share a common active backbone but each can use different ISPs and subscribe to different
providers.
PBR Components
Policy-based routing implementation in NetDefendOS is implemented using two components:
Routing Rules
One or more Routing Rules are created to determine which routing table to use for which
traffic.
Without routing rules, the main routing table is the default.
224
Chapter 4: Routing
Routing Tables
NetDefendOS, as standard, has one default routing table called main. In addition to the main
table, it is possible to define one or more, additional routing tables for policy-based routing.
(these will sometimes be referred to as alternate routing tables).
Alternate routing tables contain the same information for describing routes as main, except that
there is an extra property defined for each of them which is called ordering. The ordering property
decides how route lookup is done using alternate tables in conjunction with the main table. This
is described further below.
Example 4.4. Creating a Routing Table
In this example, a new routing table called MyPBRTable is created with the Ordering property set
to First.
Command-Line Interface
To see the configured routing table:
gw-world:/> add RoutingTable MyPBRTable Ordering=First
Web Interface
1.
Go to: Network > Routing > Routing Tables > Add > RoutingTable
2.
Now enter:
Name: MyPBRTable
First - the named routing table is consulted first of all. If this lookup fails, the lookup
will continue in the main routing table.
Default - the main routing table will be consulted first. If the only match is the
default route (in other words the all-nets route), the named routing table will be
consulted. If the lookup in the named routing table fails, the lookup as a whole is
considered to have failed.
Only - the named routing table is the only one consulted. If this lookup fails, the
lookup will not continue in the main routing table.
3.
If Remove Interface IP Routes is enabled, the default interface routes are removed, that is
to say routes to the core interface (which are routes to NetDefendOS itself ).
4.
Click OK
225
Chapter 4: Routing
Command-Line Interface
Change the context to be the routing table:
gw-world:/> cc RoutingTable MyPBRTable
Web Interface
1.
Go to: Network > Routing > Routing Tables > MyPBRTable > Add > Route
2.
Now enter:
3.
Interface: lan
Network: my_network
Local IP Address: The IP address specified here will be automatically published on the
corresponding interface. This address will also be used as the sender address in ARP
queries. If no address is specified, the firewall's interface IP address will be used.
Metric: Specifies the metric for this route. (Mostly used in route fail-over scenarios)
Click OK
Routing Rules
A rule in the routing rule set can decide which routing table is selected. A routing rule has a
number of filtering properties that are similar to those used in an IP rule. A rule can trigger on a
type of service (HTTP for example) in combination with the specified Source/Destination
Interface and Source/Destination Network.
When looking up routing rules, it is the first matching rule found that is triggered.
Example 4.6. Creating a Routing Rule
In this example, a routing rule called my_routing_rule is created. This will select the routing table
MyPBRTable for any http traffic destined for the network my_network.
Command-Line Interface
gw-world:/> add RoutingRule Service=http
SourceInterface=any
SourceNetwork=all-nets
DestinationInterface=any
DestinationNetwork=my_network
ForwardRoutingTable=MyPBRTable
ReturnRoutingTable=MyPBRTable
Name=my_routing_rule
226
Chapter 4: Routing
Web Interface
1.
Go to: Network > Routing > Routing Tables > Add > RoutingTable
2.
Now enter:
Name: my_routing_rule
Service: http
SourceInterface: any
SourceNetwork: all-nets
DestinationInterface: any
DestinationNetwork: my_network
ForwardRoutingTable: MyPBRTable
ReturnRoutingTable: MyPBRTable
3.
If Remove Interface IP Routes is enabled, the default interface routes are removed, that is
to say routes to the core interface (which are routes to NetDefendOS itself ).
4.
Click OK
Interface
Network
Gateway
If1
If1_net
wan1
all-nets
isp1_ip
Index #
Interface
Destination
Gateway
wan2
all-nets
isp2_ip
227
Chapter 4: Routing
If traffic coming through wan2 is to have access to If1_net then a routing rule needs to
constructed as follows:
Source
Interface
Source
Network
Destination
Interface
Destination
Network
Forward
Routing Table
Return
Routing Table
wan2
all-nets
any
If1_net
main
isp2
This rule allows the forward traffic through the wan2 table to find the route for If1_net in the
main routing table. The return traffic will use the isp2 table so it can reach the initiator of the
connection.
This example should also have some address translation rules since If1_net will probably be a
private IP network. For simplicity, that has been omitted.
The routing rules are first looked up but to do this the packet's destination interface must be
determined and this is always done by a lookup in the main routing table. It is therefore
important that a match for the destination network is found or at least a default all-nets
route exists which can catch anything not explicitly matched.
2.
A search is now made for a routing rule that matches the packet's source/destination
interface/network as well as service. If a matching rule is found then this determines the
routing table to use. If no routing rule is found then the main table will be used.
3.
Once the correct routing table has been located, a check is made to make sure that the
source IP address in fact belongs on the receiving interface. The Access Rules are firstly
examined to see if they can provide this check (see Section 6.1, Access Rules for more details
of this feature). If there are no Access Rules or a match with the rules cannot be found, a
reverse lookup in the previously selected routing table is done using the source IP address. If
the check fails then a Default access rule log error message is generated.
4.
At this point, using the routing table selected, the actual route lookup is done to find the
packet's destination interface. At this point the ordering parameter is used to determine how
the actual lookup is done and the options for this are described in the next section. To
implement virtual systems, the Only ordering option should be used.
5.
The connection is then subject to the normal IP rule set. If a SAT rule is encountered, address
translation will be performed. The decision of which routing table to use is made before
carrying out address translation but the actual route lookup is performed on the altered
address. Note that the original route lookup to find the destination interface used for all rule
look-ups was done with the original, untranslated address.
6.
If allowed by the IP rule set, the new connection is opened in the NetDefendOS state table
and the packet forwarded through this connection.
Default
228
Chapter 4: Routing
The default behavior is to first look up the route in the main table. If no matching route is
found, or the default route is found (the route with the destination all-nets), a lookup for a
matching route in the alternate table is done. If no match is found in the alternate table then
the default route in the main table will be used.
2.
First
This behavior is to first look up the connection's route in the alternate table. If no matching
route is found there then the main table is used for the lookup. The default all-nets route
will be counted as a match in the alternate table if it exists there.
3.
Only
This option ignores the existence of any other table except the alternate table so that is the
only one used for the lookup.
One application of this option is to give the administrator a way to dedicate a single routing
table to one set of interfaces. The Only option should be used when creating virtual systems
since it can dedicate a routing table to a set of interfaces.
The first two options can be regarded as combining the alternate table with the main table and
assigning one route if there is a match in both tables.
Each ISP will provide an IPv4 network from its network range. A 2 ISP scenario is assumed in
this case, with the network 10.10.10.0/24 belonging to ISP A and 20.20.20.0/24 belonging to
ISP B. The ISP provided gateways are 10.10.10.1 and 20.20.20.1 respectively.
All addresses in this scenario are public addresses for the sake of simplicity.
This is a "drop-in" design, where there are no explicit routing subnets between the ISP
gateways and the NetDefend Firewall.
In a provider-independent network, clients will likely have a single IP address, belonging to one
of the ISPs. In a single-organization scenario, publicly accessible servers will be configured with
two separate IP addresses: one from each ISP. However, this difference does not matter for the
policy routing setup itself.
Note that, for a single organization, Internet connectivity through multiple ISPs is normally best
done with the BGP protocol, which means not worrying about different IP spans or about policy
routing. Unfortunately, this is not always possible, and this is where Policy Based Routing
becomes a necessity.
We will set up the main routing table to use ISP A and add a named routing table called r2 that
229
Chapter 4: Routing
Network
Gateway
ProxyARP
lan1
10.10.10.0/24
wan1
lan1
20.20.20.0/24
wan2
wan1
10.10.10.1/32
lan1
wan2
20.20.20.1/32
wan1
all-nets
lan1
10.10.10.1
Network
Gateway
wan2
all-nets
20.20.20.1
The table r2 has its Ordering parameter set to Default, which means that it will only be consulted
if the main routing table lookup matches the default route (all-nets).
Contents of the Policy-based Routing Policy:
Source
Interface
Source
Range
Destination
Interface
Destination
Range
Selected/
Service
Forward
VR table
Return
VR table
lan1
10.10.10.0/24
wan1
all-nets
all_services
r2
r2
wan2
all-nets
lan1
20.20.20.0/24
all_services
r2
r2
Add the routes in the list to the main routing table, as shown above.
2.
Create a routing table called r2 and make sure the ordering is set to Default.
3.
Add the routes found in the list above for the routing table r2.
4.
Add the PBR routing rules according to the list with the following:
Go to: Network > Routing > Policy-based Routing Rules > Add > Routing Rule
Note
Routing rules in the above example are added for both inbound and outbound
connections.
230
Chapter 4: Routing
To balance simultaneous utilization of multiple Internet links so networks are not dependent
on a single ISP.
To allow balancing of traffic across multiple VPN tunnels which might be setup over different
physical interfaces.
Enabling RLB
RLB is enabled on a routing table basis and this is done by creating an RLB Instance object. This
object specifies two parameters: a routing table and an RLB algorithm. A table may have only
one Instance object associated with it.
One of the algorithms from the following list can be specified in an RLB Instance object:
Round Robin
Matching routes are used equally often by successively going to the next matching route.
Destination
This is an algorithm that is similar to Round Robin but provides destination IP "stickiness" so
that the same destination IP address gets the same route. The algorithm is always used in
conjunction with an ALG.
Spillover
This uses the next route when specified interface traffic limits are exceeded continuously for
a given time.
Disabling RLB
Deleting a routing table's Instance object has the effect of switching off RLB for that table.
RLB Operation
When RLB is enabled for a routing table through an RLB Instance object, the sequence of
231
Chapter 4: Routing
Route lookup is done in the routing table and a list of all matching routes is assembled. The
routes in the list must cover the exact same IP address range (further explanation of this
requirement can be found below).
2.
If the route lookup finds only one matching route then that route is used and balancing
does not take place.
3.
If more than one matching route is found then RLB is used to choose which one to use. This
is done according to which algorithm is selected in the table's RLB Instance object:
Round Robin
Successive routes are chosen from the matching routes in a "round robin" fashion
provided that the metric of the routes is the same. This results in route lookups being
spread evenly across matching routes with same metric. If the matching routes have
unequal metrics then routes with lower metrics are selected more often and in
proportion to the relative values of all metrics (this is explained further below).
Destination
This is similar to Round Robin but provides "stickiness" so that unique destination IP
addresses always get the same route from a lookup. The importance of this is that it
means that a particular destination application can see all traffic coming from the same
source IP address.
Spillover
Spillover is not similar to the previous algorithms. With spillover, the first matching
route's interface is repeatedly used until the Spillover Limits of that route's interface are
continuously exceeded for the Hold Timer number of seconds.
Once this happens, the next matching route is then chosen. The Spillover Limits for an
interface are set in the RLB Algorithm Settings along with the Hold Timer number of
seconds (the default is 30 seconds) for the interface.
When the traffic passing through the original route's interface falls below the Spillover
Limits continuously for the Hold Timer number of seconds, route lookups will then revert
back to the original route and its associated interface.
232
Chapter 4: Routing
Spillover Limits are set separately for ingoing and outgoing traffic with only one of these
typically being specified. If both are specified then only one of them needs to be
exceeded continuously for Hold Timer seconds for the next matching route to be chosen.
The units of the limits, such as Mbps, can be selected to simplify specification of the
values.
Chapter 4: Routing
different metric. The route with the lowest metric is chosen first and when that route's
interface limits are exceeded, the route with the next highest metric is then chosen.
When that new route's interface limits are also exceeded then the route with the next highest
metric is taken and so on. As soon as any route with a lower metric falls below its interface
limit for its Hold Timer number of seconds, then it reverts to being the chosen route.
RLB Resets
There are two occasions when all RLB algorithms will reset to their initial state:
In both these cases, the chosen route will revert to the one selected when the algorithms began
operation.
RLB Limitations
It should be noted that the selection of different alternate routes occurs only when the route
lookup is done and it is based on the algorithm being used with the routing table used for the
lookup and the algorithm's state.
RLB cannot know how much data traffic will be related to each lookup. The purpose of RLB is to
be able to spread route lookups across alternatives on the assumption that each lookup will
relate to a connection carrying some assumed amount of traffic.
An RLB Scenario
Below, is an illustration which shows a typical scenario where RLB might be used. Here, there is a
group of clients on a network connected via the LAN interface of the NetDefend Firewall and
these will access the internet.
234
Chapter 4: Routing
Internet access is available from either one of two ISPs, whose gateways GW1 GW2 are connected
to the firewall interfaces WAN1 and WAN2. RLB will be used to balance the connections
between the two ISPs.
We first need to define two routes to these two ISPs in the main routing table as shown below:
Route No.
Interface
Destination
Gateway
Metric
WAN1
all-nets
GW1
100
WAN2
all-nets
GW2
100
We will not use the spillover algorithm in this example so the routing metric for both routes
should be the same, in this case a value of 100 is selected.
By using the Destination RLB algorithm we can ensure that clients communicate with a particular
server using the same route and therefore the same source IP address. If NAT was being used for
the client communication, the IP address seen by the server would be WAN1 or WAN2.
In order to flow, any traffic requires both a route and an allowing IP rule. The following rules will
allow traffic to flow to either ISP and will NAT the traffic using the external IP addresses of
interfaces WAN1 and WAN2.
Rule No.
Action
Src Interface
Src Network
Service
NAT
lan
lannet
WAN1
all-nets
all_services
NAT
lan
lannet
WAN2
all-nets
all_services
The service All is used in the above IP rules but this should be further refined to a service or
service group that covers all the traffic that will be allowed to flow.
235
Chapter 4: Routing
Web Interface
1.
Go to: Network > Routing > Instances > Add > Route Balancing Instance
2.
Algorithm: Destination
Click OK
Use two ISPs, with one tunnel connecting through one ISP and the other tunnel connecting
through the other ISP. RLB can then be applied as normal with the two tunnels.
In order to get the second tunnel to function in this case, it is necessary to add a single host
route in the main routing table that points to the secondary ISPs interface and with the
secondary ISPs gateway.
This solution has the advantage of providing redundancy should one ISP link fail.
Use VPN with one tunnel that is IPsec based and another tunnel that is uses a different
protocol.
236
Chapter 4: Routing
If both tunnels must be, for example, IPsec connects, it is possible to wrap IPsec in a GRE
tunnel (in other words, the IPsec tunnel is carried by a GRE tunnel). GRE is a simple tunneling
protocol without encryption and therefore involves a minimum of extra overhead. See
Section 3.4.5, GRE Tunnels for more about this topic.
237
Chapter 4: Routing
4.5. OSPF
The feature called Dynamic Routing is implemented in NetDefendOS using the Open Shortest Path
First (OSPF) architecture.
This section begins by looking generally at what dynamic routing is and how it can be
implemented. It then goes on to look at how OSPF can provide dynamic routing followed by a
description of how a simple OSPF network can be set up.
How a router decides the optimal or "best" route and shares updated information with other
routers depends on the type of algorithm used. The two algorithm types will be discussed next.
238
Chapter 4: Routing
In contrast to DV algorithms, Link State (LS) algorithms enable routers to keep routing tables that
reflect the topology of the entire network.
Each router broadcasts its attached links and link costs to all other routers in the network. When
a router receives these broadcasts it runs the LS algorithm and calculates its own set of least-cost
paths. Any change of the link state will be sent everywhere in the network, so that all routers
keep the same routing table information and have a consistent view of the network.
An OSPF enabled router first identifies the routers and sub-networks that are directly connected
to it and then broadcasts the information to all the other routers. Each router uses the
information it receives to add the OSPF learned routes to its routing table.
With this larger picture, each OSPF router can identify the networks and routers that lead to a
given destination IP and therefore the best route. Routers using OSPF then only broadcast
updates to inform others of any route changes instead of broadcasting the entire routing table.
OSPF depends on various metrics for path determination, including hops, bandwidth, load and
delay. OSPF can also provide a high level of control over the routing process since its parameters
can be finely tuned.
239
Chapter 4: Routing
OSPF allows firewall A to know that to reach network Y, traffic needs to be sent to firewall B.
Instead of having to manually insert this routing information into the routing tables of A, OSPF
allows B's routing table information to be automatically shared with A.
In the same way, OSPF allows firewall B to automatically become aware that network X is
attached to firewall A.
Under OSPF, this exchange of routing information is completely automatic.
In addition, we now have route redundancy between any two of the firewalls. For example, if the
direct link between A and C fails then OSPF allows both firewalls to know immediately that there
is an alternate route between them via firewall B.
For instance, traffic from network X which is destined for network Z will be routed automatically
through firewall B.
From the administrator's point of view, only the routes for directly connected networks need to
be configured on each firewall. OSPF automatically provides the required routing information to
find networks connected to other firewalls, even if traffic needs to transit several other firewalls
to reach its destination.
Chapter 4: Routing
In discussing dynamic routing and OSPF further, an understanding of Routing Metrics can be
useful and a brief explanation is given here.
Routing metrics are the criteria that a routing algorithm will use to compute the "best" route to a
destination. A routing protocol relies on one or several metrics to evaluate links across a network
and to determine the optimal path. The principal metrics used include:
Path length
The sum of the costs associated with each link. A commonly used value for
this metric is called "hop count" which is the number of routing devices a
packet must pass through when it travels from source to destination.
Item Bandwidth
Load
The usage of a router. The usage can be evaluated by CPU utilization and
throughput.
Delay
The time it takes to move a packet from the source to the destination. The
time depends on various factors, including bandwidth, load, and the
length of the path.
OSPF functions by routing IP packets based only on the destination IP address found in the IP
packet header. IP packets are routed "as is", in other words they are not encapsulated in any
further protocol headers as they transit the Autonomous System (AS).
Link-state Routing
OSPF is a form of link-state routing (LS) that sends Link-state Advertisements (LSAs) to all other
routers within the same area. Each router maintains a database, known as a Link-state Database,
which maps the topology of the autonomous system (AS). Using this database, each router
241
Chapter 4: Routing
constructs a tree of shortest paths to other routers with itself as the root. This shortest-path tree
yields the best route to each destination in the AS.
Authentication.
All OSPF protocol exchanges can, if required, be authenticated. This means that only routers with
the correct authentication can join an AS. Different authentication schemes can be used and
with NetDefendOS the scheme can be either a passphrase or an MD5 digest.
It is possible to configure separate authentication methods for each AS.
OSPF Areas
An OSPF Area consists of networks and hosts within an AS that have been grouped together.
Routers that are only within an area are called internal routers. All interfaces on internal routers
are directly connected to networks within the area.
The topology of an area is hidden from the rest of the AS. This information hiding reduces the
amount of routing traffic exchanged. Also, routing within the area is determined only by the
area's own topology, lending the area protection from bad routing data. An area is a
generalization of an IP sub netted network.
In NetDefendOS, areas are defined by OSPF Area objects and are added to the AS which is itself
defined by an OSPF Router object. There can be more than one area within an AS so multiple
OSPF Area objects could be added to a single OSPF Router. In most cases, one is enough and it
should be defined separately on each NetDefend Firewall which will be part of the OSPF
network.
This NetDefendOS object is described further in Section 4.5.3.2, OSPF Area.
Area Border Routers are routers that have interfaces connected to more
than one area. These maintain a separate topological database for each
area to which they have an interface.
ASBRs
Backbone Areas
All OSPF networks need to have at least the Backbone Area which is the
OSPF area with an ID of 0. This is the area that other related areas should
be connected to. The backbone ensures routing information is distributed
between connected areas. When an area is not directly connected to the
backbone it needs a virtual link to it.
OSPF networks should be designed by beginning with the backbone.
Stub Areas
Transit Areas
Transit areas are used to pass traffic from an area that is not directly
connected to the backbone area.
242
Chapter 4: Routing
Neighbors
Routers that are in the same area become neighbors in that area. Neighbors are elected by the
use of Hello messages. These are sent out periodically on each interface using IP multicast.
Routers become neighbors as soon as they see themselves listed in a neighbor's Hello message.
In this way, a two way communication is guaranteed.
The following Neighbor States are defined:
Down
Init
When a Hello message is received from a neighbor, but does NOT include the
Router ID of the firewall in it, the neighbor will be placed in the Init state.
As soon as the neighbor in question receives a Hello message it will know the
sending router's Router ID and will send a Hello message with that included. The
state of the neighbors will change to the 2-way state.
2-Way
In this state the communication between the router and the neighbor is
bi-directional.
On Point-to-Point and Point-to-Multipoint OSPF interfaces, the state will be changed
to Full. On Broadcast interfaces, only the DR/BDR will advance to the Full state with
their neighbors, all the remaining neighbors will remain in the 2-Way state.
ExStart
Exchange
Loading
Full
This is the normal state of an adjacency between a router and the DR/BDR.
Aggregates
OSPF Aggregation is used to combine groups of routes with common addresses into a single
entry in the routing table. This is commonly used to minimize the routing table.
To set this feature up in NetDefendOS, see Section 4.5.3.5, OSPF Aggregates.
Virtual Links
Virtual links are used for the following scenarios:
A. Linking an area that does not have a direct connection to the backbone area.
B. Linking backbone areas when the backbone is partitioned.
243
Chapter 4: Routing
In the above example, a Virtual Link is configured between fw1 and fw2 on Area 1 as it is used as
the transit area. In this configuration only the Router ID has to be configured. The diagram shows
that fw2 needs to have a Virtual Link to fw1 with Router ID 192.168.1.1 and vice versa. These
virtual links need to be configured in Area 1.
244
Chapter 4: Routing
The virtual link is configured between fw1 and fw2 on Area 1 as it is used as the transit area. In the
configuration, only the Router ID has to be configured, as in the example above show fw2 need to
have a virtual link to fw1 with the Router ID 192.168.1.1 and vice versa. These virtual links need to
be configured in Area 1.
To set this feature up in NetDefendOS, see Section 4.5.3.6, OSPF VLinks.
245
Chapter 4: Routing
General Parameters
Name
Router ID
246
Chapter 4: Routing
Note
When running OSPF on a HA Cluster there is a need
for a private master and private slave Router ID as
well as the shared Router ID.
Reference Bandwidth
Debug
The debug options provides a troubleshooting tool by enabling the generation of additional
OSPF log events. These are described more fully in Section 4.5.7, OSPF Troubleshooting.
Authentication
The primary purpose of OSPF authentication is to make sure that the correct OSPF router
processes are talking to each and it is therefore mostly used when there are multiple OSPF AS'.
OSPF supports the following authentication options:
No (null) authentication
Passphrase
MD5 Digest
247
Chapter 4: Routing
In other words, the OSPF authentication method must be replicated on all NetDefend
Firewalls.
Advanced
Time Settings
SPF Hold Time
This specifies the time in seconds at which interval the OSPF LSAs are
collected into a group and refreshed. It is more optimal to group many
LSAs and process them at the same time, instead of running them one
and one.
This specifies the time in seconds that the routing table will be kept
unchanged after a reconfiguration of OSPF entries or a HA failover.
Memory Settings
Memory Max Usage
General Parameters
Name
ID
248
Chapter 4: Routing
There can only be one backbone area and it forms the central
portion of an AS. Routing information that is exchanged
between different area always transits the backbone area.
Is stub area
Import Filter
The import filter is used to filter what can be imported in the OSPF AS from either external
sources (like the main routing table or a policy based routing table) or inside the OSPF area.
External
Specifies the network addresses allowed to be imported into this OSPF area from
external routing sources.
Interarea
Specifies the network addresses allowed to be imported from other routers inside
the OSPF area.
General Parameters
Interface
Specifies which interface on the firewall will be used for this OSPF
interface.
Network
Specifies the IPv4 network address for this OSPF interface. If is not
specified it defaults to the network assigned to the underlying
NetDefendOS interface.
This network is automatically exported to the OSPF AS and does not
require a Dynamic Routing Rule.
Interface Type
Auto - Tries to automatically detect interface type. This can be used for
physical interfaces.
249
Chapter 4: Routing
Metric
Specifies the metric for this OSPF interface. This represents the "cost" of
sending packets over this interface. This cost is inversely proportional to
the bandwidth of the interface.
Bandwidth
Authentication
All OSPF protocol exchanges can be authenticated using a simple password or MD5
cryptographic hashes.
If Use Default for Router Process is enabled then the values configured in the router process
properties are used. If this is not enabled then the following options are available:
No authentication.
Passphrase.
MD5 Digest.
Advanced
Passive
Hello Interval
RXMT Interval
250
Chapter 4: Routing
InfTrans Delay
Specifies the estimated transmit delay for the interface. This value
represents the maximum time it takes to forward a LSA packet
trough the router.
Wait Interval
Router Priority
Note
An HA cluster will always have 0 as router priority, and
can never be used as a DR or BDR.
Sometimes there is a need to include networks into the OSPF router process, without running
OSPF on the interface connected to that network. This is done by enabling the Passive option: No
OSPF routers connected to this interface ("Passive").
This is an alternative to using a Dynamic Routing Policy to import static routes into the OSPF
router process.
If the Ignore received OSPF MTU restrictions is enabled, OSPF MTU mismatches will be
allowed.
Promiscuous Mode
The Ethernet interfaces that are also OSPF interfaces must operate in promiscuous mode for OSPF
to function. This mode means that traffic with a destination MAC address that does not match
the Ethernet interface's MAC address will be sent to NetDefendOS and not discarded by the
interface. Promiscuous mode is enabled automatically by NetDefendOS and the administrator
does not need to worry about doing this.
If the administrator enters a CLI command ifstat <ifname>, the Receive Mode status line will show
the value Promiscuous next to it instead of Normal to indicate the mode has changed. This is
discussed further in Section 3.4.2, Ethernet Interfaces.
IP Address
The IP Address of the neighbor. This is the IP Address of the neighbors OSPF
interface connecting to this router. For VPN tunnels this will be the IP address of
the tunnel's remote end.
251
Chapter 4: Routing
Metric
Advertise
In most, simple OSPF scenarios, OSPF Aggregate objects will not be needed.
Neighbor Router ID
The Router ID of the router on the other side of the virtual link.
Authentication
Use Default For AS
In most, simple OSPF scenarios, OSPF VLink objects will not be needed.
4.5.4.1. Overview
The Final OSPF Setup Step is Creating Dynamic Routing Rules
252
Chapter 4: Routing
After the OSPF structure is created, the final step is always to create a Dynamic Routing Rule on
each NetDefend Firewall which allows the routing information that the OSPF AS delivers from
remote firewalls to be added to the local routing tables.
Dynamic routing rules are discussed here in the context of OSPF, but can also be used in other
contexts.
Allowing the import of routes from the OSPF AS into local routing tables.
Allowing the export of routes from a local routing tables to the OSPF AS.
Allowing the export of routes from one OSPF AS to another OSPF AS.
Note
The last usage of joining asynchronous systems together is rarely encountered except in
very large networks.
Specifying a Filter
Dynamic routing rules allow a filter to be specified which narrows the routes that are imported
based on the network reached. In most cases, the Or is within option should be specified as
all-nets so that no filter is applied.
253
Chapter 4: Routing
A dynamic routing export rule must be created to explicitly export the route to the OSPF AS.
General Parameters
Name
From OSPF AS
Destination Interface
Destination Network
Exactly Matches
Or is within
More Parameters
Next Hop
Specifies what the next hop (in other words, router) needs to be for this
254
Chapter 4: Routing
rule to be triggered.
Metric
Router ID
OSPF Tag
General Parameters
Export to Process
Forward
Tag
Specifies a tag for this route. This tag can be used in other routers for
filtering.
Route Type
OffsetMetric
Limit Metric To
Limits the metrics for these routes to a minimum and maximum value.
If a route has a higher or lower value than specified then it will be set
to the specified value.
Offset Metric
Limit Metric To
Chapter 4: Routing
Setting up OSPF can seem complicated because of the large number of configuration
possibilities that OSPF offers. However, in many cases a simple OSPF solution using a minimum
of NetDefendOS objects is needed and setup can be straightforward.
Let us examine again the simple scenario described earlier with just two NetDefend Firewalls.
In this example we connect together the two NetDefend Firewalls with OSPF so they can share
the routes in their routing tables. Both will be inside a single OSPF area which will be part of a
single OSPF autonomous system (AS). If unfamiliar with these OSPF concepts, please refer to
earlier sections for further explanation.
Beginning with just one of these firewalls, the NetDefendOS setup steps are as follows:
1. Create an OSPF Router object
Create a NetDefendOS OSPF Router Process object. This will represent an OSPF Autonomous Area
(AS) which is the highest level in the OSPF hierarchy. Give the object an appropriate name. The
Router ID can be left blank since this will be assigned automatically by NetDefendOS.
2. Add an OSPF Area to the OSPF Router
Within the OSPF Router Process created in the previous step, add a new OSPF Area object. Assign
an appropriate name and use the value 0.0.0.0 for the Area ID.
An AS can have multiple areas but in many cases only one is needed. The ID 0.0.0.0 identifies this
area as the backbone area which forms the central portion of the AS.
3. Add OSPF Interfaces to the OSPF Area
Within the OSPF Area created in the previous step, add a new OSPF Interface for each physical
interface that will be part of the area.
The OSPF Interface object needs the following parameters specified in its properties:
Interface - the physical interface which will be part of the OSPF area.
Network - the network on the interface that will be part of the area.
This does not need to be specified and if it is not, the network assigned to the physical
interface is used. For example if lan is the interface then lannet will be the default network.
Interface Type - this would normally be Auto so that the correct type is automatically
selected.
The Passive option No OSPF routers connected to this interface must be enabled if the
physical interface does not connect directly to another OSPF Router (in other words, with
another NetDefend Firewall that acts as an OSPF router). For example, the interface may only
be connected to a network of clients, in which case the option would be enabled.
The option must be disabled if the physical interface is connected to another firewall which is
set up as an OSPF Router. In this example, the physical interface connected to the other
firewall would have this option disabled.
A Dynamic Routing Policy Rule object is added. This rule should be an Import rule that
enables the option From OSPF Process so that the previously defined OSPF Router Process
object is selected. What we are doing is saying that we want to import all routes from the
256
Chapter 4: Routing
OSPF AS.
In addition, the optional Or is within filter parameter for the destination network must be
set to be all-nets. We could use a narrower filter for the destination network but in this case
we want all networks.
ii.
Within the Dynamic Routing Policy Rule just added, we now add a Routing Action object. Here
we add the routing table into the Selected list which will receive the routing information
from OSPF.
In the typical case this will be the routing table called main.
There is no need to have a Dynamic Routing Policy Rule which exports the local routing table into
the AS since this is done automatically for OSPF Interface objects.
The exception to this is if a route involves an ISP gateway (in other words, a router hop). In this
case the route MUST be explicitly exported. The most frequent case when this is necessary is for
the all-nets route to the external public Internet where the gateway is the ISP's router. Doing this
is discussed in the next step.
5. Add a Dynamic Routing Rule for all-nets
Optionally, a Dynamic Routing Rule needs to be defined if any routes except the OSPF Interface
routes are to be exported. This involves the following steps
i.
A Dynamic Routing Policy Rule object is added. This rule should be an Export rule that enables
the option From Routing Table with the main routing table moved to the Selected list.
In addition, the optional Or is within filter parameter for the destination network must be
set to be all-nets. This means all routes will be exported.
ii.
Within the Dynamic Routing Policy Rule just added, we now add an OSPF Action object. Here
set the Export to process option to be the OSPF Router Process which represents the OSPF
AS.
257
Chapter 4: Routing
It is now possible to check that OSPF is operating and that routing information is exchanged.
This can be done by examining the routing tables. Routes that have been imported into the
routing tables though OSPF are indicated with the letter "O" to the left of the route description.
For example, the routes command might give the following output:
gw-world:/> routes
Flags Network
----- --------------192.168.1.0/24
172.16.0.0/16
O
192.168.2.0/24
Iface
Gateway
Local IP
----------- --------------- ---------lan
wan
wan
172.16.2.1
Metric
-----0
0
1
Here, the route for 192.168.2.0/24 has been imported via OSPF and that network can be found on
the WAN interface with the gateway of 172.16.2.1. The gateway in this case is of course the
NetDefend Firewall to which the traffic should be sent. That firewall may or may not be attached
to the destination network but OSPF has determined that that is the optimum route to reach it.
The CLI command ospf can also be used to indicate OSPF status. The options for this command
are fully described in the CLI Reference Guide.
258
Chapter 4: Routing
For the IPv4 address of the router, we simply use any single IP address from the network
192.168.55.0/24. For example, 192.168.55.1.
When NetDefendOS sets up OSPF, it will look at this OSPF Neighbor object and will try to send
OSPF messages to the IPv4 address 192.168.55.1. The OSPF Interface object defined in the
previous step tells NetDefendOS that OSPF related traffic to this IP address should be routed into
the IPsec tunnel.
5. Set the Local IP of the tunnel endpoint
To finish the setup for firewall A there needs to be two changes made to the IPsec tunnel setup
on firewall B. These are:
i.
In the IPsec tunnel properties, the Local Network for the tunnel needs to be set to all-nets.
This setting acts as a filter for what traffic is allowed into the tunnel and all-nets will allow all
traffic into the tunnel.
ii.
In the routing section of the IPsec properties, the Specify address manually option needs
to be enabled and the IPv4 address in this example of 192.168.55.1 needs to be entered (in
the CLI, OriginatorType is set to manual and the OriginatorIP is 192.168.55.1). This sets the
tunnel endpoint IP to be 192.168.55.1 so that all OSPF traffic will be sent to firewall A with
this source IP.
The result of doing this is to "core route" OSPF traffic coming from firewall A. In other words the
traffic is destined for NetDefendOS.
6. Repeat the steps for the other firewall
What we have done so far is allow OSPF traffic to flow from A to B. The steps above need to be
repeated as a mirror image for firewall B using the same IPsec tunnel but using a different
random internal IP network for OSPF setup.
259
Chapter 4: Routing
Here, two identical NetDefend Firewalls called A and B are joined together directly via their If3
interfaces. Each has a network of hosts attached to its If1 interface. On one side, If1_net is the
IPv4 network 10.4.0.0/16 and on the other side it is the IPv4 network 192.168.0.0/24.
The goal is to configure OSPF on both firewalls so routing information is automatically
exchanged and traffic can be correctly routed between the 10.4.0.0/16 network and the
192.168.0.0/24 network. The IP rules that are needed to allow such traffic to flow are not included
in this example.
Example 4.9. Creating an OSPF Router Process
First the Autonomous System (AS) must be defined on both firewalls.
On firewall A, create an OSPF Router Process object. Assume the object name will be as_0.
Command-Line Interface
gw-world:/> add OSPFProcess as_0
Web Interface
1.
Go to: Network > Routing > OSPF > Add > OSPF Router Process
2.
3.
Click OK
Now, repeat this for firewall B, using the same OSPF Router Process object name of as_0.
260
Chapter 4: Routing
Name
---area_1
Area ID
------0.0.0.0
Comments
-------<empty>
Web Interface
1.
2.
3.
4.
5.
Click OK
Now, repeat this for firewall B, using the same OSPF Area object name of area_0.
261
Chapter 4: Routing
Enabling the Passive option means that this interface is not connected to another OSPF router.
Finally, return to the default CLI context:
gw-world:/as_0/area_0> cc
gw-world:/>
Web Interface
1.
Go to: Network > Routing > OSPF > as_0 > area_0 > OSPF Interfaces
2.
3.
4.
5.
6.
Click OK
Just selecting the Interface means that the Network defaults to the network bound to that
interface. In this case If1_net.
This should be repeated for all interfaces that will be part of the OSPF area. In this case, the
interface If3 must also be added as an OSPFInterface but the Passive property should be left at its
default value of enabled since this interface is connected to another router.
firewall B, should then be set up in the same way.
Example 4.12. Import Routes from an OSPF AS into the Main Routing Table
In this example, the routes received using OSPF will be added into the main routing table. To do
this, a Dynamic Routing Policy Rule first needs to be created. In this example, the rule is called
ImportOSPFRoutes.
The rule must specify from what OSPF AS the routes should be imported. In this example, the
OSPF AS configured above, with the name as_0, is used.
Depending on the routing topology, it may be preferable to just import certain routes using the
Destination Interface/Destination Network filters, but in this scenario all routes that are within the
all-nets network object are allowed.
The steps are first performed for firewall A.
Command-Line Interface
gw-world:/> add DynamicRoutingRule
OSPFProcess=as_0
Name=ImportOSPFRoutes
DestinationNetworkIn=all-nets
Web Interface
262
Chapter 4: Routing
1.
Go to: Network > Routing > Routing Rules > Add > Dynamic Routing Policy Rule
2.
3.
4.
5.
Choose all-nets in the ...Or is within filter option for Destination Interface
6.
Click OK
Now, create a Dynamic Routing Action that will import routes into the routing table. The
destination routing table that the routes should be added to is main.
Command-Line Interface
First, change the CLI context to be the DynamicRoutingRule just added for import:
gw-world:/> cc DynamicRoutingRule ImportOSPFRoutes
Web Interface
1.
2.
3.
4.
5.
Click OK
263
Chapter 4: Routing
OSPFProcess=as_0
Name=ExportDefRoute
DestinationNetworkIn=all-nets
DestinationInterface=If3
From=RTable
RoutingTable=main
Web Interface
1.
Go to: Network > Routing > Routing Rules > Add > Dynamic Routing Policy Rule
2.
3.
4.
5.
6.
Click OK
Next, create an OSPF Action that will export the filtered route to the specified OSPF AS:
Command-Line Interface
First, change the CLI context to be the DynamicRoutingRule just added for export:
gw-world:/> cc DynamicRoutingRule ExportDefRoute
Web Interface
1.
2.
3.
4.
5.
Click OK
264
Chapter 4: Routing
265
Chapter 4: Routing
Web Interface
1.
2.
3.
Now enter:
4.
Click OK
Usually, there is only one OSPFProcess defined for a firewall and there is therefore no need to
specify this explicitly in the command. The snooping processes is turned off with:
gw-world:/> ospf -snoop=off
A snapshot of the state of any of the different OSPF components can be displayed. For example,
if an OSPFInterface object has the name ospf_If1, details about this can be shown with the
command:
gw-world:/> ospf -interface ospf_If1
A similar snapshot can be displayed for areas, neighbors, routes and LSAs.
OSPF interface operation can also be selectively halted and restarted. For example, to stop the
OSPFInterface called ospf_If1, the CLI command would be:
gw-world:/> ospf -ifacedown ospf_If1
An entire functioning OSPFRouteProcess can also be halted. For example, assuming that there is
only one OSPFRouteProcess object defined in the configuration, the CLI command to halt it is:
gw-world:/> ospf -execute=stop
266
Chapter 4: Routing
The ospf command options are fully described in the separate NetDefendOS CLI Reference Guide.
267
Chapter 4: Routing
Class D of the IPv4 address space which is reserved for multicast traffic. Each multicast IP
address represent an arbitrary group of recipients.
The Internet Group Membership Protocol (IGMP) allows a receiver to tell the network that it is a
member of a particular multicast group.
Protocol Independent Multicast (PIM) is a group of routing protocols for deciding the optimal
path for multicast packets.
Underlying Principles
Multicast routing functions on the principle that an interested receiver joins a group for a
multicast by using the IGMP protocol. PIM routers can then duplicate and forward packets to all
members of such a multicast group, thus creating a distribution tree for packet flow. Rather than
acquiring new network information, PIM uses the routing information from existing protocols,
such as OSPF, to decide the optimal path.
Promiscuous Mode
268
Chapter 4: Routing
If an IP rule exists in the rule set which applies to a multicast packet's destination IP address, then
that Ethernet interface automatically gets its receive mode set to promiscuous in order to receive
multicast packets. Promiscuous mode means that traffic with a destination MAC address that does
not match the Ethernet interface's MAC address will be sent to NetDefendOS and not discarded
by the interface. Promiscuous mode is enabled automatically by NetDefendOS and the
administrator does not need to worry about doing this.
With multicast only, the usage of promiscuous mode can be explicitly controlled using the
Ethernet object property Receive Multicast Traffic which has a default value of Auto. If this
property is set to Off, the multicast forwarding feature cannot function.
If the administrator enters a CLI ifstat <ifname> command, the Receive Mode status line will show
the value Promiscuous next to it instead of Normal to indicate the mode has changed. This is
discussed further in Section 3.4.2, Ethernet Interfaces.
Using IGMP
The traffic flow specified by the multiplex rule must have been requested by hosts using
IGMP before any multicast packets are forwarded through the specified interfaces. This is the
default behavior of NetDefendOS.
Chapter 4: Routing
configuration can be found later in Section 4.6.3.1, IGMP Rules Configuration - No Address
Translation.
Example 4.15. Forwarding of Multicast Traffic using the SAT Multiplex Rule
In this example, we will create a multiplex rule in order to forward the multicast groups
239.192.10.0/24:1234 to the interfaces if1, if2 and if3. All groups have the same sender
192.168.10.1 which is located somewhere behind the wan interface.
The multicast groups should only be forwarded to the out interfaces if clients behind those
interfaces have requested the groups using IGMP. The following steps need to be performed to
configure the actual forwarding of the multicast traffic. IGMP has to be configured separately.
Web Interface
A. Create a custom service for multicast called multicast_service:
270
Chapter 4: Routing
1.
2.
Now enter:
Name: multicast_service
Type: UDP
Destination: 1234
B. Create an IP rule:
1.
2.
3.
Service: multicast_service
4.
Click the Multiplex SAT tab and add the output interfaces if1, if2 and if3 one at a time. For
each interface, leave the IPAddress field blank since no destination address translation is
wanted.
5.
6.
Click OK
The two values {outif;ip} represent a combination of output interface and, if address translation of
a group is needed, an IP address.
271
Chapter 4: Routing
If, for example, multiplexing of the multicast group 239.192.100.50 is required to the output
interfaces if2 and if3, then the command to create the rule would be:
gw-world:/> add IPRule
SourceNetwork=<srcnet>
SourceInterface=<if1>
DestinationInterface=core
DestinationNetwork=239.192.100.50
Action=MultiplexSAT
Service=<service>
MultiplexArgument={if2;},{if3;}
The destination interface is core since 239.192.100.50 is a multicast group. No address translation
of 239.192.100.50 was added but if it is required for, say, if2 then the final argument would be:
MultiplexArgument={if2;<new_ip_address>},{if3;}
This scenario is based on the previous scenario but this time the multicast group is translated.
When the multicast streams 239.192.10.0/24 are forwarded through the if2 interface, the
multicast groups should be translated into 237.192.10.0/24.
No address translation should be made when forwarding through interface if1. The configuration
of the corresponding IGMP rules can be found below in Section 4.6.3.2, IGMP Rules Configuration
- Address Translation.
Tip
As previously noted, remember to add an Allow rule matching the SAT Multiplex rule.
272
Chapter 4: Routing
The following SAT Multiplex rule needs to be configured to match the scenario described above:
Web Interface
A. Create a custom service for multicast called multicast_service:
1.
2.
Now enter:
Name: multicast_service
Type: UDP
Destination: 1234
B. Create an IP rule:
1.
2.
3.
Service: multicast_service
4.
5.
6.
Add interface if2 but this time, enter 237.192.10.0 as the IPAddress
7.
8.
Click OK
Chapter 4: Routing
IGMP signaling between hosts and routers can be divided into two categories:
IGMP Reports
Reports are sent from hosts towards the router when a host wants to subscribe to new
multicast groups or change current multicast subscriptions.
IGMP Queries
Queries are IGMP messages sent from the router towards the hosts in order to make sure that
it will not close any stream that some host still wants to receive.
Normally, both types of rule have to be specified for IGMP to function but there are two
exceptions:
1.
If the multicast source is located on a network directly connected to the router, no query
rule is needed.
2.
Snoop Mode
Proxy Mode
The operation of these two modes are shown in the following illustrations:
274
Chapter 4: Routing
In Snoop Mode, the NetDefend Firewall will act transparently between the hosts and another
IGMP router. It will not send any IGMP Queries. It will only forward queries and reports between
the other router and the hosts.
In Proxy Mode, the firewall will act as an IGMP router towards the clients and actively send
queries. Towards the upstream router, the firewall will be acting as a normal host, subscribing to
multicast groups on behalf of its clients.
Go to: Network > Routing > IGMP Rules > Add > IGMP Rule
2.
275
Chapter 4: Routing
3.
4.
Type: Report
Action: Proxy
Click OK
Again, go to: Network > Routing > IGMP Rules > Add > IGMP Rule
2.
3.
4.
Type: Query
Action: Proxy
Click OK
Chapter 4: Routing
Address Translation scenario described above in Section 4.6.2.2, Multicast Forwarding - Address
Translation Scenario. We need two IGMP report rules, one for each client interface. The interface
if1 uses no address translation and if2 translates the multicast group to 237.192.10.0/24. We also
need two query rules, one for the translated address and interface, and one for the original
address towards if1.
Two examples are provided, one for each pair of report and query rule. The upstream multicast
router uses IP UpstreamRouterIP.
Example 4.18. if1 Configuration
The following steps needs to be executed to create the report and query rule pair for if1 which
uses no address translation.
Web Interface
A. Create the first IGMP Rule:
1.
Go to: Network > Routing > IGMP Rules > Add > IGMP Rule
2.
3.
4.
Type: Report
Action: Proxy
Click OK
Again, go to: Network > Routing > IGMP Rules > Add > IGMP Rule
2.
Type: Query
Action: Proxy
277
Chapter 4: Routing
3.
4.
Click OK
Go to: Network > Routing > IGMP Rules > Add > IGMP Rule
2.
3.
4.
Type: Report
Action: Proxy
Click OK
278
Chapter 4: Routing
Again, go to: Network > Routing > IGMP Rules > Add > IGMP Rule
2.
3.
4.
Type: Query
Action: Proxy
Click OK
279
Chapter 4: Routing
280
Chapter 4: Routing
Setup Issues
There are certain issues that must be noted with tunneling multicast:
Make sure that the multicast server is sending the stream with a higher TTL than 1 (VLC uses
TTL=1 by default).
When using IGMP, make sure that the destination network is not set to all-nets. If it is, the
multiplex rule will not forward the stream to the correct interface.
SAT Multiplex rules must be setup both on the firewall the server is behind and on the
firewall the clients are behind (in other words, the tunnel terminator).
Incoming and outgoing IGMP rules for reporting and querying must be configured on both
sides of the tunnel if IGMP is used.
281
Chapter 4: Routing
Configure a GRE Tunnel object with the remote network being the client network for the
server side and the server network on the client side.
Configure routes that route multicast traffic bound for the network on the other side through
the GRE tunnel.
For the SAT Multiplex rules, enable the option: Multicast traffic must have been requested
using IGMP before it is forwarded.
An Example Configuration
An example multicast tunneling scenario is illustrated below.
The IPv4 address book object called mc_group on both sides of the tunnel is the same multicast
IPv4 range. In this example, 239.100.100.0/24.
282
Chapter 4: Routing
client_net, the local internal tunnel endpoint is If2_ip (the server is on the If2 interface). A GRE
tunnel called gre_to_clients is configured and the remote network is the address book object
called client_net.
GRE Tunnel
Name
IP Address
Remote Endpoint
Remote Network
gre_to_clients
If2_ip
client_interface_ip
client_net
Routes
Provided that the above GRE object has the option to automatically add routes enabled, the
following route will be added by NetDefendOS to the main routing table.
Network
Interface
client_net
gre_to_clients
Services
Name
Type
Destination Ports
mc_stream
udp
1234
IP Rules
Action
Source
Interface
Source
Network
Destination
Interface
Destination
Network
Service
MultiplexSAT
Interface
MultiplexSAT
If2
If2_net
core
mc_group
mc_stream
gre_to_clients
Allow
If2
If2_net
core
mc_group
mc_stream
Type
Action
Source
Interface
Source
Network
Multicast
Group
Multicast
Source
Relay
Interface
Query
Proxy
If2
If2_net
mc_group
all-nets
gre_to_clients
Report
Proxy
gre_clients
all-nets
all-nets
all-nets
If2
IGMP Rules
IP Address
Remote Endpoint
Remote Network
gre_to_server
If3_ip
server_interface_ip
server_net
Routes
Provided that the above GRE object has the option to automatically add routes enabled, the
following route will be added by NetDefendOS to the main routing table.
Network
Interface
server_net
gre_to_server
283
Chapter 4: Routing
Services
Name
Type
Destination Ports
mc_stream
udp
1234
IP Rules
Action
Source
Interface
Source
Network
Destination
Interface
Destination
Network
Service
MultiplexSAT
Interface
MultiplexSAT
gre_to_server
server_net
core
mc_group
mc_stream
If3
Allow
gre_to_server
server_net
core
mc_group
mc_stream
Type
Action
Source
Interface
Source
Network
Multicast
Group
Multicast
Source
Relay
Interface
Query
Proxy
If3
If3_net
mc_group
all-nets
gre_to_server
Report
Proxy
gre_to_server
all-nets
all-nets
all-nets
If3
IGMP Rules
284
Chapter 4: Routing
Switch Routes
Transparent mode is enabled by specifying a Switch Route instead of a standard Route in routing
tables. The switch route usually specifies that the network all-nets is found on a specific interface.
NetDefendOS then uses ARP message exchanges over the connected Ethernet network to
identify and keep track of which host IP addresses are located on that interface (this is explained
further below). There should not be a normal non-switch route for that same interface.
In certain, less usual circumstances, switch routes can have a network range specified instead of
all-nets. This is usually when a network is split between two interfaces but the administrator does
not know exactly which users are on which interface.
Usage Scenarios
Two examples of transparent mode usage are:
285
Chapter 4: Routing
With non-switch routes, the NetDefend Firewall acts as a router and routing operates at layer 3 of
the OSI model. If the firewall is placed into a network for the first time, or if network topology
changes, the routing configuration must therefore be checked and adjusted to ensure that the
routing table is consistent with the new layout. Reconfiguration of IP settings may be required
for pre-existing routers and protected servers. This works well when comprehensive control over
routing is desired.
With switch routes, the NetDefend Firewall operates in transparent mode and resembles a OSI
Layer 2 Switch in that it screens IP packets and forwards them transparently to the correct
interface without modifying any of the source or destination information at the IP or Ethernet
levels. This is achieved by NetDefendOS keeping track of the MAC addresses of the connected
hosts and NetDefendOS allows physical Ethernet networks on either side of the NetDefend
Firewall to act as though they were a single logical IP network. (See Appendix D, The OSI
Framework for an overview of the OSI layer model.)
Two benefits of transparent mode over conventional routing are:
A user can move from one interface to another in a "plug-n-play" fashion, without changing
their IP address (assuming their IP address is fixed). The user can still obtain the same services
as before (for example HTTP, FTP) without any need to change routes.
286
Chapter 4: Routing
address and interface. As the Layer 3 Cache is only used for IP traffic, Layer 3 Cache entries are
stored as single host entries in the routing table.
For each IP packet that passes through the NetDefend Firewall, a route lookup for the destination
is done. If the route of the packet matches a Switch Route or a Layer 3 Cache entry in the routing
table, NetDefendOS knows that it should handle this packet in a transparent manner. If a
destination interface and MAC address is available in the route, NetDefendOS has the necessary
information to forward the packet to the destination. If the route was a Switch Route, no specific
information about the destination is available and the firewall will have to discover where the
destination is located in the network.
Discovery is done by NetDefendOS sending out ARP as well as ICMP (ping) requests, acting as the
initiating sender of the original IP packet for the destination on the interfaces specified in the
Switch Route. If an ARP reply is received, NetDefendOS will update the CAM table and Layer 3
Cache and forward the packet to the destination.
If the CAM table or the Layer 3 Cache is full, the tables are partially flushed automatically. Using
the discovery mechanism of sending ARP and ICMP requests, NetDefendOS will rediscover
destinations that may have been flushed.
The interfaces that are to be transparent should be first collected together into a single
Interface Group object. Interfaces in the group should be marked as Security transport
equivalent if hosts are to move freely between them.
2.
A Switch Route is now created in the appropriate routing table and the interface group
associated with it. Any existing non-switch routes for interfaces in the group should be
removed from the routing table.
For the Network parameter in the switch route, specify all-nets or alternatively, specify a
network or range of IP addresses that will be transparent between the interfaces (this latter
option is discussed further below).
3.
Create the appropriate IP rules in the IP rule set to allow the desired traffic to flow between
the interfaces operating in transparent mode.
If no restriction at all is to be initially placed on traffic flowing in transparent mode, the
following single IP rule could be added but more restrictive IP rules are recommended.
Action
Src Interface
Src Network
Dest Interface
Dest Network
Service
Allow
any
all-nets
any
all-nets
all_services
287
Chapter 4: Routing
Specifying a network or address range is, of course, only possible if the administrator has some
knowledge of the network topology and often this may not be the case.
Connecting together switch routes in this way only applies, however, if all interfaces are
associated with the same routing table. The situation where they are not, is described next.
The diagram above illustrates how switch route interconnections for one routing table are
completely separate from the switch route interconnections for another routing table. By using
different routing tables in this way we can create two separate transparent mode networks.
The routing table used for an interface is decided by the Routing Table Membership parameter for
each interface. To implement separate transparent mode networks, interfaces must have their
Routing Table Membership reset.
By default, all interfaces have Routing Table Membership set to be all routing tables. By default,
one main routing table always exists and once an additional routing table has been defined, the
Membership for any interface can then be set to be that new table.
288
Chapter 4: Routing
Interface
all-nets
vlan5_if1
all-nets
vlan5_if2
Instead of creating individual entries, an interface group could be used in the above routing
table.
No other non-switched routes should be in this routing table because traffic that follows such
routes will be tagged incorrectly with the VLAN ID.
Finally, we must associate this routing table with its VLAN interface by defining a Policy Based
Routing Rule.
Chapter 4: Routing
clients located behind a firewall operating in transparent mode. In this case, NetDefendOS must
be correctly configured as a DHCP relayer to correctly forward DHCP traffic between users and
the DHCP server.
It may also be the case that the exact IP address of the DHCP server is unknown but what is
known is the Ethernet interface to which the DHCP server is connected.
To enable DHCP requests to be relayed through the firewall, the following steps are needed:
Define a static route which routes the IPv4 address 255.255.255.255 to the interface
connected to the DHCP server.
Define a static ARP table entry which maps the MAC address FF-FF-FF-FF-FF-FF to the IPv4
address 255.255.255.255 on the interface connected to the DHCP server.
ii.
iii.
Enable the option: The relayer uses the IP of the interface which it uses to send
requests to the server.
Further explanation of setting up DHCP relay with NetDefendOS can be found in Section 5.3,
DHCP Relay.
The non-switch route usually needed to allow Internet access would be:
Route type
Interface
Destination
Gateway
Non-switch
if1
all-nets
gw-ip
Now lets suppose the NetDefend Firewall is to operate in transparent mode between the users
and the ISP. The illustration below shows how, using switch routes, the NetDefend Firewall is set
up to be transparent between the internal physical Ethernet network (pn2) and the Ethernet
network to the ISP's gateway (pn1). The two Ethernet networks are treated as a single logical IP
network in Transparent Mode with a common address range (in this example 192.168.10.0/24).
290
Chapter 4: Routing
In this situation, any "normal" non-switch all-nets routes in the routing table should be removed
and replaced with an all-nets switch route (not doing this is a common mistake during setup).
This switch route will allow traffic from the local users on Ethernet network pn2 to find the ISP
gateway.
These same users should also configure the Internet gateway on their local computers to be the
ISPs gateway address. In non-transparent mode the user's gateway IP would be the NetDefend
Firewall's IP address but in transparent mode the ISP's gateway is on the same logical IP network
as the users and will therefore be gw-ip.
Interface
Destination
Switch
if1
all-nets
Gateway
Switch
if2
all-nets
Non-switch
if1
85.12.184.39
gw-ip
Non-switch
if1
194.142.215.15
gw-ip
The appropriate IP rules will also need to be added to the IP rule set to allow Internet access
through the NetDefend Firewall.
Grouping IP Addresses
It can be quicker when dealing with many IP addresses to group all the addresses into a single
group IP object and then use that object in a single defined route. In the above example,
85.12.184.39 and 194.142.215.15 could be grouped into a single object in this way.
Using NAT
NAT should not be enabled for NetDefendOS in Transparent Mode since, as explained previously,
the NetDefend Firewall is acting like a level 2 switch and address translation is done at the higher
IP OSI layer.
291
Chapter 4: Routing
The other consequence of not using NAT is that IP addresses of users accessing the Internet
usually need to be public IPv4 addresses.
If NATing needs to be performed in the example above to hide individual addresses from the
Internet, it would have to be done by a device (possibly another NetDefend Firewall) between
the 192.168.10.0/24 network and the public Internet. In this case, internal, private IPv4 addresses
could be used by the users on Ethernet network pn2.
292
Chapter 4: Routing
Web Interface
Configure the wan interface:
1.
2.
3.
Now enter:
4.
IP Address: 10.0.0.1
Network: 10.0.0.0/24
Click OK
2.
3.
Now enter:
4.
IP Address: 10.0.0.2
Network: 10.0.0.0/24
Click OK
2.
Now enter:
Name: http_allow
Action: Allow
Service: http
293
Chapter 4: Routing
3.
Click OK
Scenario 2
In the second scenario, the NetDefend Firewall in transparent mode separates server resources in
the DMZ from an internal local network. Each is connected to a separate interface without the
need for different address ranges.
All hosts connected to lan and dmz interfaces share the 10.0.0.0/24 address space. As this is
configured using transparent mode, any IP address can be used for the servers and there is no
need for the hosts on the internal network to know if a resource is on the same network or
placed in the DMZ.
The clients on the internal network are allowed to communicate with an HTTP server on the DMZ
network. At the same time, the DMZ HTTP server is reachable from the public Internet. The
NetDefend Firewall is transparent between the dmz and lan interfaces but traffic is still controlled
by IP rules.
294
Chapter 4: Routing
Command-Line Interface
Configure the lan interface:
gw-world:/> set Interface Ethernet lan
IP=10.0.0.1
Network=10.0.0.0/24
AutoSwitchRoute=No
Add a switch route in the main routing table for the group:
gw-world:/> cc RoutingTable main
gw-world:/main> add SwitchRoute
Interface=transparent_group
Network=10.0.0.0/24
gw-world:/main> cc
gw-world:/>
295
Chapter 4: Routing
Web Interface
Configure the interfaces:
1.
2.
3.
Now enter:
IP Address: 10.0.0.1
Network: 10.0.0.0/24
4.
Click OK
5.
6.
7.
Now enter:
8.
IP Address: 10.0.0.2
Network: 10.0.0.0/24
Click OK
Go to: Network > Interfaces and VPN > Interface Groups > Add > InterfaceGroup
2.
Now enter:
3.
Name: transparent_group
Click OK
Go to: Network > Routing > Routing Tables > main > Add > SwitchRoute
2.
Now enter:
Network: 10.0.0.0/24
296
Chapter 4: Routing
3.
Click OK
2.
Now enter:
Name: http_lan_to_dmz
Action: Allow
Service: http
3.
Click OK
4.
5.
Now enter:
Name: http_wan_to_dmz_sat
Action: SAT
Service: http
Translate: Destination IP
6.
Click OK
7.
8.
Now enter:
Name: http_wan_to_dmz
Action: Allow
Service: http
297
Chapter 4: Routing
9.
Click OK
Chapter 4: Routing
NetDefendOS checks the contents of BDPU messages to make sure the content type is
supported. If it is not, the frame is dropped.
Decrement TTL
Enable this if the TTL should be decremented each time a packet traverses the firewall in
transparent mode.
Default: Disabled
CAM Size
If the Dynamic CAM Size setting is not enabled then this is the maximum number of entries in
each CAM table.
Default: 8192
L3 Cache Size
This setting is used to manually configure the size of the Layer 3 Cache. Enabling Dynamic L3C
299
Chapter 4: Routing
Default: Drop
Relay MPLS
When set to Ignore all incoming MPLS packets are relayed in transparent mode. Options:
Default: Drop
300
Chapter 4: Routing
301
5.1. Overview
Dynamic Host Configuration Protocol (DHCP) is a protocol that allows network administrators to
automatically assign IP numbers to computers on a network.
IP Address Assignment
A DHCP Server implements the task of assigning IP addresses to DHCP clients. These addresses
come from a predefined IP address pool which DHCP manages. When a DHCP server receives a
request from a DHCP client, it returns the configuration parameters (such as an IP address, a MAC
address, a domain name, and a lease for the IP address) to the client in a unicast message.
DHCP Leases
Compared to static assignment, where the client owns the address, dynamic addressing by a
DHCP server leases the address to each client for a predefined period of time. During the lifetime
of a lease, the client has permission to keep the assigned address and is guaranteed to have no
address collision with other clients.
Lease Expiration
Before the expiration of the lease, the client needs to renew the lease from the server so it can
keep using the assigned IP address. The client may also decide at any time that it no longer
wishes to use the IP address it was assigned, and may terminate the lease and release the IP
address.
The lease time can be configured in a DHCP server by the administrator.
302
Interface
Each NetDefendOS interface can have, at most, one single logical DHCP server associated
with it. In other words, NetDefendOS can provision DHCP clients using different address
ranges depending on what interface they are located on.
Relayer IP
The relayer IP address in the IP packet is also used to determine the server. The default value
of all-nets means that this all addresses are accepted and only the interface is considered in
making a DHCP server selection. The other options for this parameter are described further
below.
all-nets
The default value is all-nets (0.0.0.0/0). This means all DHCP requests will match this filter
value regardless if the DHCP requests comes from a client on the local network or has arrived
via a DHCP relayer.
A value of 0.0.0.0
The value 0.0.0.0 will match DHCP requests that come from a local client only. DHCP requests
that have been relayed by a DHCP relayer will be ignored.
A specific IP address.
This is the IP address of the DHCP relayer through which the DHCP request has come.
Requests from local clients or other DHCP relayers will be ignored.
303
DHCP Options
The following options can be configured for a DHCP server:
General Parameters
Name
A symbolic name for the server. Used as an interface reference but also
used as a reference in log messages.
Interface Filter
IP Address Pool
Netmask
Optional Parameters
Default GW
Domain
Lease Time
Primary/Secondary DNS
Primary/Secondary NBNS/WINS
Next Server
1.
2.
3.
304
86400 seconds.
Web Interface
1.
Go to: Network > Network Services > DHCP Servers >Add > DHCPServer
2.
Now enter:
3.
Name: DHCPServer1
Netmask: 255.255.255.0
Click OK
Mode
------------ACTIVE(STATIC)
ACTIVE(STATIC)
ACTIVE(STATIC)
INACTIVE(STATIC)
INACTIVE(STATIC)
INACTIVE(STATIC)
ACTIVE
ACTIVE
ACTIVE
ACTIVE
The asterisk "*" before a MAC address means that the DHCP server does not track the client using
the MAC address but instead tracks the client through a client identifier which the client has given
to the server.
305
To display all DHCP information use the dhcpserver command with no options. Each individually
configured DHCP server is referred to as a Rule which is given a unique number. This number is
used to identify which lease belongs to which server in the CLI output. To see just the configured
DHCP servers, use the command:
gw-world:/> dhcpserver -show -rules
Static Hosts.
Custom Options.
Where the administrator requires a fixed relationship between a client and the assigned IP
address, NetDefendOS allows the assignment of a given IP to a specific MAC address. In other
words, the creation of a static host.
MAC Address
This is the MAC address of the client. Either the MAC address can be
used or the alternative Client Identified parameter can be used.
Client Identified
If the MAC address is not used for identifying the client then the client
can send an identifier in its DHCP request. The value of this identifier
can be specified as this parameter. The option exists to also specify if
the identifier will be sent as an ASCII or Hexadecimal value.
2.
3.
All static assignments can then be listed and each is listed with an index number:
gw-world:/DHCPServer1> show
4.
#
1
Comments
------<empty>
Value
----------------1
192.168.1.1
00-90-12-13-14-15
<empty>
307
5.
The assignment could be changed later to IP address 192.168.1.12 with the following
command:
gw-world:/DHCPServer1> set DHCPServerPoolStaticHost 1
Host=192.168.1.12
MACAddress=00-90-12-13-14-15
Web Interface
1.
Go to: Network > DHCP Services > DHCP Servers > DHCPServer1 > Static Hosts > Add >
Static Host Entry
2.
Now enter:
3.
Host: 19.168.1.1
MAC: 00-90-12-13-14-15
Click OK
This is the code that describes the type of information being sent to the client. A large
list of possible codes exists.
Type
This describes the type of data which will be sent. For example, if the type is String then
the data is a character string.
Data
This is the actual information that will be sent in the lease. This can be one value or a
comma separated list.
The meaning of the data is determined by the Code and Type. For example, if the code is
set to 66 (TFTP server name) then the Type could be String and the Data would then be a
site name such as tftp.mycompany.com.
There is a large number of custom options which can be associated with a single DHCP server
and these are described in:
RFC 2132 - DHCP Options and BOOTP Vendor Extensions
The code is entered according to the value specified in RFC 2132. The data associated with the
code is first specified in NetDefendOS as a Type followed by the Data.
308
Add the VLAN interfaces vlan1 and vlan2 that should relay to an interface group called
ipgrp-dhcp:
gw-world:/> add Interface InterfaceGroup ipgrp-dhcp
Members=vlan1,vlan2
2.
309
Web Interface
Adding VLAN interfaces vlan1 and vlan2 that should relay to an interface group named as
ipgrp-dhcp:
1.
Go to: Network > Interfaces and VPN > Interface Groups > Add > Interface Group
2.
Now enter:
3.
Name: ipgrp-dhcp
Interfaces: select vlan1 and vlan2 from the Available list and put them into the
Selected list.
Click OK
Go to: Network > DHCP Services > DHCP Relay > Add
2.
Now enter:
Name: vlan-to-dhcpserver
Action: Relay
3.
Under the Add Route tab, check Add dynamic routes for this relayed DHCP lease
4.
Click OK
Max Transactions
Maximum number of transactions at the same time.
Default: 32
Transaction Timeout
For how long a dhcp transaction can take place.
Default: 10 seconds
Max PPM
310
How many dhcp-packets a client can send to through NetDefendOS to the dhcp-server during
one minute.
Default: 500 packets
Max Hops
How many hops the dhcp-request can take between the client and the dhcp-server.
Default: 5
311
5.4. IP Pools
Overview
An IP pool is used to offer other subsystems access to a cache of DHCP IP addresses. These
addresses are gathered into a pool by internally maintaining a series of DHCP clients (one DHCP
client per IP address). More than one DHCP server can be used by a pool and can either be
external or be local DHCP servers defined in NetDefendOS itself. Multiple IP Pools can be set up
with different identifying names.
External DHCP servers can be specified in one of two ways:
Server filter
Client IP filter
Receive Interface
MAC Range
Prefetch leases
Maximum free
Maximum clients
Sender IP
This displays all the configured IP pools along with their status. The status information is divided
into four parts:
Free maintained in pool - The number of addresses that are available for allocation.
313
Used by subsystems - The number of addresses that are allocated and active.
Other options in the ippool command allow the administrator to change the pool size and to free
up IP addresses. The complete list of command options can be found in the CLI Reference Guide.
Example 5.4. Creating an IP Pool
This example shows the creation of an IP Pool object that will use the DHCP server on IP address
28.10.14.1 with 10 prefetched leases. It is assumed that this IP address is already defined in the
address book as an IP object called ippool_dhcp
Command-Line Interface
gw-world:/> add IPPool ip_pool_1
DHCPServerType=ServerIP
ServerIP=ippool_dhcp
PrefetchLeases=10
Web Interface
1.
2.
3.
4.
5.
6.
7.
Click OK
314
315
6.1.2. IP Spoofing
Traffic that pretends it comes from a trusted host can be sent by an attacker to try and get past a
firewall's security mechanisms. Such an attack is commonly known as Spoofing.
IP spoofing is one of the most common spoofing attacks. Trusted IP addresses are used to bypass
filtering. The header of an IP packet indicating the source address of the packet is modified by
the attacker to be a local host address. The firewall will believe the packet came from a trusted
source. Although the packet source cannot be responded to correctly, there is the potential for
unnecessary network congestion to be created and potentially a Denial of Service (DoS) condition
could occur. Even if the firewall is able to detect a DoS condition, it is hard to trace or stop
because of its nature.
VPNs provide one means of avoiding spoofing but where a VPN is not an appropriate solution
then Access Rules can provide an anti-spoofing capability by providing an extra filter for source
address verification. An Access Rule can verify that packets arriving at a given interface do not
have a source address which is associated with a network of another interface. In other words:
Any incoming traffic with a source IP address belonging to a local trusted host is NOT
allowed.
Any outgoing traffic with a source IP address belonging to an outside untrusted network is
NOT allowed.
The first point prevents an outsider from using a local host's address as its source address. The
second point prevents any local host from launching the spoof.
DOS attacks are discussed further in Section 6.6, Denial-of-Service Attacks.
317
Network: The IP span that the sender address should belong to.
Accept: Accept the packets that match the defined fields for further inspection in the rule set.
Expect: If the sender address of the packet matches the Network specified by this rule, the
receiving interface is compared to the specified interface. If the interface matches, the packet
is accepted in the same way as an Accept action. If the interfaces do not match, the packet is
dropped in the same way as a Drop action.
Web Interface
1.
Go to: Network > Routing > Access > Add > Access
2.
Now enter:
318
3.
Name: lan_Access
Action: Expect
Interface: lan
Network: lannet
Click OK
319
6.2. ALGs
6.2.1. Overview
To complement low-level packet filtering, which only inspects packet headers in protocols such
as IP, TCP, UDP, and ICMP, NetDefend Firewalls provide Application Layer Gateways (ALGs) which
provide filtering at the higher application OSI level.
An ALG object acts as a mediator in accessing commonly used Internet applications outside the
protected network, for example web access, file transfer and multimedia transfer. ALGs provide
higher security than packet filtering since they are capable of scrutinizing all traffic for a specific
protocol and perform checks at the higher levels of the TCP/IP stack.
ALGs exist for the following protocols in NetDefendOS:
HTTP
FTP
TFTP
SMTP
POP3
SIP
H.323
TLS
Deploying an ALG
Once a new ALG object is defined by the administrator, it is brought into use by first associating
it with a Service object and then associating that service with an IP rule in the NetDefendOS IP
rule set.
320
URL Blacklisting
321
Specific URLs can be blacklisted so that they are not accessible. Wildcarding can be used
when specifying URLs, as described below.
2.
URL Whitelisting
The opposite to blacklisting, this makes sure certain URLs are always allowed.
Wildcarding can also be used for these URLs, as described below.
It is important to note that whitelisting a URL means that it cannot be blacklisted and it
also cannot be dropped by web content filtering (if that is enabled, although it will be
logged). Anti-Virus scanning, if it is enabled, is always applied to the HTTP traffic even if
it is whitelisted.
These features are described in depth in Section 6.3.3, Static Content Filtering.
Anti-Virus Scanning
The contents of HTTP file downloads can be scanned for viruses. Suspect files can be dropped
or just logged. This feature is common to a number of ALGs and is described fully in
Section 6.4, Anti-Virus Scanning.
2.
322
Enforce SafeSearch
The HTTP ALG can enforce that all client web searches performed with the Google,
Microsoft Bing or Yahoo search engines are performed using the SafeSearch feature of the
engine in the Strict mode. Other search engines must be explicitly blocked, for example, by
using the NetDefendOS application control feature.
By default, SafeSearch is not forced so this property must be explicitly enabled for the HTTP
ALG configuration object.
SMTP ALG:
1.
Whitelist.
2.
Blacklist.
3.
4.
As described above, if a URL is found on the whitelist then it will not be blocked if it also found
on the blacklist. If it is enabled, Anti-virus scanning is always applied, even though a URL is
whitelisted.
If it is enabled, Web content filtering is still applied to whitelisted URLs but if instead of blocking,
flagged URLs are only logged. If it is enabled, Anti-virus scanning is always applied, even though
a URL is whitelisted.
might be selected for this purpose. As long as the associated service is associated with an IP rule
then the ALG will be applied to traffic targeted by that IP rule.
With HTTPS, the traffic is encrypted and the HTTP ALG can therefore only perform two actions on
this traffic:
URL filtering.
This should be kept in mind when the service used with the ALG includes HTTPS (for example,
when using the http-all service).
FTP Connections
FTP uses two communication channels, one for control commands and one for the actual files
being transferred. When an FTP session is opened, the FTP client establishes a TCP connection
(the control channel) to port 21 (by default) on the FTP server. What happens after this point
depends on the FTP mode being used.
Active Mode
In active mode, the FTP client sends a command to the FTP server indicating what IP address
and port the server should connect to. The FTP server establishes the data channel back to
the FTP client using the received address information.
Passive Mode
In passive mode, the data channel is opened by the FTP client to the FTP server, just like the
command channel. This is the often recommended default mode for FTP clients though
some advice may recommend the opposite.
be dropped. As the port number used for the data channel is dynamic, the only way to solve this
is to allow traffic from all ports on the FTP server to all ports on the FTP client. Obviously, this is
not a good solution.
When passive mode is used, the firewall does not need to allow connections from the FTP server.
On the other hand, NetDefendOS still does not know what port the FTP client will try to use for
the data channel. This means that it has to allow traffic from all ports on the FTP client to all ports
on the FTP server. Although this is not as insecure as in the active mode case, it still presents a
potential security threat. Furthermore, not all FTP clients are capable of using passive mode.
Hybrid Mode
An important feature of the NetDefendOS FTP ALG is its automatic ability to perform on-the-fly
conversion between active and passive mode so that FTP connection modes can be combined.
Passive mode can be used on one side of the firewall while active mode can be used on the
other. This type of FTP ALG usage is sometimes referred to as hybrid mode.
The advantage of hybrid mode can be summarized as follows:
The FTP client can be configured to use passive mode, which is the recommended mode for
clients.
The FTP server can be configured to use active mode, which is the safer mode for servers.
When an FTP session is established, the NetDefend Firewall will automatically and
transparently receive the passive data channel from the FTP client and the active data
channel from the server, and correctly tie them together.
This implementation results in both the FTP client and the FTP server working in their most
secure mode. The conversion also works the other way around, that is, with the FTP client using
active mode and the FTP server using passive mode. The illustration below shows the typical
hybrid mode scenario.
326
These options can determine if hybrid mode is required to complete the connection. For
example, if the client connects with passive mode but this is not allowed to the server then
hybrid mode is automatically used and the FTP ALG performs the conversion between the two
modes.
ftp-inbound - Clients can use any mode but servers cannot use passive mode.
ftp-outbound - Clients cannot use active mode but servers can use any mode.
ftp-passthrough - Both the client and the server can use any mode.
ftp-internal - The client cannot use active mode and the server cannot use passive mode.
Allow unknown FTP commands. These are commands the ALG does not consider part of the
327
standard set.
Allow the RESUME command even if content scanning terminated the connection.
Filetype Checking
The FTP ALG offers the same filetype verification for downloaded files that is found in the HTTP
ALG. This consists of two separate options:
The above two options for filetype checking are the same as those available in the HTTP ALG and
328
Anti-Virus Scanning
The NetDefendOS Anti-Virus subsystem can be enabled to scan all FTP downloads searching for
malicious code. Suspect files can be de dropped or just logged.
This feature is common to a number of ALGs and is described fully in Section 6.4, Anti-Virus
Scanning.
Choose the ZoneDefense network in the Anti-Virus configuration of the ALG that is to be
affected by ZoneDefense when a virus is detected.
For more information about this topic refer to Chapter 12, ZoneDefense.
Example 6.2. Protecting an FTP Server with an ALG
329
As shown, an FTP Server is connected to the NetDefend Firewall on a DMZ with private IPv4
addresses, shown below:
Enable the Allow client to use active mode FTP ALG option so clients can use both active
and passive modes.
Disable the Allow server to use passive mode FTP ALG option. This is more secure for the
server as it will never receive passive mode data. The FTP ALG will handle all conversion if a
client connects using passive mode.
2.
3.
4.
5.
Click OK
330
2.
3.
Name: ftp-inbound-service
Click OK
C. Define a rule to allow connections to the public IP on port 21 and forward that to the internal
FTP server:
1.
2.
Now enter:
3.
Name: SAT-ftp-inbound
Action: SAT
Service: ftp-inbound-service
Destination Network: wan_ip (assuming the external interface has been defined as
this)
4.
5.
Enter To: New IP Address: ftp-internal (assume this internal IP address for FTP server has
been defined in the address book object)
6.
New Port: 21
7.
Click OK
D. Traffic from the internal interface needs to be NATed through a single public IPv4 address:
1.
2.
Now enter:
Name: NAT-ftp
Action: NAT
Service: ftp-inbound-service
331
3.
4.
5.
Click OK
2.
Now enter:
3.
4.
Name: Allow-ftp
Action: Allow
Service: ftp-inbound-service
Click OK
332
Disable the Allow client to use active mode FTP ALG option so clients can only use passive
mode. This is much safer for the client.
Enable the Allow server to use passive mode FTP ALG option. This allows clients on the
inside to connect to FTP servers that support active and passive mode across the Internet.
2.
3.
4.
5.
Click OK
333
2.
3.
Now enter:
Name: ftp-outbound-service
ALG: ftp-outbound
Click OK
C. Create IP Rules
IP rules need to be created to allow the FTP traffic to pass and these are different depending on if
private or public IPv4 addresses are being used.
i. Using Public IPs
If using public IPs, make sure there are no rules disallowing or allowing the same kind of
ports/traffic before these rules. The service used here is the ftp-outbound-service which should be
using the predefined ALG definition ftp-outbound which is described earlier.
1.
2.
Now enter:
3.
4.
Name: Allow-ftp-outbound
Action: Allow
Service: ftp-outbound-service
Click OK
2.
Now enter:
Name: NAT-ftp-outbound
Action: NAT
Service: ftp-outbound-service
334
3.
4.
5.
Click OK
Allow/Disallow Write
335
336
Block/Allow filetype
Anti-Virus scanning
Whitelist.
2.
Blacklist.
3.
4.
As described above, if an address is found on the whitelist then it will not be blocked if it also
found on the blacklist. Spam filtering, if it is enabled, is still applied to whitelisted addresses but
337
emails flagged as spam will not be tagged or dropped, only logged. Anti-virus scanning, if it is
enabled, is always applied, even though an email's address is whitelisted.
Notice that either an email's sender or receiver address can be the basis for blocking by one of
the first two filtering stages.
unsupported_extension
capability_removed
The parameter "capa=" in the log message indicates which extension the ALG removed from the
server response. For example, this parameter may appear in the log message as:
capa=PIPELINING
To indicate that the pipelining extension was removed from the SMTP server reply to an EHLO
client command.
Although ESMTP extensions may be removed by the ALG and related log messages generated,
this does not mean that any emails are dropped. Email transfers will take place as usual but
without making use of unsupported extensions removed by the ALG.
When a client tries to send an email infected with a virus, the virus is blocked and ZoneDefense
isolates the host from the rest of the network.
The steps to setting up ZoneDefense with the SMTP ALG are:
Choose the ZoneDefense network in the Anti-Virus configuration of the ALG that is to be
affected by ZoneDefense when a virus is detected.
For more information about this topic refer to Chapter 12, ZoneDefense.
Integral to the NetDefendOS SMTP ALG is a spam module that provides the ability to apply spam
filtering to incoming email as it passes through the NetDefend Firewall on its way to a local SMTP
email server. Filtering is done based on the email's origin. This approach can significantly reduce
the burden of such email in the mailboxes of users behind the NetDefend Firewall.
NetDefendOS offers two approaches to handling spam:
Letting through but flagging email that has a moderate probability of being spam.
DNSBL Databases
A number of trusted organizations maintain publicly available databases of the origin IP address
of known spamming SMTP servers and these can be queried over the public Internet. These lists
are known as DNS Black List (DNSBL) databases and the information is accessible using a
standardized query method supported by NetDefendOS. The image below illustrates all the
components involved:
340
Dropped
If the sum is greater than or equal to a predefined Drop threshold then the email is
considered to be definitely Spam and is discarded or alternatively sent to a single, special
mailbox.
If it is discarded then the administrator has the option that an error message is sent back to
the sending SMTP server (this error message is similar to the one used with blacklisting).
2.
Flagged as Spam
If the sum is greater than or equal to a predefined Spam threshold then the email is
considered as probably being Spam but forwarded to the recipient with notifying text
inserted into it.
A special email address can be configured to receive all dropped email. If this is done then
any TXT messages sent by the DNSBL servers (described next) that identified the email as
Spam can be optionally inserted by NetDefendOS into the header of the forwarded email.
If no receiver email address is configured for dropped emails then they are discarded by
NetDefendOS. The administrator can specify that an error message is sent back to the sender
address along with the TXT messages from the DNSBL servers that failed the email.
Tagging Spam
341
If an email is considered to be probably Spam because the calculated sum is above the Spam
threshold but it is below the Drop threshold, then the Subject field of the email is changed and
pre-fixed with a message and the email is forwarded on to the intended recipient. The tag
message text is specified by the administrator but can be left blank (although that is not
recommended).
An example of tagging might be if the original Subject field is:
Buy this stock today!
And if the tag text is defined to be "*** SPAM ***", then the modified email's Subject field will
become:
*** SPAM *** Buy this stock today!
And this is what the email's recipient will see in the summary of their inbox contents. The
individual user could then decide to set up their own filters in the local client to deal with such
tagged emails, possibly sending it to a separate folder.
X-Spam-TXT-Records - A list of TXT records sent by the DNSBL servers that identified the
email as Spam.
These fields can be referred to in filtering rules set up by the administrator in mail server
software.
342
Allow the email to pass but tag it using the configured spam tag.
When sender address verification is enabled, there is an additional option to only compare the
domain names in the "From" addresses.
Logging
There are three types of logging done by the Spam filtering module:
Logging of dropped or Spam tagged emails - These log messages include the source email
address and IP as well as its weighted points score and which DNSBLs caused the event.
All defined DNBSLs stop responding - This is a high severity event since all email will be
allowed through if this happens.
Setup Summary
To set up DNSBL Spam filtering in the SMTP ALG, the following list summarizes the steps:
Specify the DNSBL servers that are to be used. There can be one or multiple. Multiple servers
can act both as backups to each other as well as confirmation of a sender's status.
Specify a weight for each server which will determine how important it is in deciding if email
is Spam or not in the calculation of a weighted sum.
Specify the thresholds for designating any email as Spam. If the weighted sum is equal or
greater than these then an email will be considered to be Spam. Two thresholds are specified:
i.
Specify a textual tag to prefix to the Subject field of email designated as Spam.
Optionally specify an email address to which dropped email will be sent (as an alternative to
simply discarding it). Optionally specify that the TXT messages sent by the DNSBL servers that
failed are inserted into the header of these emails.
"From" addresses in local memory. If the cache becomes full then the oldest entry is written over
first. There are two parameters which can be configured for the address cache:
Cache Size
This is the number of entries that the cache can contain. If set to zero, the cache is not used.
Increasing the cache size increases the amount of NetDefendOS memory required for
Anti-Spam.
Cache Timeout
The timeout determines how long any address will be valid for once it is saved in the cache.
After this period of time has expired, a new query for a cached sender address must be sent
to the DNSBL servers.
The default value if 600 seconds.
Number of positive (is Spam) responses from each configured DNSBL server.
Number of failed queries (without replies) for each configured DNSBL server.
Status
Spam
Drop
Accept
-------- -------- -------- -------active
156
65
34299
inactive
0
0
0
The -show option provides a summary of the Spam filtering operation of a specific ALG. It is used
below to examine activity for my_smtp_alg although in this case, the ALG object has not yet
processed any emails.
gw-world:/> dnsbl my_smtp_alg -show
Drop Threshold
Spam Threshold
Use TXT records
IP Cache disabled
: 20
: 10
: yes
344
Configured BlackLists : 4
Disabled BlackLists
: 0
Current Sessions
: 0
Statistics:
Total number of mails checked : 0
Number of mails dropped
: 0
Number of mails spam tagged
: 0
Number of mails accepted
: 0
BlackList
Status
Value Total
Matches Failed
------------------------- -------- ----- -------- -------- -------zen.spamhaus.org
active
25
0
0
0
cbl.abuseat.org
active
20
0
0
0
dnsbl.sorbs.net
active
5
0
0
0
asdf.egrhb.net
active
5
0
0
0
To examine the statistics for a particular DNSBL server, the following command can be used.
gw-world:/> dnsbl smtp_test zen.spamhaus.org -show
BlackList: zen.spamhaus.org
Status
: active
Weight value : 25
Number of mails checked
Number of matches in list
Number of failed checks (times disabled)
: 56
: 3
: 0
To clean out the dnsbl cache for my_smtp_alg and to reset all its statistical counters, the
following command option can be used:
gw-world:/> dnsbl my_smtp_alg -clean
Hide User
345
Fail Mode
Block/Allow filetype
Anti-Virus Scanning
346
The PPTP ALG solves this problem. By using the ALG, the traffic from all the clients can be
multiplexed through a single PPTP tunnel between the firewall and the server.
Define a new PPTP ALG object with an appropriate name, for example pptp_alg. The full list of
options for the ALG are listed towards the end of this section.
Associate the new ALG object with an appropriate Service object. The predefined service
called pptp-ctl can be used for this purpose.
Alternatively, a new custom service object can be defined, for example called pptp_service.
The service must have the following characteristics:
i.
ii.
iii.
iv.
Select the ALG to be the PPTP ALG object that was defined in the first step. In this case, it
was called pptp_alg.
Associate this service object with the NAT IP rule that permits the traffic to flow from clients
to the remote endpoint of the PPTP tunnel. This may be the rule that NATs the traffic out to
the Internet with a destination network of all-nets.
The single IP rule below shows how the custom service object called pptp_service is
associated with a typical NAT rule. The clients, which are the local end point of the PPTP
tunnels, are located behind the firewall on the network lannet which is connected to the lan
interface. The Internet is found on the wan interface which is the destination interface, with
all-nets as the destination network.
Action
Src Interface
Src Network
Dest Interface
Dest Network
Service
NAT
lan
lannet
wan
all-nets
pptp_service
347
Echo timeout
Idle timeout
In most cases only the name needs to be defined and the other settings can be left at their
defaults.
348
ii.
SIP Components
The following components are the logical building blocks for SIP communication:
User Agents
These are the end points or clients that are involved in the client-to-client
communication. These would typically be the workstation or device used in
an IP telephony conversation. The term client will be used throughout this
section to describe a user agent.
Proxy Servers
These act as routers in the SIP protocol, performing both as client and
server when receiving client requests. They forward requests to a client's
current location as well as authenticating and authorizing access to
services. They also implement provider call-routing policies.
The proxy is often located on the external, unprotected side of the
NetDefend Firewall but can have other locations. All of these scenarios are
supported by NetDefendOS.
Registrars
A server that handles SIP REGISTER requests is given the special name of
Registrar. The Registrar server has the task of locating the host where the
other client is reachable.
The Registrar and Proxy Server are logical entities and may, in fact, reside on
the same physical server.
RTP
Real-time Transport Protocol (RFC3550) is used as the underlying packet format for
delivering audio and video streaming via IP using the UDP protocol.
349
RTCP
Define a SIP ALG object which is associated with the Service object.
Define the appropriate IP rules for SIP communications which use the defined Service object.
allowed by the IP rule set. This problem does not occur if the local proxy is set up with the
Record-Route option enabled. In this mode, all SIP messages will only come from the proxy.
The different rules required when the Record-Route option is enabled and disabled can be seen in
the two different sets of IP rules listed below in the detailed description of Scenario 1
Protecting local clients - Proxy located on the Internet.
The SIP session which sets up communication between two clients prior to the exchange of
media data.
The exchange of the media data itself, for example the coded voice data which constitute a
VoIP phone call.
In the SIP setups described below, IP rules need only be explicitly defined to deal with the first of
the above, the SIP exchanges needed for establishing client-to-client communications. No IP
rules or other objects need to be defined to handle the second of the above, the exchange of
media data. The SIP ALG automatically and invisibly takes care of creating the connections
required (sometimes described as SIP pinholes) for allowing the media data traffic to flow
through the NetDefend Firewall.
Tip
Make sure there are no preceding rules already in the IP rule set disallowing or allowing
the same kind of traffic.
Scenario 1
Protecting local clients - Proxy located on the Internet
The SIP session is between a client on the local, protected side of the NetDefend Firewall and
a client which is on the external, unprotected side. The SIP proxy is located on the external,
unprotected side of the NetDefend Firewall. Communication typically takes place across the
public Internet with clients on the internal, protected side registering with a proxy on the
public, unprotected side.
Scenario 2
Protecting proxy and local clients - Proxy on the same network as clients
The SIP session is between a client on the local, protected side of the NetDefend Firewall and
a client which is on the external, unprotected side. The SIP proxy is located on the local,
protected side of the NetDefend Firewall and can handle registrations from both clients
located on the same local network as well as clients on the external, unprotected side.
Communication can take place across the public Internet or between clients on the local
network.
Scenario 3
Protecting proxy and local clients - Proxy on a DMZ interface
The SIP session is between a client on the local, protected side of the NetDefend Firewall and
351
a client which is on the external, unprotected side. The SIP proxy is located on the DMZ
interface and is physically separated from the local client network as well as the remote client
network and proxy network.
All the above scenarios will also deal with the situation where two clients in a session reside on
the same network.
These scenarios will now be examined in detail.
Scenario 1
Protecting local clients - Proxy located on the Internet
The scenario assumed is an office with VoIP users on a private internal network where the
network's topology will be hidden using NAT. This is illustrated below.
The SIP proxy in the above diagram could alternatively be located remotely across the Internet.
The proxy should be configured with the Record-Route feature enabled to insure all SIP traffic to
and from the office clients will be sent through the SIP Proxy. This is recommended since the
attack surface is minimized by allowing only SIP signalling from the SIP Proxy to enter the local
network.
This scenario can be implemented in two ways:
352
2.
3.
Define a Service object which is associated with the SIP ALG object. The service should have:
A NAT rule for outbound traffic from clients on the internal network to the SIP Proxy
Server located externally. The SIP ALG will take care of all address translation needed by
the NAT rule. This translation will occur both on the IP level and the application level.
Neither the clients or the proxies need to be aware that the local users are being NATed.
An Allow rule for inbound SIP traffic from the SIP proxy to the IP of the NetDefend
Firewall. This rule will use core (in other words, NetDefendOS itself ) as the destination
interface. The reason for this is due to the NAT rule above. When an incoming call is
received, NetDefendOS will automatically locate the local receiver, perform address
translation and forward SIP messages to the receiver. This will be executed based on the
ALGs internal state.
A SAT rule for translating incoming SIP messages is not needed since the ALG will
automatically redirect incoming SIP requests to the correct internal user. When a SIP client
behind a NATing NetDefend Firewall registers with an external SIP proxy, NetDefendOS
sends its own IP address as contact information to the SIP proxy. NetDefendOS registers the
client's local contact information and uses this to redirect incoming requests to the user. The
ALG takes care of the address translations needed.
4.
Ensure the clients are correctly configured. The SIP Proxy Server plays a key role in locating
the current location of the other client for the session. The proxy's IP address is not specified
directly in the ALG. Instead its location is either entered directly into the client software used
by the client or in some cases the client will have a way of retrieving the proxy's IP address
automatically such as through DHCP.
The IP rules with the Record-Route option enabled would be as shown below, the changes that
apply when NAT is used are shown in parentheses "(..)".
Action
Src Interface
Src Network
Dest Interface
Dest Network
Allow
(or NAT)
lan
lannet
wan
ip_proxy
Allow
wan
ip_proxy
lan
(or core)
lannet
(or wan_ip)
Without the Record-Route option enabled the IP rules would be as shown below, the changes
that apply when NAT is used are again shown in parentheses "(..)".
Action
Src Interface
Src Network
Dest Interface
Dest Network
Allow
(or NAT)
lan
lannet
wan
Allow
wan
lan
(or core)
lannet
(or ipwan)
The advantage of using Record-Route is clear since now the destination network for outgoing
traffic and the source network for incoming traffic have to include all IP addresses that are
possible.
353
associated with the rule. The same, custom Service object is used for all SIP scenarios.
Scenario 2
Protecting proxy and local clients - Proxy on the same network as clients
In this scenario the goal is to protect the local clients as well as the SIP proxy. The proxy is located
on the same, local network as the clients, with SIP signalling and media data flowing across two
interfaces. This scenario is illustrated below.
Define a single SIP ALG object using the options described above.
2.
Define a Service object which is associated with the SIP ALG object. The service should have:
3.
A NAT rule for outbound traffic from the local proxy and the clients on the internal
network to the remote clients on, for example, the Internet. The SIP ALG will take care of
all address translation needed by the NAT rule. This translation will occur both on the IP
level and the application level. Neither the clients or the proxies need to be aware that
the local clients are being NATed.
If Record-Route is enabled on the SIP proxy, the source network of the NAT rule can
include only the SIP proxy, and not the local clients.
354
A SAT rule for redirecting inbound SIP traffic to the private IPv4 address of the NATed
local proxy. This rule will have core as the destination interface (in other words
NetDefendOS itself ) since inbound traffic will be sent to the private IPv4 address of the
SIP proxy.
An Allow rule which matches the same type of traffic as the SAT rule defined in the
previous step.
Action
Src Interface
Src Network
Dest Interface
Dest Network
OutboundFrom
ProxyUsers
NAT
lan
lannet
(ip_proxy)
wan
all-nets
InboundTo
ProxyAndClients
SAT
SETDEST
ip_proxy
wan
all-nets
core
wan_ip
InboundTo
ProxyAndClients
Allow
wan
all-nets
core
wan_ip
If Record-Route is enabled then the Source Network for outbound traffic from proxy users can be
further restricted in the above rules by using "ip_proxy" as indicated.
When an incoming call is received, the SIP ALG will follow the SAT rule and forward the SIP
request to the proxy server. The proxy will in turn, forward the request to its final destination
which is the client.
If Record-Route is disabled at the proxy server, and depending on the state of the SIP session, the
SIP ALG may forward inbound SIP messages directly to the client, bypassing the SIP proxy. This
will happen automatically without further configuration.
Solution B - Without NAT
Without NAT, the outbound NAT rule is replaced by an Allow rule. The inbound SAT and Allow
rules are replaced by a single Allow rule.
Action
Src Interface
Src Network
Dest Interface
Dest Network
OutboundFrom
Proxy&Clients
Allow
lan
lannet
(ip_proxy)
wan
all-nets
InboundTo
Proxy&Clients
Allow
wan
all-nets
lan
lannet
(ip_proxy)
If Record-Route is enabled then the networks in the above rules can be further restricted by using
"(ip_proxy)" as indicated.
Scenario 3
Protecting proxy and local clients - Proxy on the DMZ interface
This scenario is similar to the previous but the major difference is the location of the local SIP
proxy server. The server is placed on a separate interface and network to the local clients. This
setup adds an extra layer of security since the initial SIP traffic is never exchanged directly
between a remote endpoint and the local, protected clients.
355
The complexity is increased in this scenario since SIP messages flow across three interfaces: the
receiving interface from the call initiator, the DMZ interface towards the proxy and the
destination interface towards the call terminator. This the initial messages exchanges that take
place when a call is setup in this scenario are illustrated below:
1,2 - An initial INVITE is sent to the outbound local proxy server on the DMZ.
3,4 - The proxy server sends the SIP messages towards the destination on the Internet.
5,6 - A remote client or proxy server replies to the local proxy server.
7,8 - The local proxy forwards the reply to the local client.
This scenario can be implemented in a topology hiding setup with DMZ (Solution A below) as
well as a setup without NAT (Solution B below).
Solution A - Using NAT
The following should be noted about this setup:
356
The IP address of the SIP proxy must be a globally routable IP address. The NetDefend
Firewall does not support hiding of the proxy on the DMZ.
The IP address of the DMZ interface must be a globally routable IP address. This address can
be the same address as the one used on the external interface.
Define a single SIP ALG object using the options described above.
2.
Define a Service object which is associated with the SIP ALG object. The service should have:
3.
A NAT rule for outbound traffic from the clients on the internal network to the proxy
located on the DMZ interface. The SIP ALG will take care of all address translation
needed by the NAT rule. This translation will occur both at the IP level and at the
application level.
Note
Clients registering with the proxy on the DMZ will have the IP address of the
DMZ interface as the contact address.
An Allow rule for outbound traffic from the proxy behind the DMZ interface to the
remote clients on the Internet.
An Allow rule for inbound SIP traffic from the SIP proxy behind the DMZ interface to the
IP address of the NetDefend Firewall. This rule will have core (in other words,
NetDefendOS itself ) as the destination interface.
The reason for this is because of the NAT rule above. When an incoming call is received,
NetDefendOS automatically locates the local receiver, performs address translation and
forwards SIP messages to the receiver. This is done based on the SIP ALG's internal state.
4.
An Allow rule for inbound traffic from, for example the Internet, to the proxy behind the
DMZ.
If Record-Route is not enabled at the proxy, direct exchange of SIP messages must also be
allowed between clients, bypassing the proxy. The following additional rules are therefore
needed when Record-Route is disabled:
A NAT rule for outbound traffic from the clients on the internal network to the external
clients and proxies on, for example, the Internet. The SIP ALG will take care of all address
translation needed by the NAT rule. The translation will occur both at the IP level and the
application level.
An Allow rule for inbound SIP traffic from, for example the Internet, to the IP address of
the DMZ interface. The reason for this is because local clients will be NATed using the IP
address of the DMZ interface when they register with the proxy located on the DMZ.
This rule has core as the destination interface (in other words, NetDefendOS itself ).
When an incoming call is received, NetDefendOS uses the registration information of the
local receiver to automatically locate this receiver, perform address translation and
forward SIP messages to the receiver. This will be done based on the internal state of the
357
SIP ALG.
The IP rules needed with Record-Route enabled are:
Action
Src Interface
Src Network
Dest Interface
Dest Network
OutboundToProxy
NAT
lan
lannet
dmz
ip_proxy
OutboundFromProxy
Allow
dmz
ip_proxy
wan
all-nets
InboundFromProxy
Allow
dmz
ip_proxy
core
dmz_ip
InboundToProxy
Allow
wan
all-nets
dmz
ip_proxy
With Record-Route disabled, the following IP rules must be added to those above:
Action
Src Interface
Src Network
Dest Interface
Dest Network
OutboundBypassProxy
NAT
lan
lannet
wan
all-nets
InboundBypassProxy
Allow
wan
all-nets
core
ipdmz
Define a single SIP ALG object using the options described above.
2.
Define a Service object which is associated with the SIP ALG object. The service should have:
3.
4.
An Allow rule for outbound traffic from the clients on the internal network to the proxy
located on the DMZ interface.
An Allow rule for outbound traffic from the proxy behind the DMZ interface to the
remote clients on the Internet.
An Allow rule for inbound SIP traffic from the SIP proxy behind the DMZ interface to the
clients located on the local, protected network.
An Allow rule for inbound SIP traffic from clients and proxies on the Internet to the proxy
behind the DMZ interface.
If Record-Route is not enabled at the proxy, direct exchange of SIP messages must also be
allowed between clients, bypassing the proxy. The following two additional rules are
therefore needed when Record-Route is disabled:
An Allow rule for outbound traffic from the clients on the local network to the external
clients and proxies on the Internet.
An Allow rule for inbound SIP traffic from the Internet to clients on the local network.
Src Interface
Src Network
Dest Interface
Dest Network
OutboundToProxy
Allow
lan
lannet
dmz
ip_proxy
OutboundFromProxy
Allow
dmz
ip_proxy
lan
lannet
InboundFromProxy
Allow
dmz
ip_proxy
core
dmz_ip
358
InboundToProxy
Action
Src Interface
Src Network
Dest Interface
Dest Network
Allow
wan
all-nets
dmz
ip_proxy
With Record-Route disabled, the following IP rules must be added to those above:
Action
Src Interface
Src Network
Dest Interface
Dest Network
OutboundBypassProxy
Allow
lan
lannet
wan
all-nets
InboundBypassProxy
Allow
wan
all-nets
lan
lannet
H.323 Components
H.323 consists of four main components:
Terminals
Gateways
Gatekeepers
H.323 Protocols
The different protocols used in implementing H.323 are:
359
T.120
The H.323 ALG supports version 5 of the H.323 specification. This specification is built upon
H.225.0 v5 and H.245 v10.
In addition to support voice and video calls, the H.323 ALG supports application sharing over
the T.120 protocol. T.120 uses TCP to transport data while voice and video is transported over
UDP.
To support gatekeepers, the ALG monitors RAS traffic between H.323 endpoints and the
gatekeeper, in order to correctly configure the NetDefend Firewall to let calls through.
NAT and SAT rules are supported, allowing clients and gatekeepers to use private IPv4
addresses on a network behind the NetDefend Firewall.
360
Address Translation
For NATed traffic the Network can be specified, which is what is allowed to be translated.
The External IP for the Network is specified which is the IPv4 address to NAT with. If the
External IP is set as Auto then the external IP is found automatically through route lookup.
Presented below are some network scenarios where H.323 ALG use is applicable. For each
scenario a configuration example of both the ALG and the rules are presented. The three service
definitions used in these scenarios are:
361
Web Interface
Outgoing Rule:
1.
2.
Now enter:
3.
Name: H323AllowOut
Action: Allow
Service: H323
Click OK
Incoming Rule:
1.
2.
Now enter:
Name: H323AllowIn
Action: Allow
Service: H323
362
3.
Click OK
2.
Now enter:
3.
Name: H323Out
Action: NAT
Service: H323
Click OK
Incoming Rules:
1.
2.
Now enter:
Name: H323In
363
Action: SAT
Service: H323
3.
For SAT enter Translate Destination IP Address: To New IP Address: ip-phone (IP address
of phone)
4.
Click OK
1.
2.
Now enter:
3.
Name: H323In
Action: Allow
Service: H323
Click OK
To place a call to the phone behind the NetDefend Firewall, place a call to the external IP address
on the firewall. If multiple H.323 phones are placed behind the firewall, one SAT rule has to be
configured for each phone. This means that multiple external addresses have to be used.
However, it is preferred to use a H.323 gatekeeper as in the "H.323 with Gatekeeper" scenario, as
this only requires one external address.
Example 6.6. Two Phones Behind Different NetDefend Firewalls
This scenario consists of two H.323 phones, each one connected behind the NetDefend Firewall
on a network with public IPv4 addresses. In order to place calls on these phones over the
Internet, the following rules need to be added to the rule listings in both firewalls. Make sure
there are no rules disallowing or allowing the same kind of ports/traffic before these rules.
364
Web Interface
Outgoing Rule:
1.
2.
Now enter:
3.
Name: H323AllowOut
Action: Allow
Service: H323
Click OK
Incoming Rule:
1.
2.
Now enter:
Name: H323AllowIn
Action: Allow
Service: H323
365
3.
Click OK
2.
Now enter:
3.
Name: H323Out
Action: NAT
Service: H323
Click OK
Incoming Rules:
1.
2.
Now enter:
Name: H323In
Action: SAT
Service: H323
366
3.
For SAT enter Translate Destination IP Address: To New IP Address: ip-phone (IP address
of phone)
4.
Click OK
1.
2.
Now enter:
3.
Name: H323In
Action: Allow
Service: H323
Click OK
To place a call to the phone behind the NetDefend Firewall, place a call to the external IP address
on the firewall. If multiple H.323 phones are placed behind the firewall, one SAT rule has to be
configured for each phone. This means that multiple external addresses have to be used.
However, it is preferable to use an H.323 gatekeeper as this only requires one external address.
Example 6.8. H.323 with Gatekeeper
In this scenario, a H.323 gatekeeper is placed in the DMZ of the NetDefend Firewall. A rule is
configured in the firewall to allow traffic between the private network where the H.323 phones
are connected on the internal network and to the Gatekeeper on the DMZ. The Gatekeeper on
the DMZ is configured with a private address. The following rules need to be added to the rule
listings in both firewalls, make sure there are no rules disallowing or allowing the same kind of
ports/traffic before these rules.
367
Web Interface
Incoming Gatekeeper Rules:
1.
2.
Now enter:
Name: H323In
Action: SAT
Service: H323-Gatekeeper
Comment: SAT rule for incoming communication with the Gatekeeper located at
ip-gatekeeper
3.
For SAT enter Translate Destination IP Address: To New IP Address: ip-gatekeeper (IP
address of gatekeeper).
4.
Click OK
1.
2.
Now enter:
Name: H323In
Action: Allow
Service: H323-Gatekeeper
368
3.
Click OK
1.
2.
Now enter:
3.
Name: H323In
Action: Allow
Service: H323-Gatekeeper
Click OK
369
Web Interface
1.
2.
Now enter:
3.
Name: H323Out
Action: NAT
Service: H323-Gatekeeper
Click OK
370
This scenario is an example of a more complex network that shows how the H.323 ALG can be
deployed in a corporate environment. At the head office DMZ a H.323 Gatekeeper is placed that
can handle all H.323 clients in the head-, branch- and remote offices. This will allow the whole
corporation to use the network for both voice communication and application sharing. It is
assumed that the VPN tunnels are correctly configured and that all offices use private IP-ranges
on their local networks. All outside calls are done over the existing telephone network using the
gateway (ip-gateway) connected to the ordinary telephone network.
The head office has placed a H.323 Gatekeeper in the DMZ of the corporate NetDefend Firewall.
This firewall should be configured as follows:
Web Interface
1.
2.
Now enter:
Name: LanToGK
Action: Allow
Service: H323-Gatekeeper
371
3.
Click OK
1.
2.
Now enter:
Name: LanToGK
Action: Allow
Service: H323-Gatekeeper
Comment: Allow H.323 entities on lannet to call phones connected to the H.323
Gateway on the DMZ
3.
Click OK
1.
2.
Now enter:
Name: GWToLan
Action: Allow
Service: H323-Gatekeeper
3.
Click OK
1.
2.
Now enter:
Name: BranchToGW
Action: Allow
372
Service: H323-Gatekeeper
Comment: Allow communication with the Gatekeeper on DMZ from the Branch
network
3.
Click OK
1.
2.
Now enter:
3.
Name: BranchToGW
Action: Allow
Service: H323-Gatekeeper
Comment: Allow communication with the Gatekeeper on DMZ from the Remote
network
Click OK
2.
Now enter:
Name: ToGK
Action: Allow
373
3.
Service: H323-Gatekeeper
Comment: Allow communication with the Gatekeeper connected to the Head Office
DMZ
Click OK
Example 6.12. Allowing the H.323 Gateway to register with the Gatekeeper
The branch office NetDefend Firewall has a H.323 Gateway connected to its DMZ. In order to
allow the Gateway to register with the H.323 Gatekeeper at the Head Office, the following rule
has to be configured:
Web Interface
1.
2.
Now enter:
3.
Name: GWToGK
Action: Allow
Service: H323-Gatekeeper
Comment: Allow the Gateway to communicate with the Gatekeeper connected to the
Head Office
Click OK
374
Supported Standards
With SSL and TLS, NetDefendOS provides termination support for SSL 3.0 as well as TLS 1.0, with
RFC 2246 defining the TLS 1.0 support (and NetDefendOS supporting the server side part of RFC
2246).
Both NetDefendOS TLS ALG and SSL VPN also support renegotiation as defined by RFC 5746.
375
TLS support can be centralized in the NetDefend Firewall instead of being set up on
individual servers.
Decrypted TLS traffic can be subject to other NetDefendOS features such as traffic shaping or
looking for server threats with IDP scanning.
TLS can be combined with NetDefendOS server load balancing to provide a means to spread
traffic across servers.
Enabling TLS
The steps to take to enable TLS in NetDefendOS are as follows:
1.
Upload the host and root certificates to be used with TLS to NetDefendOS if not done
already.
2.
Define a new TLS ALG object and associate the appropriate host and root certificates with
the ALG. If the certificate is self-signed then the root and host certificate should both be set
to the same certificate. Certificate chaining is supported and more than one root certificate
376
can be configured.
3.
4.
Associate the TLS ALG object with the newly created service object.
5.
Create a NAT or Allow IP rule for the targeted traffic and associate the custom service object
with it.
6.
Optionally, a SAT rule can be created to change the destination port for the unencrypted
traffic. Alternatively an SLB_SAT rule can be used to do load balancing (the destination port
can also be changed through a custom service object).
TLS_RSA_WITH_3DES_EDE_CBC_SHA.
2.
TLS_RSA_WITH_RC4_128_SHA.
3.
TLS_RSA_WITH_RC4_128_MD5.
4.
5.
6.
7.
TLS_RSA_WITH_NULL_MD5.
8.
TLS_RSA_WITH_NULL_SHA.
Client authentication is not supported (where NetDefend Firewall authenticates the identity
of the client).
Sending server key exchange messages is not supported which means the key in the
certificate must be sufficiently weak in order to use export ciphers.
377
378
Filtering Mechanisms
Through the HTTP ALG, NetDefendOS provides the following mechanisms for filtering out web
content that is deemed inappropriate for an organization or group of users:
Active Content Handling can be used to remove content from web pages that the
administrator considers a potential threat, such as ActiveX objects and Java Applets.
Static Content Filtering provides a means for manually classifying web sites as "good" or "bad".
This is also known as URL blacklisting and whitelisting.
Dynamic Content Filtering is a powerful feature that enables the administrator to allow or
block access to web sites depending on the category they have been classified into by an
automatic classification service. Dynamic content filtering requires a minimum of
administration effort and has very high accuracy.
Java applets
Javascript/VBScript code
379
Cookies
Invalidly formatted UTF-8 Characters (invalid URL formatting can be used to attack web
servers)
The object types to be removed can be selected individually by configuring the corresponding
HTTP Application Layer Gateway accordingly.
Web Interface
1.
2.
3.
4.
5.
Click OK
Additionally, Static Content Filtering takes place before Dynamic Content Filtering (described
below), which allows the possibility of manually making exceptions from the automatic dynamic
classification process. In a scenario where goods have to be purchased from a particular on-line
store, Dynamic Content Filtering might be set to prevent access to shopping sites by blocking
the "Shopping" category. By entering the on-line store's URL into the HTTP Application Layer
Gateway's whitelist, access to that URL is always allowed, taking precedence over Dynamic
Content Filtering.
Wildcarding
Both the URL blacklist and URL whitelist support wildcard matching of URLs in order to be more
flexible. This wildcard matching is also applicable to the path following the URL hostname which
means that filtering can be controlled to a file and directory level.
Below are some good and bad blacklist example URLs used for blocking:
*.example.com/*
Good. This will block all hosts in the example.com domain and all web
pages served by those hosts.
www.example.com/*
Good. This will block the www.example.com website and all web
pages served by that site.
*/*.gif
Good. This will block all files with .gif as the file name extension.
www.example.com
Bad. This will only block the first request to the web site. Surfing to
www.example.com/index.html, for example, will not be blocked.
*example.com/*
381
Web Interface
Start by adding an HTTP ALG in order to filter HTTP traffic:
1.
2.
3.
Click OK
2.
In the table, click on the recently created HTTP ALG to view its properties
3.
4.
Now click Add and select HTTP ALG URL from the menu
5.
6.
7.
Click OK
2.
In the table, click on the recently created HTTP ALG to view its properties
3.
4.
Now click Add and select HTTP ALG URL from the menu
5.
6.
7.
Click OK
Simply continue adding specific blacklists and whitelists until the filter satisfies the needs.
382
Select or create a service which has the Protocol property set to be HTTP or HTTPS or both. A
created service object should have the port number set appropriately.
Use this service object as the service of an IP policy that filters the relevant traffic.
Set the URL filter of the IP policy to the URL filter created in the first step. This last step will
only be possible if the appropriate service has already been assigned to the policy.
Using an IP Rule
1.
Create an HTTP ALG object, set the URL filter and set the Allowed Protocol to be HTTPS.
2.
Use this ALG in a service object. The service object could be an existing or created object
that allows HTTPS traffic. The service must include the port number 443.
3.
Using an IP Policy
1.
2.
Select or create a service which has the Protocol property set to be HTTPS. The service
must include the port number 443.
3.
Use the service object with an IP policy that filters the relevant traffic.
4.
Set the URL filter of the IP policy to the filter created earlier.
383
384
If the requested web page URL is not present in the databases, then the webpage content at the
URL will automatically be downloaded to D-Link's central data warehouse and automatically
analyzed using a combination of software techniques. Once categorized, the URL is distributed
to the global databases and NetDefendOS receives the category for the URL. Dynamic WCF
therefore requires a minimum of administration effort.
385
Deny
If WCF is unable to function then URLs are denied if external database access to verify them is
not possible. The user will see an "Access denied" web page.
Allow
If the external WCF database is not accessible, URLs are allowed even though they might be
disallowed if the WCF databases were accessible.
386
Finally, modify the NAT rule to use the new service. Assume rule is called NATHttp:
gw-world:/> set IPRule NATHttp Service=http_content_filtering
Web Interface
First, create an HTTP Application Layer Gateway (ALG) Object:
1.
2.
3.
4.
5.
In the Blocked Categories list, select Search Sites and click the >> button.
6.
Click OK
Go to: Local Objects > Services > Add > TCP/UDP service
2.
3.
4.
5.
6.
Click OK
Go to: Policies
2.
3.
Go to: Service
4.
5.
Click OK
Dynamic content filtering is now activated for all web traffic from lannet to all-nets.
We can validate the functionality with the following steps:
1.
2.
387
3.
If everything is configured correctly, the web browser will present a web page that informs
the user about that the requested site is blocked.
Audit Mode
In Audit Mode, the system will classify and log all surfing according to the content filtering policy,
but restricted web sites will still be accessible to the users. This means the content filtering
feature of NetDefendOS can then be used as an analysis tool to analysis what categories of
websites are being accessed by a user community and how often.
After running in Audit Mode for some period of time, it is easier to then have a better
understanding of the surfing behavior of different user groups and also to better understand the
potential impact of turning on the WCF feature.
388
WebContentFilteringMode=Audit
FilteringCategories=SEARCH_SITES
Web Interface
First, create an HTTP Application Layer Gateway (ALG) Object:
1.
2.
3.
4.
5.
In the Blocked Categories list, select Search Sites and click the >> button
6.
Click OK
The steps to then create a service object using the new HTTP ALG and modifying the NAT IP rule
to use the new service, are described in the previous example.
Allowing Override
On some occasions, Active Content Filtering may prevent users carrying out legitimate tasks.
Consider a stock analyst who deals with on-line gaming companies. In his daily work, he might
need to browse gambling web sites to conduct company assessments. If the corporate policy
blocks gambling web-sites, he will not be able to do his job.
For this reason, NetDefendOS supports a feature called Allow Override. With this feature enabled,
the content filtering component will present a warning to the user that he is about to enter a
web site that is restricted according to the corporate policy, and that his visit to the web site will
be logged. This page is known as the restricted site notice. The user is then free to continue to the
URL, or abort the request to prevent being logged.
By enabling this functionality, only users that have a valid reason to visit inappropriate sites will
normally do so. Other will avoid those sites due to the obvious risk of exposing their surfing
habits.
If reclassification is enabled and a user requests a web site which is disallowed, the block web
page will include a dropdown list containing all available categories. If the user believes the
requested web site is wrongly classified, he can select a more appropriate category from the
dropdown list and submit that as a proposal.
The URL to the requested web site as well as the proposed category will then be sent to D-Link's
central data warehouse for manual inspection. That inspection may result in the web site being
reclassified, either according to the category proposed or to a category which is felt to be correct.
Example 6.17. Reclassifying a blocked site
This example shows how a user may propose a reclassification of a web site if he believes it is
wrongly classified. This mechanism is enabled on a per-HTTP ALG level basis.
Command-Line Interface
First, create an HTTP Application Layer Gateway (ALG) Object:
gw-world:/> add ALG ALG_HTTP content_filtering
WebContentFilteringMode=Enable
FilteringCategories=SEARCH_SITES
AllowReclassification=Yes
Then, continue setting up the service object and modifying the NAT rule as we have done in the
previous examples.
Web Interface
First, create an HTTP Application Layer Gateway (ALG) Object:
1.
2.
3.
4.
5.
In the Blocked Categories list, select Search Sites and click the >> button
6.
7.
Click OK
Then, continue setting up the service object and modifying the NAT rule as we have done in the
previous examples.
Dynamic content filtering is now activated for all web traffic from lannet to all-nets and the user is
able to propose reclassification of blocked sites. Validate the functionality by following these
steps:
1.
2.
3.
If everything is configured correctly, the web browser will present a block page where a
dropdown list containing all available categories is included.
4.
The user is now able to select a more proper category and propose a reclassification.
390
Category 2: News
A web site may be classified under the News category if its content includes information articles
on recent events pertaining to topics surrounding a locality (for example, town, city or nation) or
culture, including weather forecasting information. Typically this would include most real-time
online news publications and technology or trade journals. This does not include financial
quotes, refer to the Investment Sites category (11), or sports, refer to the Sports category (16).
Category 4: Gambling
A web site may be classified under the Gambling category if its content includes advertisement
or encouragement of, or facilities allowing for the partaking of any form of gambling; For money
or otherwise. This includes online gaming, bookmaker odds and lottery web sites. This does not
include traditional or computer based games; refer to the Games Sites category (10).
Category 6: Shopping
A web site may be classified under the Shopping category if its content includes any form of
advertisement of goods or services to be exchanged for money, and may also include the
facilities to perform that transaction online. Included in this category are market promotions,
391
Category 7: Entertainment
A web site may be classified under the Entertainment category if its content includes any general
form of entertainment that is not specifically covered by another category. Some examples of
this are music sites, movies, hobbies, special interest, and fan clubs. This category also includes
personal web pages such as those provided by ISPs. The following categories more specifically
cover various entertainment content types, Pornography / Sex (1), Gambling (4), Chatrooms (8),
Game Sites (10), Sports (16), Clubs and Societies (22) and Music Downloads (23).
Category 8: Chatrooms
A web site may be classified under the Chatrooms category if its content focuses on or includes
real-time on-line interactive discussion groups. This also includes bulletin boards, message
boards, online forums, discussion groups as well as URLs for downloading chat software.
392
393
394
Note
The banner files related to authentication rules and web authentication are a separate
subject and are discussed in Section 8.3, Customizing Authentication HTML Pages.
CompressionForbidden
ContentForbidden
URLForbidden
RestrictedSiteNotice
ReclassifyURL
Default object cannot be edited. The following example goes through the necessary steps.
Example 6.18. Editing Content Filtering HTTP Banner Files
This example shows how to modify the contents of the URL forbidden HTML page.
Web Interface
1.
Go to: System > Advanced Settings > HTTP Banner files > Add > ALG Banner Files
2.
3.
The dialog for the new set of ALG banner files will appear
4.
5.
6.
Now edit the HTML source that appears in the text box for the Forbidden URL page
7.
8.
9.
Since SCP cannot be used to download the original default HTML, the source code must be
first copied from the Web Interface and pasted into a local text file which is then edited
using an appropriate editor.
2.
A new ALG Banner Files object must exist which the edited file(s) is uploaded to. If the
object is called mytxt, the CLI command to create this object is:
396
This creates an object which contains a copy of all the Default content filtering banner files.
3.
The modified file is then uploaded using SCP. It is uploaded to the object type
HTTPALGBanner and the object mytxt with the property name URLForbidden. If the edited
URLForbidden local file is called my.html then using the Open SSH SCP client, the upload
command would be:
scp myhtml [email protected]:HTTPAuthBanners/mytxt/URLForbidden
The usage of SCP clients is explained further in Section 2.1.6, Secure Copy.
4.
Using the CLI, the relevant HTTP ALG should now be set to use the mytxt banner files. If the
ALG us called my_http_alg, the command would be:
set ALG_HTTP my_http_alg HTTPBanners=mytxt
5.
As usual, the activate followed by the commit CLI commands must be used to activate the
changes on the NetDefend Firewall.
397
Any files downloaded. For example, files downloaded using HTTP transfer or FTP or perhaps
as an attachment to email delivered via SMTP.
Malicious code in downloads can have different intents ranging from programs that merely
cause annoyance to more sinister aims such as sending back passwords, credit card numbers and
other sensitive information. The term "Virus" can be used as a generic description for all forms of
malicious code carried in files.
6.4.2. Implementation
Streaming
As a data transfer is streamed through the NetDefend Firewall, NetDefendOS will scan the data
for the presence of viruses if the anti-virus module is enabled. Since data is being streamed and
not being read completely into memory, a minimum amount of memory is required and there is
minimal effect on overall throughput.
Pattern Matching
The inspection process is based on pattern matching against a database of known virus patterns
398
and can determine, with a high degree of certainty, if a virus is in the process of being
downloaded to a user behind the NetDefend Firewall. Once a virus is recognized in the contents
of a file, the download can be terminated before it completes.
Any uncompressed file type transferred through these ALGs can be scanned.
If the download has been compressed, ZIP and GZIP file downloads can be scanned.
For the HTTP ALG, webpage scripts and URLs are scanned.
For malicious URLs, the message displayed will be similar to the following:
Simultaneous Scans
There is no fixed limit on how many anti-virus scans can take place simultaneously in a single
NetDefend Firewall. However, the available free memory can place a limit on the number of
concurrent scans that can be initiated.
399
Database Updates
The SafeStream database is updated on a daily basis with new virus signatures. Older signatures
are seldom retired but instead are replaced with more generic signatures covering several
viruses. The local NetDefendOS copy of the SafeStream database should therefore be updated
regularly and this updating service is enabled as part of a D-Link subscription.
400
set which defines the origin and destination of the traffic to which the ALG is to be applied.
Web Interface
A. First, create an HTTP ALG Object:
1.
2.
3.
4.
5.
Click OK
Go to: Local Objects > Services > Add > TCP/UDP service
2.
3.
4.
5.
Select the HTTP ALG just created in the ALG dropdown list
401
6.
Click OK
C. Finally, modify the NAT rule (called NATHttp in this example) to use the new service:
1.
Go to: Policies
2.
Select the NAT rule handling the traffic between lannet and all-nets
3.
4.
Select the new service, http_anti_virus, in the predefined Service dropdown list
5.
Click OK
Anti-virus scanning is now activated for all web traffic from lannet to all-nets.
1. General options
Mode
ii.
iii.
If a virus scan fails for any reason then the transfer can be dropped
or allowed, with the event being logged. If this option is set to Allow
then a condition such as the virus database not being available or
the current license not being valid will not cause files to be dropped.
Instead, they will be allowed through and a log message will be
generated to indicate a failure has occurred.
402
When scanning compressed files, NetDefendOS must apply decompression to examine the file's
contents. Some types of data can result in very high compression ratios where the compressed
file is a small fraction of the original uncompressed file size. This can mean that a comparatively
small compressed file attachment might need to be uncompressed into a much larger file which
can place an excessive load on NetDefendOS resources and noticeably slowdown throughput.
To prevent this situation, the administrator should specify a Compression Ratio limit. If the limit of
the ration is specified as 10 then this will mean that if the uncompressed file is 10 times larger
than the compressed file, the specified Action should be taken. The Action can be one of:
will show the current status of the auto-update feature. This can also be done through the Web
Interface.
The active unit determines there is a new update and downloads the required files for the
update.
2.
3.
This reconfiguration causes a failover so the passive unit becomes the active unit.
403
4.
When the update is completed, the newly active unit also downloads the files for the update
and performs a reconfiguration.
5.
This second reconfiguration causes another failover so the passive unit reverts back to being
active again.
These steps result in both NetDefend Firewalls in a cluster having updated databases and with
the original active/passive roles. For more information about HA clusters refer to Chapter 11, High
Availability.
404
Intrusion Detection
Intrusions differ from viruses in that a virus is normally contained in a single file download and
this is normally downloaded to a client system. An intrusion manifests itself as a malicious
pattern of Internet data aimed at bypassing server security mechanisms. Intrusions are not
uncommon and they can constantly evolve as their creation can be automated by the attacker.
NetDefendOS IDP provides an important line of defense against these threats.
Intrusion Detection and Prevention (IDP) is a NetDefendOS subsystem that is designed to protect
against these intrusion attempts. It operates by monitoring network traffic as it passes through
the NetDefend Firewall, searching for patterns that indicate an intrusion is being attempted.
Once detected, NetDefendOS IDP allows steps to be taken to neutralize both the intrusion
attempt as well as its source.
IDP Issues
In order to have an effective and reliable IDP system, the following issues have to be addressed:
IDP Rules are defined up by the administrator to determine what traffic should be scanned.
2.
Pattern Matching is applied by NetDefendOS IDP to the traffic that matches an IDP Rule as
it streams through the firewall.
3.
If NetDefendOS IDP detects an intrusion then the Action specified for the triggering IDP
Rule is taken.
IDP Rules, Pattern Matching and IDP Rule Actions are described in the sections which follow.
405
Maintenance IDP
Maintenance IDP is the base IDP system included as standard with the NetDefend DFL 210,
800, 1600 and 2500.
Maintenance IDP is a simplified IDP that gives basic protection against IDP attacks. It is
upgradeable to the higher level and more comprehensive Advanced IDP which is discussed
next.
IDP does not come as standard with the DFL-260, 260E, 860, 860E, 1660, 2560 and 2560G and
a subscription to Advanced IDP must be purchased for these models.
Advanced IDP
Advanced IDP is a subscription based IDP system with a much broader range of database
signatures for more demanding installations. The standard subscription is for 12 months and
provides automatic IDP signature database updates.
This IDP option is available for all D-Link NetDefend models, including those that do not
come as standard with Maintenance IDP.
Maintenance IDP can be viewed as a restricted subset of Advanced IDP and the following
sections describe how the Advanced IDP option functions.
406
will show the current status of the auto-update feature. This can also be done through the Web
Interface.
automatically by NetDefendOS. In a cluster there is always an active unit and an inactive unit.
Only the active unit in the cluster will perform regular checking for new database updates. If a
new database update becomes available the sequence of events will be as follows:
1.
The active unit determines there is a new update and downloads the required files for the
update.
2.
3.
This reconfiguration causes a failover so the passive unit becomes the active unit.
4.
When the update is completed, the newly active unit also downloads the files for the update
and performs a reconfiguration.
5.
This second reconfiguration causes another failover so the passive unit reverts back to being
active again.
These steps result in both NetDefend Firewalls in a cluster having updated databases and with
the original active/passive roles. For more information about HA clusters refer to Chapter 11, High
Availability.
408
There is a choice of either entering signatures in the upper text box or selecting them through
the tree underneath which collects the signatures together into their respective groups. When
collections of signatures are selected in the tree, the equivalent wildcard definition will
automatically appear in the box above. Individual signatures cannot be selected through the tree
and can only be entered in the text box.
What appears in the upper text box is equivalent to the way signatures are specified when using
the CLI to define an IDP rule.
HTTP Normalization
Each IDP rule has a section of settings for HTTP normalization. This allows the administrator to
choose the actions that should be taken when IDP finds inconsistencies in the URIs embedded in
incoming HTTP requests. Some server attacks are based on creating URIs with sequences that
can exploit weaknesses in some HTTP server products.
The URI conditions which IDP can detect are:
Invalid UTF8
This looks for any invalid UTF8 characters in a URI.
Double encoding
This looks for any hex sequence which itself is encoded using other hex escape sequences.
An example would be the original sequence %2526 where %25 is then might be decoded by
the HTTP server to '%' and results in the sequence '%26'. This is then finally decoded to '&'.
A packet arrives at the firewall and NetDefendOS performs normal verification. If the packet
is part of a new connection then it is checked against the IP rule set before being passed to
the IDP module. If the packet is part of an existing connection it is passed straight to the IDP
system. If the packet is not part of an existing connection or is rejected by the IP rule set
then it is dropped.
2.
The source and destination information of the packet is compared to the set of IDP Rules
defined by the administrator. If a match is found, it is passed on to the next level of IDP
processing which is pattern matching, described in step below. If there is no match against
an IDP rule then the packet is accepted and the IDP system takes no further actions
although further actions defined in the IP rule set are applied such as address translation
and logging.
409
When defining an IDP Rule, the administrator can enable or disable the option Protect against
Insertion/Evasion attack. An Insertion/Evasion Attack is a form of attack which is specifically
aimed at evading IDP mechanisms. It exploits the fact that in a TCP/IP data transfer, the data
stream must often be reassembled from smaller pieces of data because the individual pieces
either arrive in the wrong order or are fragmented in some way. Insertions or Evasions are
designed to exploit this reassembly process.
Insertion Attacks
An Insertion attack consists of inserting data into a stream so that the resulting sequence of data
packets is accepted by the IDP subsystem but will be rejected by the targeted application. This
results is two different streams of data.
As an example, consider a data stream broken up into 4 packets: p1, p2, p3 and p4. The attacker
might first send packets p1 and p4 to the targeted application. These will be held by both the
IDP subsystem and the application until packets p2 and p3 arrive so that reassembly can be
done. The attacker now deliberately sends two packets, p2' and p3', which will be rejected by the
application but accepted by the IDP system. The IDP system is now able to complete reassembly
of the packets and believes it has the full data stream. The attacker now sends two further
packets, p2 and p3, which will be accepted by the application which can now complete
reassembly but resulting in a different data stream to that seen by the IDP subsystem.
Evasion Attacks
An evasion attack has a similar end-result to the Insertion Attack in that it also generates two
different data streams, one that the IDP subsystem sees and one that the target application sees,
but it is achieved in the reverse way. It consists of sending data packets that are rejected by the
IDP subsystem but are acceptable to the target application.
Detection Action
If an Insertion/Evasion Attack is detected with the Insertion/Evasion Protect option enabled,
NetDefendOS automatically corrects the data stream by removing the extraneous data
associated with the attack.
An Attack Detected log message, indicating an attack has been identified and prevented.
An Unable to Detect log message when NetDefendOS has been unable to identify potential
attacks when reassembling a TCP/IP stream although such an attack may have been present.
This condition is caused by infrequent and unusually complex patterns of data in the stream.
Recommended Configuration
By default, Insertion/Evasion protection is enabled for all IDP rules and this is the recommended
setting for most configurations. There are two motivations for disabling the option:
Increasing throughput - Where the highest throughout possible is desirable, then turning
the option off, can provide a slight increase in processing speed.
Signature Advisories
An advisory is an explanatory textual description of a signature. Reading a signature's advisory
will explain to the administrator what the signature will search for. Due to the changing nature of
the signature database, advisories are not included in D-Link documentation but instead, are
available on the D-Link website at:
http://security.dlink.com.tw
Advisories can be found under the "NetDefend IDS" option in the "NetDefend Live" menu.
Policy Signatures
These detect different types of application traffic. They can be used to block certain
applications such as file sharing applications and instant messaging.
411
BACKUP
DB
DNS
FTP
HTTP
412
Ignore - Do nothing if an intrusion is detected and allow the connection to stay open.
Audit - Allow the connection to stay open but log the event.
Protect - This option drops the connection and logs the event (with the additional option to
blacklist the source of the connection or switching on ZoneDefense as described below).
IDP Blacklisting
The Protect option includes the option that the particular host or network that triggers the IDP
Rule can be added to a Blacklist of offending traffic sources. This means that all subsequent traffic
coming from a blacklisted source with be automatically dropped by NetDefendOS. For more
details of how blacklisting functions see Section 6.7, Blacklisting Hosts and Networks.
IDP ZoneDefense
The Protect action includes the option that the particular D-Link switch that triggers the IDP Rule
can be de-activated through the D-Link ZoneDefense feature. For more details on how
ZoneDefense functions see Chapter 12, ZoneDefense.
This email will contain a summary of IDP events that have occurred in a user-configurable period
of time.
When an IDP event occurrs, the NetDefendOS will wait for Hold Time seconds before sending
the notification email. However, the email will only be sent if the number of events occurred in
this period of time is equal to, or bigger than the Log Threshold. When this email has been sent,
NetDefendOS will wait for Minimum Repeat Time seconds before sending a new email.
IDP Rules:
gw-world:/> cc IDPRule examplerule
Web Interface
Adding an SMTP log receiver:
1.
Go to: System > Device > Log and Event Receivers > Add > SMTP Event Receiver
2.
Now enter:
Name: smtp4IDP
Server Port: 25
Sender: hostmaster
414
Log Threshold: 2
Click OK
IDP Rules:
1.
Go to: Policies > Intrusion Prevention > Add > IDP Rule
2.
3.
4.
5.
Click OK
An IDP rule called IDPMailSrvRule will be created, and the Service to use is the SMTP service.
Source Interface and Source Network defines where traffic is coming from, in this example the
external network. The Destination Interface and Destination Network define where traffic is
directed to, in this case the mail server. Destination Network should therefore be set to the object
defining the mail server.
Command-Line Interface
Create an IDP Rule:
415
Web Interface
Create an IDP Rule:
This IDP rule is called IDPMailSrvRule, and applies to the SMTP service. Source Interface and
Source Network define where traffic is coming from, in this example, the external network. The
Destination Interface and Destination Network define where traffic is directed to, in this case the
mail server. Destination Network should therefore be set to the object defining the mail server.
1.
Go to: Policies > Intrusion Prevention > IDP Rules > Add > IDP Rule
2.
Now enter:
Name: IDPMailSrvRule
Service: smtp
Also inspect dropped packets: In case all traffic matching this rule should be scanned
(this also means traffic that the main rule set would drop), the Protect against
insertion/evasion attacks checkbox should be checked, which is the case in this
example.
Click OK
2.
Now enter:
Action: Protect
416
Signatures: IPS_MAIL_SMTP
Click OK
If logging of intrusion attempts is desired, this can be configured by clicking in the Rule Actions
tab when creating an IDP rule and enabling logging. The Severity should be set to All in order to
match all SMTP attacks.
In summary, the following will occur: If traffic from the external network to the mail server occurs,
IDP will be activated. If traffic matches any of the signatures in the IPS_MAIL_SMTP signature
group, the connection will be dropped, thus protecting the mail server.
Individual signatures are entered in a similar way when using the Web Interface.
Enable only the IDP signatures for the traffic that is being allowed. For example, if the IP rule
set is only allowing HTTP traffic then there is no point enabling FTP signatures.
417
Once the relevant signatures are selected for IDP processing, the IDP system should always
be initially run in Audit mode.
After running IDP in Audit mode for a sample period with live traffic, examines the log
messages generated. Check for the following:
i.
ii.
iii.
Are there any false positives with the signatures that have been chosen?
Adjust the signature selection and examine the logs again. There may be several adjustments
before the logs demonstrate that the desired effect is being achieved.
If certain signatures are repeatedly triggering it may be reason to look more closely to check
if a server is under attack.
After a few days running in Audit mode with satisfactory results showing in the logs, switch
over IDP to Protect mode so that triggering connection are dropped by NetDefendOS.
However, IDS signatures are best kept in Audit mode as they can interrupt normal traffic flows
because of false positives.
If required, enable the blacklisting feature of IDP so that the source IP for triggering traffic is
blocked. This is a powerful feature of IDP and useful when dealing with an application like
BitTorrent.
418
One of the most commonly used method is the consumption of computational resources which
means that the DoS attack floods the network and ties up critical resources used to run business
critical applications. In some cases, vulnerabilities in the Unix and Windows operating systems
are exploited to intentionally crash the system, while in other cases large amounts of apparently
valid traffic are directed at sites until they become overloaded and crash.
Some of the most well known DoS attacks during the brief history of the public Internet have
included the following:
Amplification attacks
419
The triggering factor is that the last fragment makes the total packet size exceed 65535 bytes,
which is the highest number that a 16-bit integer can store. When the value overflows, it jumps
back to a very small number. What happens then is a function of how well the victim's IP stack is
implemented.
NetDefendOS will never allow fragments through that would result in the total size exceeding
65535 bytes. In addition to that, there are configurable limits for IP packet sizes in NetDefendOS's
advanced settings.
This type of attack will show up in NetDefendOS event logs as drops with the IP rule name set to
LogOversizedPackets. The sender IP address may be spoofed.
With a careful inbound policy, the attack surface is greatly reduced. Only exposed services
could possibly become victims to the attack, and public services tend to be more well-written
than services expected to only serve the local network.
420
By stripping the URG bit by default from all TCP segments traversing the system. This is
configurable in the Web Interface by going to:
System > Advanced Settings > TCP Settings > TCP URG.
WinNuke attacks will usually show up in NetDefendOS logs as normal drops with the name of the
IP rule that disallowed the connection attempt.
For connections allowed through the system, "TCP" or "DROP" category (depending on the
TCPUrg setting) entries will appear, with a rule name of "TCPUrg". The sender IP address is not
likely to be spoofed; a full three-way handshake must be completed before out-of-band
segments can be sent.
"Smurf" and "Papasmurf" send ICMP echo packets to the broadcast address of open networks
with many machines, faking the source IP address to be that of the victim. All machines on
the open network then "respond" to the victim.
"Fraggle" uses the same general idea, but instead using UDP echo (port 7) to accomplish the
task. Fraggle generally gets lower amplification factors since there are fewer hosts on the
Internet that have the UDP echo service enabled.
Smurf attacks will show up in NetDefendOS logs as masses of dropped ICMP Echo Reply packets.
The source IP addresses will be those of the amplifier networks used. Fraggle attacks will show
up in NetDefendOS logs as masses of dropped (or allowed, depending on policy) packets. The
source IP addresses will be those of the amplifier networks used.
421
Smurf and Papasmurf type floods will be seen as ICMP Echo Responses at the victim side.
Unless FwdFast rules are in use, such packets are never allowed to initiate new connections,
regardless of whether or not there are rules that allow the traffic.
Fraggle packets may arrive at any UDP destination port targeted by the attacker. Tightening
the inbound rule set may help.
The Traffic Shaping feature built into NetDefendOS also help absorb some of the flood before it
reaches protected servers.
422
If the attacker chooses a fragment offset higher than the limits imposed by the values specified
in System > Advanced Settings > Length Limit Settings, the packets will not even get that far
and will be dropped immediately. Jolt2 attacks may or may not show up in NetDefendOS logs. If
the attacker chooses a too-high fragment offset for the attack, they will show up as drops from
the rule set to "LogOversizedPackets". If the fragment offset is low enough, no logging will occur.
The sender IP address may be spoofed.
423
Threshold Rules. (Available on certain NetDefend models only - see Section 10.3, Threshold
Rules for details.)
Blacklisting Options
The automatic blacklisting of a host or network can be enabled in IDP and in threshold rules by
specifying the Protect action for when a rule is triggered. Once enabled, there are three
blacklisting options:
Time to Block Host/Network in
seconds
IP addresses or networks are added to the list then the traffic from these sources is then blocked
for the period of time specified.
Whitelisting
To ensure that Internet traffic coming from trusted sources, such as the management
workstation, are not blacklisted under any circumstances, a Whitelist is also maintained by
NetDefendOS. Any IP address object can be added to this whitelist
424
It is also important to understand that although whitelisting prevents a particular source from
being blacklisted, it still does not prevent NetDefendOS mechanisms such as threshold rules
from dropping or denying connections from that source. What whitelisting does is prevent a
source being added to a blacklist if that is the action a rule has specified.
For further details on usage see Section 6.5.7, IDP Actions and Section 10.3, Threshold Rules.
This blacklist command can be used to remove a host from the blacklist using the -unblock
option.
Web Interface
1.
2.
3.
4.
Click OK
425
426
7.1. Overview
The ability of NetDefendOS to change the IP address of packets as they pass through the
NetDefend Firewall is known as address translation.
The ability to transform one IP address to another can have many benefits. Two of the most
important are:
Private IPv4 addresses can be used on a protected network where protected hosts need to
have access to the public Internet. There may also be servers with private IPv4 addresses that
need to be accessible from the public Internet.
Security is increased by making it more difficult for intruders to understand the topology of
the protected network. Address translation hides internal IP addresses which means that an
attack coming from the "outside" is more difficult.
Types of Translation
NetDefendOS supports two types of translation:
Application of both types of translation depend on the specified security policies, which means
that they are applied to specific traffic based on filtering rules that define combinations of
source/destination network/interface as well as service. Two types of NetDefendOS IP rules, NAT
rules and SAT rules are used to configure address translation.
427
This section describes and provides examples of configuring NAT and SAT rules.
428
7.2. NAT
Dynamic Network Address Translation (NAT) provides a mechanism for translating original source
IP addresses to a different address. Outgoing packets then appear to come from a different IP
address and incoming packets back to that address have their IP address translated back to the
original IP address.
NAT can have two important benefits:
The IP addresses of individual clients and hosts can be "hidden" behind the firewall's IP
address.
Only the firewall needs a public IPv4 address for public Internet access. Hosts and networks
behind the firewall can be allocated private IPv4 addresses but can still have access to the
public Internet through the public IPv4 address.
In the illustration above, three connections from IP addresses A, B and C are NATed through a
single source IP address N. The original port numbers are also changed.
The next source port number allocated for a new NAT connection will be the first free port
selected randomly by NetDefendOS. Ports are allocated randomly to increase security.
The sender at IP address 192.168.1.5 sends a packet from a dynamically assigned port, for
example 1038, to a server, for example 195.55.66.77 port 80.
192.168.1.5:1038 => 195.55.66.77:80
2.
In this example, the Use Interface Address option is used, and we will use 195.11.22.33 as the
interface address. In addition, the source port is changed to a random free port on the
NetDefend Firewall and which is above port 1024. In this example, we will assume port
32,789 is chosen. The packet is then sent to its destination.
430
3.
The recipient server then processes the packet and sends its response.
195.55.66.77:80 => 195.11.22.33:32789
4.
NetDefendOS receives the packet and compares it to its list of open connections. Once it
finds the connection in question, it restores the original address and forwards the packet.
195.55.66.77:80 => 192.168.1.5:1038
5.
431
The NATAction option could be left out since the default value is to use the interface address. The
alternative is to specify UseSenderAddress and use the NATSenderAddress option to specify the IP
address to use. The sender address will also need to be explicitly ARP published on the interface.
Web Interface
1.
2.
3.
Now enter:
Action: NAT
Service: http
4.
Under the NAT tab, make sure that the Use Interface Address option is selected
5.
Click OK
432
The NATAction option could be left out since the default value is to use the interface address. The
alternative is to specify UseSenderAddress and use the NATSenderAddress option to specify the IP
address to use. The sender address will also need to be explicitly ARP published on the interface.
Web Interface
1.
2.
3.
Now enter:
Action: NAT
Service: http
4.
5.
Click OK
An internal machine can communicate with several external servers using the same IP
protocol.
An internal machine can communicate with several external servers using different IP
protocols.
Several internal machines can communicate with different external servers using the same IP
protocol.
Several internal machines can communicate with the same server using different IP
protocols.
Several internal machines can not communicate with the same external server using the
same IP protocol.
433
These restrictions apply only to IP level protocols other than TCP, UDP and ICMP, such as
OSPF and L2TP. They do not apply to the protocols transported by TCP, UDP and ICMP
such as telnet, FTP, HTTP and SMTP.
NetDefendOS can alter port number information in the TCP and UDP headers to make
each connection unique, even though such connections have had their sender
addresses translated to the same IP.
Some protocols, regardless of the method of transportation used, can cause problems during
address translation.
NetDefendOS is set up with NAT rules in the IP rule set so it takes communication traffic coming
from the client and NATs it back out onto the Internet. Communication with the client is with the
PPTP protocol but the PPTP tunnel from the client terminates at the firewall. When this traffic is
relayed between the firewall and the Internet, it is no longer encapsulated by PPTP.
When an application, such as a web server, now receives requests from the client it appears as
though they are coming from the anonymizing service provider's external IP address and not the
client's IP. The application therefore sends its responses back to the firewall which relays the
434
traffic back to the client through the PPTP tunnel. The original IP address of the client is not
revealed in traffic as it is relayed beyond the termination of the PPTP tunnel at the NetDefendOS.
Typically, all traffic passes through the same physical interface and that interface has a single
public IP address. Multiple interfaces could be used if multiple public IPv4 addresses are
available. There is clearly a small processing overhead involved with anonymizing traffic but this
need not be an issue if sufficient hardware resources are employed to perform the anonymizing.
This same technique can also be used with L2TP instead of PPTP connections. Both protocols are
discussed further in Section 9.5.4, PPTP/L2TP Clients.
435
Stateful
Stateless
Fixed
436
reached then an existing state with the longest idle time is replaced. If all states in the table is
active then the new connection is dropped. As a rule of thumb, the Max States value should be at
least the number of local hosts or clients that will connect to the Internet.
There is only one state table per NAT Pool so that if a single NAT Pool is re-used in multiple NAT
IP rules they share the same state table.
IP Pool Usage
When allocating external IP addresses to a NAT Pool it is not necessary to explicitly state these.
Instead a NetDefendOS IP Pool object can be selected. IP Pools gather collections of IP addresses
automatically through DHCP and can therefore supply external IP addresses automatically to a
NAT Pool. See Section 5.4, IP Pools for more details about this topic.
437
Web Interface
A. First, create an object in the address book for the address range:
1.
Go to: Objects > Address Book > Add > IP4 Address
2.
3.
4.
Click OK
Go to: Objects > NAT Pools > Add > NAT Pool
2.
Now enter:
Name: my_stateful_natpool
438
IP Range: nat_pool_range
3.
Select the Proxy ARP tab and add the WAN interface
4.
Click OK
2.
3.
4.
5.
Action: NAT
Service: http-all
Click OK
439
7.4. SAT
7.4.1. Introduction
NetDefendOS Static Address Translation (SAT) functionality can translate ranges of IP addresses
and/or port numbers to other, predefined static values. The translation can be to a single address
and/or port but can also be a transposition where each address and/or port in a range or
network is mapped to a corresponding value in a new range or network.
Types of Translation
SAT translation can be generally divided into three types:
The values being translated may be the IP address and/or the port number for either the source
or destination of new connections set up by NetDefendOS. As discussed later, the many-to-one
translation is not available for port numbers.
440
SAT Translate
This specifies the address that will be changed and can be one of:
i.
ii.
New IP Address
The new address for the translation.
New Port
The new port number used for translation. As explained below, port translation happens
independently of address translation and follows slightly different rules.
All-to-One Mapping
This is enabled if the mapping is to be many IP addresses to a single IP address. It is not used
for port translation as all-to-one port translation is not possible.
When using an IP Policy object instead of an IP rule for SAT, the properties are slightly different
and this is discussed further in Section 7.4.7, Using an IP Policy for SAT.
If the original address is a single IP address then a one-to-one mapping is always performed.
The new IP address should also be a single address. This is the most common usage of SAT.
An all-to-one mapping is performed if the All to One property is enabled for the SAT IP rule.
For this, the original address should be a range or network and the new address should be a
single IP address.
441
A SAT rule with an original, untranslated address of all-nets always results in an all-to-one
mapping.
If the Service object used with the SAT IP rule does not have a single value or simple range
specified for its port property, port translation will never be performed.
The term simple range means a range with only a lower and upper value or a single value. For
example, 50-60 is a simple range.
For this reason, an all-to-one port translation is not possible and the All to One property for
the IP rule is ignored for port translation.
If a new port number is specified and the Service object used with the SAT IP rule has a single
number for its port property then all connections will be translated to the new port number.
If a new port number is specified and the Service object used with the SAT IP rule has a simple
number range for its port property then all connections will be transposed to a new range
which begins with the new port number.
442
it could be used for other purposes and any Ethernet interface could also be used instead
for a DMZ.
Web Interface
First create a SAT rule:
1.
2.
3.
Now enter:
Action: SAT
Service: http
443
4.
Click OK
2.
3.
Now enter:
Action: Allow
Service: http
4.
5.
Click OK
The example above results in the following two rules being added into the IP rule set called
main:
# Action
Service
SAT Action
1 SAT
wan
all-nets
core
wan_ip
http
2 Allow
wan
all-nets
core
wan_ip
http
These two rules allow web server access via the NetDefend Firewall's external IP address. Rule 1
states that address translation will take place if the connection has been permitted, and rule 2
permits the connection.
The SAT rule destination interface must be core (NetDefendOS itself ) because interface IPs are
always routed on core. The scenario is illustrated in the diagram below.
444
If internal clients require access to the public internet, a NAT rule is also needed and the source
interface of the SAT rule must be set to any. The correct second rule for the external or internal
traffic is then selected based on the source interface. In this example, the internal clients are
allowed any type of access to the DMZ, not just HTTP access.
# Action
Service
1 SAT
any
all-nets
core
wan_ip
SAT Action
2 Allow
wan
all-nets
core
wan_ip
http
3 NAT
lan
lannet
any
all-nets
all_services
Here, only one SAT rule is needed and once it triggers it will be used with whichever rule is
triggered next. The ordering of the Allow and NAT rules don't matter but they must be found
after the SAT rule.
The IP rules that are needed for external and internal access to the web server could be specified
as follows:
# Action
Service
1 SAT
any
core
all-nets
wan_ip
445
SAT Action
# Action
Service
2 Allow
any
all-nets
core
wan_ip
http
3 NAT
lan
lannet
core
wan_ip
all_services
SAT Action
The local client sends a packet to wan_ip to reach the web server.
10.0.0.3:1038 => 195.55.66.77:80
NetDefendOS translates the address in accordance with SAT rule 1 and forwards the packet in
accordance with Allow rule 2:
10.0.0.3:1038 => 10.0.0.2:80
This reply arrives directly to the local client without passing through the NetDefend Firewall and
this causes problems because the client expects a reply from 195.55.66.77:80 and not 10.0.0.2:80.
The unexpected reply is therefore discarded and the client continues to wait for a response from
195.55.66.77:80 which will never arrive.
Reversing the order of the NAT and Allow rules as shown below solves the problem.
# Action
Service
SAT Action
1 SAT
any
all-nets
core
wan_ip
http
2 NAT
lan
lannet
core
wan_ip
all_services
3 Allow
any
all-nets
core
wan_ip
http
NetDefendOS address translates this statically in accordance with rule 1 and dynamically in
accordance with rule 2:
10.0.0.1:32789 => 10.0.0.2:80
In this way, the reply arrives at the client from the expected address.
Another possible solution to the problem is to allow internal clients to communicate directly to
10.0.0.2 without address translation. However, this is not always practical.
A single SAT rule can be used to transpose an entire range or network of IP addresses to another
range or network. The result is a many-to-many translation where the first original IP address is
translated to the first IP address in the new range or network, then the second to the second, and
so on.
To tell NetDefendOS to perform this type of translation, the original IP address must be a range
or network and the IP rule's All to One property must be disabled. The new range or network is
specified using a single IP address which is the starting address for the transposition. For
example, 192.168.1.0 would be specified as the new address if the transposition is to the network
192.168.1.0/24 and starting from the first address in the network.
As another example, a SAT IP rule might specify that connections to the 194.1.2.16/29 network
should be translated to 192.168.0.50. The IP rules for this would be:
# Action
Service
SAT Action
1 SAT
any
all-nets
core
2 Allow
any
all-nets
core
194.1.2.16/29 all_services
194.1.2.16
192.168.0.50
194.1.2.17
192.168.0.51
194.1.2.18
192.168.0.52
194.1.2.19
192.168.0.53
194.1.2.20
192.168.0.54
194.1.2.21
192.168.0.55
194.1.2.22
192.168.0.56
194.1.2.23
192.168.0.57
An example of an application for this feature is when there are several protected servers in a
DMZ, and each server is to be accessible using a unique public IPv4 address.
Example 7.5. Many-to-Many IP Translation
In this example, a SAT IP rule will translate from five public IPv4 addresses to five web servers
located in a DMZ. The firewall is connected to the Internet via the wan interface and the public
IPv4 addresses are the range 195.55.66.77 to 195.55.66.81. The web servers have the private IPv4
address range 10.10.10.5 to 10.10.10.9 and are on the network connected to the dmz interface.
The following steps need to be performed:
Define another address object for the base of the web server IP addresses.
Publish the public IPv4 addresses on the wan interface using the ARP publish mechanism.
447
Create an Allow rule that will permit the incoming HTTP connections.
Since the five public IPv4 addresses are being ARP published so these addresses are not routed
on core, the SAT destination interface is wan and not core.
Command-Line Interface
Create an address object for the public IPv4 addresses:
gw-world:/> add Address IP4Address wwwsrv_pub
Address=195.55.66.77-195.55.66.81
Now, create another object for the base of the web server IP addresses:
gw-world:/> add Address IP4Address wwwsrv_priv_base Address=10.10.10.5
Publish the public IPv4 addresses on the wan interface using ARP publish. One ARP item is
needed for every IP address:
gw-world:/> add ARP Interface=wan IP=195.55.66.77 mode=Publish
Web Interface
Create an address object for the public IPv4 address:
1.
Go to: Objects > Address Book > Add > IP4 Address
2.
3.
4.
Click OK
Now, create another address object for the base of the web server IP addresses:
1.
Go to: Objects > Address Book > Add > IP4 Address
448
2.
3.
4.
Click OK
Publish the public addresses on the wan interface using ARP publish. One ARP item is needed for
every IP address:
1.
Go to: Network > Interfaces and VPN > ARP/Neighbor Discovery > Add > ARP/Neighbor
Discovery
2.
Now enter:
3.
Mode: Publish
Interface: wan
IP Address: 195.55.66.77
2.
3.
Now enter:
4.
Action: SAT
Service: http
Source Interface:any
Click OK
2.
3.
Now enter:
Action: Allow
Service: http
449
4.
Source Interface:any
Click OK
Service
SAT Action
1 SAT
any
wan
http
all-nets
194.1.2.16194.1.2.20,
194.1.2.30
This IP rule has the property All to One enabled. This will give an all-to-one translation of all
addresses in the range specified to the single IPv4 address 192.168.0.50. Some examples of this
translation are:
450
Define an address object containing all the public IPv4 addresses with the name
wwwsrv_pub.
Define another address object set to be the IPv4 address 10.10.10.5 of the web server with the
name wwwsrv_priv.
Publish the public IPv4 addresses on the wan interface using the ARP publish feature.
Create an Allow rule that will permit the incoming HTTP flows.
Command-Line Interface
Create an address object for the public IPv4 addresses:
gw-world:/> add Address IPAddress wwwsrv_pub
Address=195.55.66.77-195.55.66.81
Now, create another object for the base of the web server IP addresses:
gw-world:/> add Address IPAddress wwwsrv_priv Address=10.10.10.5
Publish the five public IPv4 addresses on the wan interface using ARP publish. A CLI command
like the following is needed for each IP address:
gw-world:/> add ARP Interface=wan IP=195.55.66.77 mode=Publish
Web Interface
Create a SAT IP rule for the translation:
1.
2.
3.
Now enter:
Action: SAT
451
4.
Service: http
Click OK
2.
3.
Now enter:
4.
Action: Allow
Service: http
Click OK
Port translation will not occur if the Service object's Port property is anything other than a single
value or a simple range. For example, if the property is 60-70,80, port translation will not take
place even though a new port number is specified in the SAT IP rule.
For example, consider the following SAT IP rule with a Service object associated with it that has
the simple port range 80-85. The rule specifies the destination address wwwsrv_pub is translated
to wwwsrv_priv with the new port number of 1080.
# Action
1 SAT
any
wan
all-nets
Service
SAT Action
Destination IP: wwwsrv_priv Port:1080
This rule produces a many-to-many transposition of all ports in the range 80-85 to the range
1080-1085. For example, the following will happen:
Attempts to communicate with the web server's public address - port 80, will result in a
connection to the web server's private address - port 1080.
Attempts to communicate with the web server's public address - port 84, will result in a
connection to the web server's private address - port 1084.
If the Service was changed so that only the single value 80 was specified for is Port property then
the SAT rule would only trigger for port 80 and it would always be translated to the new port
1080 (a one-to-one relationship)
Service
SAT Action
1 SAT
any
all-nets
core
wan_ip
http
2 SAT
lan
wwwsrv
any
all-nets
http
3 FwdFast any
all-nets
core
wan_ip
http
4 FwdFast lan
wwwsrv
any
all-nets
http
Suppose now, that access to the public Internet by clients on the internal network lannet is
required. The following NAT rule might be added after the other rules by the administrator:
# Action
Service
5 NAT
lan
any
all_services
lannet
all-nets
SAT Action
However, this is not correct. What will happen with this additional rule is the following:
External traffic to wan_ip will match rules 1 and 3, and will be sent to wwwsrv. This is correct.
Return traffic from wwwsrv will match rules 2 and 4, and will appear to be sent from
wan_ip:80. This is correct.
Internal traffic to wan_ip will match rules 1 and 3, and will be sent to wwwsrv. This is almost
correct; the packets will arrive at wwwsrv, but:
453
Return traffic from wwwsrv to internal machines will be sent directly to the machines
themselves. This will not work, as the packets will be interpreted as coming from the wrong
address.
The administrator might try moving the NAT IP rule to between the SAT and FwdFast rules as
shown below:
# Action
Service
SAT Action
1 SAT
any
all-nets
core
wan_ip
http
2 SAT
lan
wwwsrv
any
all-nets
http
3 NAT
lan
lannet
any
all-nets
all_services
4 FwdFast any
all-nets
core
wan_ip
http
5 FwdFast lan
wwwsrv
any
all-nets
http
This will still not be correct since the following will happen:
External traffic to wan_ip will match rules 1 and 4, and will be sent to wwwsrv. This is correct.
Return traffic from wwwsrv will match rules 2 and 3. The replies will therefore be dynamically
address translated. This changes the source port to a different port, which is incorrect.
The correct set of IP rules that will provide the desired effect is the following:
# Action
Service
SAT Action
1 SAT
any
all-nets
core
wan_ip
http
2 SAT
lan
wwwsrv
any
all-nets
http
3 FwdFast lan
wwwsrv
any
all-nets
http
4 NAT
lannet
any
all-nets
all_services
wwwsrv
any
all-nets
http
lan
5 FwdFast lan
External traffic to wan_ip will match rules 1 and 5 and will be sent to wwwsrv.
Internal traffic to wan_ip will match rules 1 and 4, and will be sent to wwwsrv. The sender
address will be the NetDefend Firewall's internal IP address, guaranteeing that return traffic
passes through the NetDefend Firewall.
Return traffic will automatically be handled by the NetDefend Firewall's stateful inspection
mechanism.
Address Action
454
This determines how the IP address is translated and can be one of the following:
i.
ii.
Transposed - This yields a many-to-many translation where each address in the original
range/network is transposed to a new range/network, using the specified new IP
address as the base address for the transposition.
Port Action
This determines how the IP address is translated and can be one of the following:
i.
ii.
Single Port - This is used for a one-to-one translation to the new port number specified.
iii.
Transposed - This transposes a range of port numbers to a new range using the new
port number as a base for the transposition. This is for a many-to-many port translation.
Web Interface
First create a SAT rule:
1.
2.
3.
Now enter:
Action: Allow
455
4.
Service: http
Click OK
The protocol cryptographically requires that the addresses are unaltered; this applies to
many VPN protocols.
The protocol embeds its IP addresses inside the TCP or UDP level data, and subsequently
requires that, in some way or another, the addresses visible on IP level are the same as those
embedded in the data. Examples of this include FTP and logons to NT domains via NetBIOS.
Either party is attempting to open new dynamic connections to the addresses visible to that
party. In some cases, this can be resolved by modifying the application or the firewall
configuration.
There is no definitive list of what protocols can or cannot be address translated. A general rule is
that VPN protocols cannot usually be translated. In addition, protocols that open secondary
connections in addition to the initial connection can be difficult to translate.
456
457
8.1. Overview
In situations where individual users connect to protected resources through the NetDefend
Firewall, the administrator will often require that each user goes through a process of
authentication before access is allowed.
This chapter deals with setting up authentication for NetDefendOS but first the general issues
involved in authentication will be examined.
Proving Identity
The aim of authentication is to have the user prove their identity so that the network
administrator can allow or deny access to resources based on that identity. Possible types of
proof could be:
A. Something the user is. Unique attributes that are different for every person, such as a
fingerprint.
B. Something the user has, such a passcard, a X.509 Digital Certificate or Public and Private Keys.
C. Something the user knows such as a password.
Method A may require a special piece of equipment such as a biometric reader. Another problem
with A is that the special attribute often cannot be replaced if it is lost.
Methods B and C are therefore the most common means of identification in network security.
However, these have drawbacks: keys might be intercepted, passcards might be stolen,
passwords might be guessable, or people may simply be bad at keeping a secret. Methods B and
458
C are therefore sometimes combined, for example in a passcard that requires a password or
pincode for use.
459
ii.
iii.
Define an Authentication Rule which describes which traffic passing through the firewall is to
be authenticated and which authentication source will be used to perform the authentication.
These are described further in Section 8.2.5, Authentication Rules.
If required, define an IP object for the IP addresses of the clients that will be authenticated.
This can be associated directly with an authentication rule as the originator IP or can be
associated with an Authentication Group.
Set up IP rules to allow the authentication to take place and also to allow access to resources
by the clients belonging to the IP object set up in the previous step.
The sections that follow describe the components of these steps in detail. These are:
Group Membership
Each user entered into the Local Database can optionally be specified to be a member of one or
more Authentication Groups. These groups are not predefined except for the administrators and
the auditors group described below. Instead they are entered as text strings which are case
sensitive.
460
PPTP/L2TP Configuration
If a client is connecting to the NetDefend Firewall using PPTP/L2TP then the following three
options called also be specified for the local NetDefendOS user database:
461
If the Network behind user option is specified then this is the metric that will be used with
the route that is automatically added by NetDefendOS. If there are two routes which give a
match for the same network then this metric decides which should be used.
After adding any additional users, change the context back to the default:
gw-world:/lan_users> cc
gw-world:/>
Web Interface
462
Go to: System > Device > Local User Databases > Add > LocalUserDatabase
2.
Now enter:
3.
Name: lan_users
Click OK
2.
Select lan_users
3.
4.
Now enter:
5.
Name: myusername
Password: myuserpassword
Groups: lan_group
Click OK
Repeat the last step to add all the members of the group.
RADIUS Security
463
To provide security, a common shared secret is configured on both the RADIUS client and the
server. This secret enables encryption of the messages sent from the RADIUS client to the server
and is commonly configured as a relatively long text string. The string can contain up to 100
characters and is case sensitive.
RADIUS uses PPP to transfer username/password requests between client and RADIUS server, as
well as using PPP authentication schemes such as PAP and CHAP. RADIUS messages are sent as
UDP messages via UDP port 1812.
464
Command-Line Interface
gw-world:/> add RadiusServer rs_users
IPAddress=radius_ip
SharedSecret=mysecretcode
Port=1812
RetryTimeout=2
Web Interface
1.
Go to: Policies > User Authentication > RADIUS > Add > RADIUS Server
2.
Now enter:
3.
Name: rs_users
IP Address: radius_ip
Port: 1812
Retry Timeout: 2
Click OK
Specify one or a list of these LDAP server objects in a user authentication rule.
One or more LDAP servers can be associated as a list within a user authentication rule. The
ordering of the list determines the order in which server access is attempted.
The first server in the list has the highest precedence and will be used first. If authentication
fails or the server is unreachable then the second in the list is used and so on.
LDAP Issues
Unfortunately, setting up LDAP authentication may not be as simple as, for example, RADIUS
setup. Careful consideration of the parameters used in defining the LDAP server to NetDefendOS
is required. There are a number of issues that can cause problems:
465
Authentication of PPTP or L2TP clients may require some administrative changes to the LDAP
server and this is discussed later.
LDAP Attributes
To fully understand LDAP setup, it is important to note some setup values are attributes. These
are:
An LDAP attribute is a tuple (a pair of data values) consisting of an attribute name (in this manual
we will call this the attribute ID to avoid confusion) and an attribute value. An example might be a
tuple for a username attribute that has an ID of username and a value of Smith.
These attributes can be used in different ways and their meaning to the LDAP server is usually
defined by the server's database schema. The database schema can usually be changed by the
server administrator to alter the attributes.
General Settings
The following general parameters are used for configuration of each server:
Name
The name given to the server object for reference purposes in NetDefendOS. For example,
NetDefendOS authentication rules may be defined which reference this name.
This value has nothing to do with the Name Attribute described below. It is only for use by
NetDefendOS and not the LDAP server.
466
IP Address
The IP address of the LDAP server.
Port
The port number on the LDAP server which will receive the client request which is sent using
TCP/IP.
The default port number is 389.
Timeout
This is the timeout length for LDAP server user authentication attempts in seconds. If no
response to a request is received from the server after this time then the server will be
considered to be unreachable.
The default timeout setting is 5 seconds.
Name Attribute
The Name Attribute is the ID of the data field on the LDAP server that contains the username.
The NetDefendOS default value for this is uid which is correct for most UNIX based servers.
If using Microsoft Active Directory this should be set to SAMAccountName (which is NOT case
sensitive). When looking at the details of a user in Active Directory, the value for the user
logon name is defined in the SAMAccountName field under the Account tab.
Membership Attribute
The Membership Attribute defines which groups a user is a member of. This is similar to the
way a user belongs to either the admin or audit database group in NetDefendOS. This is
another tuple defined by the server's database schema and the default ID is MemberOf.
In Microsoft Active Directory, the groups a user belongs to can be found by looking at a users
details under the MemberOf tab.
Do Not Use - This will not modify the username in any way. For example, testuser.
ii.
Username Prefix - When authenticating, this will put <domain name>\ in front of the
username. For example, myldapserver/testuser.
iii.
Username Postfix - When authenticating, this will add @<domain name> after the
username. For example, testuser@myldapserver.
If the choice is other than Do Not Use, the Domain Name parameter option described below
should be specified.
Different LDAP servers could handle the domain name differently so the server's
requirements should be checked. Most versions of Windows Active Directory require the
Postfix option to be used.
When using the OpenLDAP server and with most non-Microsoft LDAP servers, this option
should be set to Do not use and the next option Combined User Name should be enabled.
Optional Attribute
If the Combined User Name option is enabled, it is also possible to use this option to specify
an optional text attribute to be sent to the server. For example:
ou=people
Routing Table
The NetDefendOS routing table where route lookup will be done to resolve the server's IP
address into a route. The default is the main routing table.
Database Settings
The Database Settings are as follows:
Base Object
Defines where in the LDAP server tree search for user accounts shall begin.
The users defined on an LDAP server database are organized into a tree structure. The Base
Object specifies where in this tree the relevant users are located. Specifying the Base Object
has the effect of speeding up the search of the LDAP tree since only users under the Base
Object will be examined.
468
The recommended option is therefore to initially specify the Base Object as the root
of the tree.
The Base Object is specified as a common separated domainComponent (DC) set. If the full
domain name is myldapserver.local.eu.com and this is the Base Object then this is specified as:
DC=myldapserver,DC=local,DC=eu,DC=com
The username search will now begin at the root of the myldapserver tree.
Administrator Account
The LDAP server will require that the user establishing a connection to do a search has
administrator privileges. The Administration Account specifies the administrator username.
This username may be requested by the server in a special format in the same way as
described previously with Use Domain Name.
Password/Confirm Password
The password for the administrator account which was specified above.
Domain Name
The Domain Name is used when formatting usernames. This is the first part of the full domain
name. In our examples above, the Domain Name is myldapserver. The full domain name is a
dot separated set of labels, for example, myldapserver.local.eu.com.
This option is only available if the Server Type is NOT set to Other.
This option can be left empty but is required if the LDAP server requires the domain name
when performing a bind request.
Optional Settings
There is one optional setting:
Password Attribute
The password attribute specifies the ID of the tuple on the LDAP server that contains the
user's password. The default ID is userPassword.
This option should be left empty unless the LDAP server is being used to authenticate users
connecting via PPP with CHAP, MS-CHAPv1, MS-CHAPv2 or when using SSL VPN.
When it is used, it determines the ID of the data field in the LDAP server database which
contains the user password in plain text. The LDAP server administrator must make sure that
this field actually does contain the password. This is explained in greater detail later.
When LDAP is used with SSL VPN, the Password Attribute must be specified as userPassword or
Description based on the setting for the Agent option in the user authentication rule object.
469
LDAP server. Individual clients are not distinguished from one another.
LDAP server referrals should not occur with bind request authentication but if they do, the server
sending the referral will be regarded as not having responded.
The server replies with a positive response and the user is authenticated.
Clients using PPP with CHAP, MS-CHAPv1 or MS-CHAPv2 is a special case and authentication
is actually done by NetDefendOS, as discussed later.
The server replies with a negative response and the user is not authenticated.
The server does not respond within the Timeout period specified for the server. If only one
server is specified then authentication will be considered to have failed. If there are alternate
servers defined for the user authentication rule then these are queried next.
470
The entire contents of the database can be displayed with the command:
gw-world:/> show LDAPDatabase
The processing is different if a group membership is being retrieved since a request is sent to the
LDAP server to search for memberships and any group memberships are then sent back in the
response.
B. PPP Authentication with CHAP, MS-CHAPv1 or MS-CHAPv2 Encryption
If PPP with CHAP, MS-CHAPv1 or MS-CHAPv2 is used for authentication, a digest of the user's
password will be sent to NetDefendOS by the client. NetDefendOS cannot just forward this
digest to the LDAP server since this won't be understood. The solution is for NetDefendOS to
obtain the password in plain-text from the LDAP server, create a digest itself, and then compare
the created digest with the digest from the client. If the two are the same, authentication is
successful but it is NetDefendOS that makes the authentication decision and not the LDAP
server.
To retrieve the password from the LDAP server, two things are needed:
The Password Attribute parameter needs to be specified when defining the server to
NetDefendOS. This will be the ID of the field on the LDAP server that will contain the
password when it is sent back.
471
This ID must be different from the default password attribute (which is usually userPassword
for most LDAP servers). A suggestion is to use the description field in the LDAP database.
In order for the server to return the password in the database field with the ID specified, the
LDAP administrator must make sure that the plain text password is found there. LDAP servers
store passwords in encrypted digest form and do not provide automatic mechanisms for
doing this. It must therefore be done manually by the administrator as they add new users
and change existing users passwords.
This clearly involves some effort from the administrator, as well as leaving passwords
dangerously exposed in plain text form on the LDAP server. These are some of the reasons
why LDAP may not be viewed as a viable authentication solution for CHAP, MS-CHAPv1 or
MS-CHAPv2 encrypted PPP.
When NetDefendOS receives the password digest from the client, it initiates a Search Request to
the LDAP server. The server replies with a Search Response which will contains the user's
password and any group memberships. NetDefendOS is then able to compare digests. The
diagram below illustrates this process.
Authentication Agent
The type of traffic being authenticated. This can be one of:
i.
HTTP
HTTP web connections to be authenticated via a predefined or custom web page (see
the detailed HTTP explanation below).
An IP rule allowing client access to core is also required with this agent type.
ii.
HTTPS
HTTPS web connections to be authenticated via a predefined or custom web page (also
see the detailed HTTP explanation below).
An IP rule allowing client access to core is also required with this agent type.
iii.
XAUTH
This is the IKE authentication method which is used as part of VPN tunnel establishment
with IPsec.
XAuth is an extension to the normal IKE exchange and provides an addition to normal
IPsec security which means that clients accessing a VPN must provide a login username
and password.
It should be noted that an interface value is not entered with an XAuth authentication
rule since one single rule with XAuth as the agent will be used for all IPsec tunnels.
However, this approach assumes that a single authentication source is used for all
tunnels.
An IP rule allowing client access to core is not required.
iv.
L2TP/PPTP/SSL VPN
This is used specifically for L2TP, PPTP or SSL VPN authentication.
An IP rule allowing client access to core is not required.
Authentication Source
This specifies that authentication is to be performed using one of the following:
i.
ii.
iii.
Disallow - This option explicitly disallows all connections that trigger this rule. Such
connections will never be authenticated.
Any Disallow rules are best located at the end of the authentication rule set.
iv.
Local - A local user database defined within NetDefendOS is used for looking up user
473
credentials.
v.
Allow - With this option, all connections that trigger this rule will be authenticated
automatically. No database lookup occurs.
Interface
The source interface on which the connections to be authenticated will arrive. This must be
specified.
Originator IP
The source IP or network from which new connections will arrive. For XAuth and PPP, this is
the Originator IP.
Terminator IP
The terminating IP with which new connections arrive. This is only specified where the
Authentication Agent is PPP.
Connection Timeouts
An Authentication Rule can specify the following timeouts related to a user session:
Idle Timeout
How long a connection is idle before being automatically terminated (1800 seconds by
default).
Session Timeout
The maximum time that a connection can exist (no value is specified by default).
If an authentication server is being used then the option to Use timeouts received from the
authentication server can be enabled to have these values set from the server.
Multiple Logins
An Authentication Rule can specify how multiple logins are handled where more than one user
from different source IP addresses try to login with the same username. The possible options are:
Allow multiple logins so that more than one client can use the same username/password
combination.
Allow one login per username and logout an existing user with the same name if they have
been idle for a specific length of time when the new login occurs.
1.
2.
NetDefendOS sees the new user connection on an interface and checks the Authentication
rule set to see if there is a matching rule for traffic on this interface, coming from this
network and data which is one of the following types:
HTTP traffic
HTTPS traffic
3.
If no rule matches, the connection is allowed, provided the IP rule set permits it, and
nothing further happens in the authentication process.
4.
Based on the settings of the first matching authentication rule, NetDefendOS may prompt
the user with an authentication request which requires a username/password pair to be
entered.
5.
NetDefendOS validates the user credentials against the Authentication Source specified in
the authentication rule. This will be either a local NetDefendOS database, an external
RADIUS database server or an external LDAP server.
6.
NetDefendOS then allows further traffic through this connection as long as authentication
was successful and the service requested is allowed by a rule in the IP rule set. That rule's
Source Network object has either the No Defined Credentials option enabled or
alternatively it is associated with a group and the user is also a member of that group.
7.
If a timeout restriction is specified in the authentication rule then the authenticated user will
be automatically logged out after that length of time without activity.
475
HTML form - The user is presented with an HTML page for authentication which is filled
in and the data sent back to NetDefendOS with a POST.
ii.
If the Agent is set to HTTPS then the Host Certificate and Root Certificate(s) have to be
chosen from a list of certificates already loaded into NetDefendOS. Certificate chaining is
supported for the root certificate.
Action
Src Interface
Src Network
Service
Allow
lan
lannet
core
lan_ip
http-all
NAT
lan
trusted_users
wan
all-nets
http-all
NAT
lan
lannet
wan
all-nets
dns-all
The first rule allows the authentication process to take place and assumes the client is trying to
access the lan_ip IP address, which is the IP address of the interface on the NetDefend Firewall
where the local network connects.
The second rule allows normal surfing activity but we cannot just use lannet as the source
network since the rule would trigger for any unauthenticated client from that network. Instead,
the source network is an administrator defined IP object called trusted_users which is the same
network as lannet but has additionally either the Authentication option No Defined Credentials
enabled or has an Authentication Group assigned to it (which is the same group as that assigned
to the users).
The third rule allows DNS lookup of URLs.
Note
Do not modify the default http-all service in the IP rules above. This can cause
authentication to fail.
476
Action
Src Interface
Src Network
Service
Allow
lan
lannet
core
lan_ip
http-all
NAT
lan
trusted_users
wan
all-nets
http-all
NAT
lan
lannet
wan
all-nets
dns-all
SAT
lan
lannet
wan
all-nets
all-to-one
127.0.0.1
http-all
Allow
lan
lannet
wan
all-nets
http-all
The SAT rule catches all unauthenticated requests and must be set up with an all-to-one address
mapping that directs them to the address 127.0.0.1 which corresponds to core (NetDefendOS
itself ).
Example 8.3. User Authentication Setup for Web Access
The configurations below shows how to enable HTTP user authentication for the user group
lan_group on lannet. Only users that belong to the group users can get Web browsing service
after authentication, as it is defined in the IP rule.
It is assumed that the authentication IPv4 address object lan_users_net has been defined and this
has its Groups property set to lan_group. The group lan_group has been used as the Groups
property of individual users in the lan_users database.
Web Interface
A. Set up an IP rule to allow HTTP authentication.
1.
2.
Now enter:
3.
Name: http_auth
Action: Allow
Service: http-all
Click OK
477
1.
Go to: Policies > User Authentication > Authentication Rules > Add > User
Authentication Rule
2.
Now enter:
Name: HTTPLogin
Interface: lan
3.
4.
5.
Click OK
2.
Now enter:
3.
Name: allow_http_auth
Action: NAT
Service: http-all
Click OK
478
When a user attempts to use a browser to open a web page they are directed to a login page
(the FormLogin page). After successful login, the user is taken to the originally requested
page.
After successful login, instead the user can be taken to a specified web page.
After successful login, the user is taken to a particular web page (the LoginSuccess page)
before being automatically redirected to the originally requested page.
FormLogin
LoginSuccess
LoginFailure
LoginAlreadyDone
LoginChallenge
LoginChallengeTimeout
LoginSuccess
LoginSuccessBasicAuth
LogoutFailure
FileNotFound
479
00-0c-19-f9-14-6f
10.234.56.71
/testing?user=user&pass=pass
%2ftesting%3fuser%3duser%26pass%3dpass
10.1.6.1
MyGateway
480
1.
Go to: System > Advanced Settings > HTTP Banner files > Add > ALG Banner Files
2.
3.
The dialog for the new set of ALG banner files will appear
4.
5.
6.
Now edit the HTML source that appears in the text box for the Forbidden URL page
7.
8.
9.
10. Go to: Objects > ALG and select the relevant HTML ALG
11. Select new_forbidden as the HTML Banner
12. Click OK
13. Go to: Configuration > Save & Activate to activate the new file
Since SCP cannot be used to download the original default HTML, the source code must be
first copied from the Web Interface and pasted into a local text file which is then edited
using an appropriate editor.
2.
A new Auth Banner Files object must exist which the edited file(s) is uploaded to. If the
object is called ua_html, the CLI command to create this object is:
gw-world:/> add HTTPAuthBanners ua_html
This creates an object which contains a copy of all the Default user auth banner files.
3.
The modified file is then uploaded using SCP. It is uploaded to the object type
HTTPAuthBanner and the object ua_html with property name FormLogin. If the edited
Formlogon local file is called my.html then using the Open SSH SCP client, the upload
command would be:
pscp my.html [email protected]:HTTPAuthBanners/ua_html/FormLogin
The usage of SCP clients is explained further in Section 2.1.6, Secure Copy.
4.
Using the CLI, the relevant user authentication rule should now be set to use the ua_html. If
the rule us called my_auth_rule, the command would be:
481
5.
As usual, use the activate followed by the commit CLI commands to activate the changes on
the NetDefend Firewall.
482
The D-Link Identity Awareness Agent which is a separate piece of software that runs on all the
Windows domain controller servers in the active directory, sending client login information
to NetDefendOS.
The authentication process taking place in NetDefendOS as clients try to access resources
through the firewall. This uses the information sent by the Identity Awareness Agent.
The overall relationship between client, server and NetDefend Firewall is shown in the diagram
below.
The user is authenticated against a Windows Active Directory server running on a separate
computer.
The D-Link provided software service called the Identity Awareness Agent (IDA) runs on all the
domain controller servers in the domain. This listens for successful client authentications.
When a client is authenticated, the agent sends the following to the configured NetDefend
Firewall:
i.
483
ii.
iii.
The Identity Awareness Agent must be installed on all domain controllers that make up the
active directory.
The user's IP address is now authenticated to NetDefendOS and connections coming from
that IP are permitted through the firewall if an IP Rule or IP Policy is defined to allow it.
A NetDefendOS IP Rule or IP Policy object is triggered that could allow this connection.
The source network address object for the triggered rule or policy has an associated
authentication list of allowed usernames and groups. If the client is part of this list, the
connection can be established.
The IP Rule or IP Policy object that is created for authentication has the dual purpose of
identifying and allowing the connection as well as triggering the authentication process. NAT
could also be a function included in the rule or policy.
Install and configure the Identity Awareness Agent software on the all the domain controller
servers in a domain. This is described in more depth at the end of this section.
Configure an address book IP4 Address object that defines the IP address, IP range or network
from which authenticating clients will come.
Important: In the Authentication property of this address object, specify the usernames
and/or groups which are allowed to create connections. Usernames must be specified in the
format username@domain. For example, myusername@mycompanyname.
Specify an IP Rule or IP Policy object in the NetDefendOS configuration that triggers on the
client connections to be authenticated and allows them to be opened. The source network
for this rule or policy must be the IPv4 address object specified in the previous step.
It is the triggering of this rule or policy that triggers the authentication process.
484
Clients connections will be authenticated using the identity awareness feature. The only
usernames that will be allowed are user1@mydomain and user2@mydomain.
It is also assumed that the D-Link Authentication Agent software has already been installed on a
single external Windows domain controller server and is configured with the IPv4 address
defined by the address book object aa_server_ip and the pre-shared key defined by the
aa_server_key PSK object.
It is assumed that the domain has only one domain controller server.
Command-Line Interface
Define an Authentication Agent object that describes the external server:
gw-world:/> add AuthAgent
IPAddress=aa_server_ip
PSK=aa_server_key
Name=my_auth_agent
Assign the permitted usernames to the network object for client IPs:
gw-world:/> add Address IP4Address client_net
UserAuthGroups=user1@mydomain,user2@mydomain
Create an IP Policy which allows access and uses client_net as the source network.
gw-world:/main> add IPPolicy
Name=client_to_server
SourceInterface=If1
SourceNetwork=client_net
DestinationInterface=If2
DestinationNetwork=server_net
Service=http-all
Action=Allow
Web Interface
Define the Authentication Agent object that describes the external server:
1.
Go to:
Policies > Authentication > Authentication Agents > Add > Authentication Agent
2.
Now enter:
3.
Name: my_auth_agent
IP Address: aa_server_ip
Click OK
Assign the permitted usernames to the network object for client IPs:
1.
2.
3.
485
4.
Click OK
Create an IP Policy which allows access to the servers by the clients and uses client_net as the
source network.
1.
Go to: Policies > Firewalling > Main IP Rules > Add > IP Policy
2.
Now enter:
3.
Name: client_to_server
Action: Allow
Service: http-all
Click OK
This example uses an IP Policy object to trigger authentication but an IP Rule could have been
used instead.
486
The Encryption Key and Listening IP should be set to the same values configured in the
NetDefendOS Authentication Agent object.
The Encryption Key will take on a default value if specified and this will be the same as the default
value of the Pre-Shared Key property of a NetDefendOS Authentication Agent object if it is not
explicitly specified. However, it is strongly recommended that this default key value is changed
as soon as possible.
The Allowed IP/Networks can optionally be used to specify from which external IPs the agent will
allow for connection with NetDefendOS. The default value of 0.0.0.0/0 will allow connections
from any IP address.
The Identity Awareness Agent (IDA) software must be installed on all domain controller servers
that are part of the domain being authenticated.
487
As users are authenticated, they can be seen in the Web Interface by going to Status > Run-time
Information > User Authentication. In the CLI, the same can be achieved with the command:
gw-world:/> userauth -list
488
Processing Sequence
The sequence of processing for two factor authentication with NetDefendOS is as follows:
1.
Authentication is set up as normal using an authentication rule and IP rules (or IP policies).
2.
The authentication source will be an external RADIUS server that has been configured to
perform two factor authentication.
3.
A user tries to access resources through the NetDefend Firewall and they are presented with
the standard NetDefendOS login page in which they enter their username and password
credentials.
4.
NetDefendOS now sends these credentials to the RADIUS server for authentication in a
RADIUS Access-Request message.
5.
It causes a one-time code to be sent to the user. For example, in a text message to their
cell phone. If the code is generated by the user themselves then this may not be
necessary.
ii.
6.
When NetDefendOS is told that two factor authentication is being used, it automatically
displays to the user the webpage defined by the banner file called LoginChallenge.
7.
The user enters the code they receive or generate into the displayed web page and
NetDefendOS sends the entered code to the RADIUS server as the password in another
Access-Request message.
8.
The RADIUS server checks the code sent by NetDefendOS against the code expected and
nforms NetDefendOS if the user is authenticated by sending back an Access-Accept or
Access-Reject message.
The same NetDefendOS setup is used if the challenge code is generated by a local code
generating device such as the RSA SecureID product or if a RADIUS server causes it to be
sent to the user.
The administrator must configure the RADIUS server appropriately and that is not covered in
this document.
If the RADIUS server causes the code to be sent to the user, the sending method is
independent of NetDefendOS. Various third party solutions are available to generate this
code and are not discussed further in this document.
490
491
Chapter 9: VPN
This chapter describes the Virtual Private Network (VPN) functionality in NetDefendOS.
Overview, page 492
VPN Quick Start, page 496
IPsec Components, page 508
IPsec Tunnels, page 524
PPTP/L2TP, page 545
SSL VPN, page 564
CA Server Access, page 574
VPN Troubleshooting, page 577
9.1. Overview
9.1.1. VPN Usage
The Internet is increasingly used as a means to connect together computers since it offers
efficient and inexpensive communication. The requirement therefore exists for data to traverse
the Internet to its intended recipient without another party being able to read or alter it.
It is equally important that the recipient can verify that no one is falsifying data, in other words,
pretending to be someone else. Virtual Private Networks (VPNs) meet this need, providing a
highly cost effective means of establishing secure links between two co-operating computers so
that data can be exchanged in a secure manner.
VPN allows the setting up of a tunnel between two devices known as tunnel endpoints. All data
flowing through the tunnel is then secure. The mechanism that provides tunnel security is
encryption.
There are two common scenarios where VPN is used:
1.
LAN to LAN connection - Where two internal networks need to be connected together
over the Internet. In this case, each network is protected by an individual NetDefend
Firewall and the VPN tunnel is set up between them.
492
Chapter 9: VPN
2.
Client to LAN connection - Where many remote clients need to connect to an internal
network over the Internet. In this case, the internal network is protected by the NetDefend
Firewall to which the client connects and the VPN tunnel is set up between them.
493
Chapter 9: VPN
Non-repudiation
Proof that the sender actually sent the data; the sender
cannot later deny having sent it. Non-repudiation is usually
a side-effect of authentication.
VPNs are normally only concerned with confidentiality and authentication. Non-repudiation is
normally not handled at the network level but rather is usually done at a higher, transaction
level.
Restricting access through the VPN to needed services only, since mobile computers are
vulnerable.
Creating DMZs for services that need to be shared with other companies through VPNs.
Endpoint Security
A common misconception is that VPN-connections are equivalents to the internal network from
a security standpoint and that they can be connected directly to it with no further precautions. It
is important to remember that although the VPN-connection itself may be secure, the total level
of security is only as high as the security of the tunnel endpoints.
It is becoming increasingly common for users on the move to connect directly to their company's
network via VPN from their laptops. However, the laptop itself is often not protected. In other
words, an intruder can gain access to the protected network through an unprotected laptop and
already-opened VPN connections.
Placement in a DMZ
A VPN connection should never be regarded as an integral part of a protected network. The VPN
firewall should instead be located in a special DMZ or outside a firewall dedicated to this task. By
doing this, the administrator can restrict which services can be accessed via the VPN and ensure
that these services are well protected against intruders.
In instances where the firewall features an integrated VPN feature, it is usually possible to dictate
the types of communication permitted and NetDefendOS VPN has this feature.
494
Chapter 9: VPN
How will keys be distributed? Email is not a good solution. Phone conversations might be
secure enough.
How many different keys should be used? One key per user? One per group of users? One per
LAN-to-LAN connection? One key for all users and one key for all LAN-to-LAN connections? It
is probably better using more keys than is necessary today since it will be easier to adjust
access per user (group) in the future.
Should the keys be changed? If they are changed, how often? In cases where keys are shared
by multiple users, consider using overlapping schemes, so that the old keys work for a short
period of time when new keys have been issued.
What happens when an employee in possession of a key leaves the company? If several users
are using the same key, it should be changed.
In cases where the key is not directly programmed into a network unit, such as a VPN firewall,
how should the key be stored? On a floppy? As a pass phrase to memorize? On a smart card?
If it is a physical token, how should it be handled?
495
Chapter 9: VPN
The following sections will look at the detailed setup for each of the VPN scenarios listed earlier.
496
Chapter 9: VPN
2.
Optionally create a new IKE Algorithms object and/or an IPsec Algorithms object if the
default algorithm proposal lists do not provide a set of algorithms that are acceptable to the
tunnel remote end point. This will depend on the capabilities of the device at the other end
of the VPN tunnel.
3.
4.
The remote VPN gateway which is the IPv4 address of the network device at the other
end of the tunnel (let's call this object remote_gw). This may or may not be another
NetDefend Firewall.
The remote network which lies behind the remote VPN gateway (let's call this object
remote_net).
The local network behind the NetDefend Firewall which will communicate across the
tunnel. Here we will assume that this is the predefined address lannet and this network is
attached to the NetDefendOS lan interface which has the IPv4 address lan_ip.
Create an IPsec Tunnel object (let's call this object ipsec_tunnel). Specify the following
tunnel parameters:
For Authentication select the Pre-shared Key object defined in step (1) above.
The IPsec Tunnel object can be treated exactly like any NetDefendOS Interface object in
later steps.
5.
497
Chapter 9: VPN
An Allow rule for outbound traffic that has the previously defined ipsec_tunnel object as
the Destination Interface. The rule's Destination Network is the remote network
remote_net.
An Allow rule for inbound traffic that has the previously defined ipsec_tunnel object as
the Source Interface. The Source Network is remote_net.
Action
Src Interface
Src Network
Dest Interface
Dest Network
Service
Allow
lan
lannet
ipsec_tunnel
remote_net
all_services
Allow
ipsec_tunnel
remote_net
lan
lannet
all_services
The Service used in these rules is All but it could be a predefined service.
6.
Define a new NetDefendOS Route which specifies that the VPN Tunnel ipsec_tunnel is the
Interface to use for routing packets bound for the remote network at the other end of the
tunnel.
Interface
Network
Gateway
ipsec_tunnel
remote_net
<empty>
Open the management Web Interface for the NetDefend Firewall at one end of the tunnel.
2.
Under Key Ring, add the Root Certificate and Host Certificate into NetDefendOS. The root
certificate needs to have 2 parts added: a certificate file and a private key file. The gateway
certificate needs just the certificate file added.
3.
Set up the IPsec Tunnel object as for pre-shared keys, but specify the certificates to use
under Authentication. Do this with the following steps:
4.
a.
b.
c.
Open the management Web Interface for the NetDefend Firewall at the other side of the
tunnel and repeat the above steps with a different set of certificates.
498
Chapter 9: VPN
Also review Section 9.7, CA Server Access below, which describes important considerations for
certificate validation.
Self-signed certificates instead of CA signed can be used for LAN to LAN tunnels but the Web
Interface and other interfaces do not have a feature to generate them. Instead, they must be
generated by another utility and imported into NetDefendOS. This means that they are not truly
self-signed since they are generated outside of NetDefendOS control and it should be
remembered that there is no guarantee that their private key is unique. However, the security
provided can still be considered adequate for some scenarios.
Two self-signed certificates are required and the same two are used at either end of the tunnel
but their usage is reversed. In other words: one certificate is used as the root certificate at one
end, call it Side A, and as the host certificate at the other end, call it Side B. The second certificate
is used in the opposite way: as the host certificate at Side A and the root certificate at Side B.
No CA server considerations are needed with self-signed certificates since CRL lookup does not
occur.
This section details the setup with roaming clients connecting through an IPsec tunnel using
pre-shared keys to a protected Local Network which is located behind a NetDefend Firewall.
There are two types of roaming clients:
A. the IPv4 addresses of the clients are already allocated.
B. the IPv4 addresses of clients are not known beforehand and must be handed out by
NetDefendOS when the clients try to connect.
499
Chapter 9: VPN
the IPv4 addresses may be known beforehand and have been pre-allocated to the roaming
clients before they connect. The client's IP address will be manually input into the VPN client
software.
1.
Set up user authentication. XAuth user authentication is not required with IPsec roaming
clients but is recommended (this step could initially be left out to simplify setup). The
authentication source can be one of the following:
An internal user database is easier to set up and is assumed here. Changing this to an
external server is simple to do later.
To implement user authentication with an internal database:
Add individual users to TrustedUsers. This should consist of at least a username and
password combination.
The Group string for a user can be specified if its group's access is to be restricted to
certain source networks. Group can be specified (with the same text string) in the
Authentication section of an IP object. If that IP object is then used as the Source
Network of a rule in the IP rule set, that rule will only apply to a user if their Group string
matches the Group string of the IP object.
Note
Group has no meaning in Authentication Rules.
Create a new User Authentication Rule with the Authentication Source set to
TrustedUsers. The other parameters for the rule are:
Agent
Auth Source
Src Network
Interface
Client Source IP
XAUTH
Local
all-nets
any
all-nets (0.0.0.0/0)
2.
The IPsec Tunnel object ipsec_tunnel should have the following parameters:
Set the IKE and IPsec algorithm proposal lists to match the capabilities of the clients.
No routes can be predefined so the option Dynamically add route to the remote
network when tunnel established should be enabled for the tunnel object. If all-nets is
the destination network, the option Add route for remote network should be disabled.
Note
The option to dynamically add routes should not be enabled in LAN to LAN
tunnel scenarios.
500
Chapter 9: VPN
3.
Enable the option Require IKE XAuth user authentication for inbound IPsec tunnels.
This will enable a search for the first matching XAUTH rule in the authentication rules.
Action
Src Interface
Src Network
Dest Interface
Dest Network
Service
Allow
ipsec_tunnel
all-nets
lan
lannet
all_services
Once an Allow rule permits the connection to be set up, bidirectional traffic flow is allowed which
is why only one rule is used here. Instead of all-nets being used in the above, a more secure
defined IP object could be used which specifies the exact range of the pre-allocated IP addresses.
2.
Create a Config Mode Pool object (there can only be one associated with a
NetDefendOS installation) and in it specify the address range.
Enable the IKE Config Mode Pool option in the IPsec Tunnel object ipsec_tunnel.
Create an IP Pool object and in it specify the DHCP server to use. The DHCP server can
be specified as a simple IP address or alternatively as being accessible on a specific
interface. If an internal DHCP server is to be used then specify the loopback address
127.0.0.1 as the DHCP server IP address.
Create a Config Mode Pool object (there can only be one associated with a
NetDefendOS installation) and associate with it the IP Pool object defined in the
previous step.
Enable the IKE Config Mode Pool option in the IPsec Tunnel object ipsec_tunnel so the
created pool is selected.
Define the URL or IP address of the NetDefend Firewall. The client needs to locate the tunnel
endpoint.
Define the IPsec algorithms that will be used and which are supported by NetDefendOS.
There are a variety of IPsec client software products available from a number of suppliers and this
manual will not focus on any specific one. The network administrator should use the client that is
best suited to their budget and needs.
501
Chapter 9: VPN
Load a Root Certificate and a Gateway Certificate into NetDefendOS. The root certificate
needs to have 2 parts added: a certificate file and a private key file. The gateway certificate
needs just the certificate file added.
2.
When setting up the IPsec Tunnel object, specify the certificates to use under
Authentication. This is done by doing the following:
3.
a.
b.
c.
The IPsec client software will need to be appropriately configured with the certificates and
remote IP addresses. As already mentioned above, many third party IPsec client products
are available and this manual will not discuss any particular client.
The step to set up user authentication is optional since this is additional security to certificates.
Also review Section 9.7, CA Server Access, which describes important considerations for
certificate validation.
Create an IPv4 address object (let's call it l2tp_pool) which defines the range of IP addresses
which can be handed out to clients. Note that this object is a normal address book object
and not an IP Pool object.
The range chosen for this address object can be one of the following two types:
2.
A range taken from the internal network to which clients will connect. If the internal
network is 192.168.0.0/24 then we might use the address range 192.168.0.10 to
192.168.0.20. The danger here is that an IP address might be accidentally used on the
internal network and handed out to a client.
Use a new address range that is totally different to any internal network. This prevents
any chance of an address in the range also being used on the internal network.
wan_ip which is the external public IPv4 address through which clients connect (assume
this is on the wan interface).
502
Chapter 9: VPN
lan_ip which is the internal IP address of the interface to which the internal network is
connected (let's call this interface lan).
3.
4.
Define an IPsec Tunnel object (let's call this object ipsec_tunnel) with the following
parameters:
5.
6.
For Authentication select the Pre-shared Key object defined in the first step.
Disable the IPsec tunnel routing option Dynamically add route to the remote network
when tunnel established.
When all-nets is the destination network, as is the case here, the advanced setting option
Add route for remote network must also be disabled. This setting is enabled by
default.
Define an PPTP/L2TP Server object (let's call this object l2tp_tunnel) with the following
parameters:
Select the Microsoft Point-to-Point Encryption allowed. Since IPsec encryption is used
this can be set to be None only, otherwise double encryption will degrade throughput.
Enable Proxy ARP on the lan interface to which the internal network is connected.
Make the interface a member of a specific routing table so that routes are automatically
added to that table. Normally the main table is selected.
Add individual users to TrustedUsers. This should consist of at least a username and
password combination.
The Group string for a user can also be specified. This is explained in the same step in
the IPsec Roaming Clients section above.
503
Chapter 9: VPN
Agent
Auth Source
Src Network
Interface
Client Source IP
PPP
Local
all-nets
l2tp_tunnel
all-nets (0.0.0.0/0)
7.
To allow traffic through the L2TP tunnel the following rules should be defined in the IP rule
set:
Action
Src Interface
Src Network
Dest Interface
Dest Network
Service
Allow
l2tp_tunnel
l2tp_pool
any
int_net
all_services
NAT
l2tp_tunnel
l2tp_pool
ext
all-nets
all_services
The second rule would be included to allow clients to surf the Internet via the lan interface on
the NetDefend Firewall. The client will be allocated a private internal IP address which must be
NATed if connections are then made out to the public Internet via the NetDefend Firewall.
8.
Set up the client. Assuming Windows XP, the Create new connection option in Network
Connections should be selected to start the New Connection Wizard. The key information to
enter in this wizard is the resolvable URL of the NetDefend Firewall or alternatively its
wan_ip IP address.
Then choose Network > Properties. In the dialog that opens choose the L2TP Tunnel and
select Properties. In the new dialog that opens select the Networking tab and choose
Force to L2TP. Now go back to the L2TP Tunnel properties, select the Security tab and click
on the IPsec Settings button. Now enter the pre-shared key.
The NetDefendOS date and time must be set correctly since certificates can expire.
When setting up the IPsec Tunnel object, specify the certificates to use under
Authentication. This is done by:
i.
ii.
iii.
If using the Windows XP L2TP client, the appropriate certificates need to be imported into
Windows before setting up the connection with the New Connection Wizard.
The step to set up user authentication is optional since this is additional security to certificates.
Also review Section 9.7, CA Server Access, which describes important considerations for
certificate validation.
504
Chapter 9: VPN
strong, encryption.
A major secondary disadvantage is not being able to NAT PPTP connections through a tunnel so
multiple clients can use a single connection to the NetDefend Firewall. If NATing is tried then
only the first client that tries to connect will succeed.
The steps for PPTP setup are as follows:
1.
2.
3.
A pptp_pool IP object which is the range of internal IP addresses that will be handed out
from an internal network.
An int_net object which is the internal network from which the addresses come.
An lan_ip object which is the internal IP address of the interface connected to the
internal network. Let us assume that this interface is lan.
An wan_ip object which is the external public address which clients will connect to (let's
assume this is on the wan interface).
Define a PPTP/L2TP object (let's call it pptp_tunnel) with the following parameters:
As in L2TP, enable the insertion of new routes automatically into the main routing table.
Agent
Auth Source
Src Network
Interface
Client Source IP
PPP
Local
all-nets
pptp_tunnel
all-nets (0.0.0.0/0)
4.
Action
Src Interface
Src Network
Dest Interface
Dest Network
Service
Allow
pptp_tunnel
pptp_pool
any
int_net
all_services
NAT
pptp_tunnel
pptp_pool
ext
all-nets
all_services
As described for L2TP, the NAT rule lets the clients access the public Internet via the NetDefend
Firewall.
5.
Set up the client. For Windows XP, the procedure is exactly as described for L2TP above but
without entering the pre-shared key.
505
Chapter 9: VPN
Create address book objects for the tunnel. These will consist of:
i.
The network to which the local endpoint and the client addresses belong. For example,
192.168.99.0/24.
ii.
iii.
2.
Create a Pre-shared Key (PSK) object of type Passphrase (ASCII). This is the shared secret that
will be entered into the IPsec client on the iOS device along with username and password.
3.
Create a Config Mode Pool object, select the option Use a Static IP Pool and associate the IP
address range defined in the first step.
4.
Populate a local user database with users that have a username and password. This function
could also be performed by a RADIUS server.
5.
Define an IPsec tunnel object using the default proposal lists and with the following
properties:
i.
ii.
iii.
iv.
v.
vi.
Enable the option to Dynamically add a route to the remote network when tunnel is
established
x.
xi.
Place the tunnel last in the list of IPsec tunnels. Also be aware that this tunnel cannot coexist
with a PSK tunnel for L2TP/IPsec.
7.
ii.
506
Chapter 9: VPN
8.
iii.
iv.
Add IP rules for the client traffic. Typical rules will be Allow rules that permit clients to access
protected resources and NAT rules to reach the public Internet via the tunnel.
507
Chapter 9: VPN
9.3.1. Overview
Internet Protocol Security (IPsec) is a set of protocols defined by the Internet Engineering Task
Force (IETF) to provide IP security at the network layer. An IPsec based VPN is made up of two
parts:
The first part, IKE, is the initial negotiation phase, where the two VPN endpoints agree on which
methods will be used to provide security for the underlying IP traffic. Furthermore, IKE is used to
manage connections, by defining a set of Security Associations, SAs, for each connection. SAs are
unidirectional, so there are usually at least two for each IPsec connection.
The second part is the actual IP data being transferred, using the encryption and authentication
methods agreed upon in the IKE negotiation. This can be accomplished in a number of ways; by
using IPsec protocols ESP, AH, or a combination of both.
The flow of events can be briefly described as follows:
508
Chapter 9: VPN
IPsec protocol used (ESP/AH/both) as well as the session keys used to encrypt/decrypt and/or
authenticate/verify the transmitted data.
An SA is unidirectional and relates to traffic flow in one direction only. For the bidirectional traffic
that is usually found in a VPN, there is therefore a need for more than one SA per connection. In
most cases, where only one of ESP or AH is used, two SAs will be created for each connection,
one describing the incoming traffic, and the other the outgoing. In cases where ESP and AH are
used in conjunction, four SAs will be created.
IKE Negotiation
The process of negotiating session parameters consists of a number of phases and modes. These
are described in detail in the below sections.
The flow of events can be summarized as follows:
IKE Phase-1
Derive some fresh keying material from the key exchange in phase-1, to
provide session keys to be used in the encryption and authentication of
the VPN data flow
IKE Phase-2
509
Chapter 9: VPN
IKE Parameters
There are a number of parameters used in the negotiation process.
Below is a summary of the configuration parameters needed to establish a VPN connection.
Understanding what these parameters do before attempting to configure the VPN endpoints is
strongly recommended, since it is of great importance that both endpoints are able to agree on
all of these parameters.
With two NetDefend Firewalls as VPN endpoints, the matching process is greatly simplified since
the default NetDefendOS configuration parameters will be the same at either end. However, it
may not be as straightforward when equipment from different vendors is involved in
establishing the VPN tunnel.
Endpoint Identification
510
Chapter 9: VPN
Remote Endpoint
Main/Aggressive Mode
IPsec Protocols
511
Chapter 9: VPN
Note
NetDefendOS does not support AH.
IKE Encryption
AES
Blowfish
Twofish
Cast128
3DES
DES
SHA1
MD5
IKE DH Group
IKE Lifetime
512
Chapter 9: VPN
PFS
PFS DH Group
IPsec DH Group
IPsec Encryption
IPsec Authentication
AES
Blowfish
Twofish
Cast128
3DES
DES
IPsec Lifetime
SHA1
MD5
513
Chapter 9: VPN
Diffie-Hellman Groups
Diffie-Hellman (DH) is a cryptographic protocol that allows two parties that have no prior
knowledge of each other to establish a shared secret key over an insecure communications
channel through a series of plain text exchanges. Even though the exchanges between the
parties might be monitored by a third party, Diffie-Hellman makes it extremely difficult for the
third party to determine what the agreed shared secret key is and to decrypt data that is
encrypted using the key.
Diffie-Hellman is used to establish the shared secret keys for IKE, IPsec and PFS.
The Diffie-Hellman group indicates the degree of security used for DH exchanges. The higher the
group number, the greater the security but also the processing overhead. The DH groups
supported by NetDefendOS are as follows:
DH group 1 (768-bit)
DH group 2 (1024-bit)
DH group 5 (1536-bit)
All these DH groups are available for use with IKE, IPsec and PFS.
Note
NetDefendOS does not support manual keying.
514
Chapter 9: VPN
It is an old method, which was used before IKE came into use, and is thus lacking all the
functionality of IKE. This method therefore has a number of limitations, such as having to use the
same encryption/authentication key always, no anti-replay services, and it is not very flexible.
There is also no way of assuring that the remote host/firewall really is the one it says it is.
This type of connection is also vulnerable for something called "replay attacks", meaning a
malicious entity which has access to the encrypted traffic can record some packets, store them,
and send them to its destination at a later time. The destination VPN endpoint will have no way
of telling if this packet is a "replayed" packet or not. Using IKE eliminates this vulnerability.
PSK
Using a Pre-shared Key (PSK) is a method where the endpoints of the VPN "share" a secret key.
This is a service provided by IKE, and thus has all the advantages that come with it, making it far
more flexible than manual keying.
PSK Advantages
Pre-Shared Keying has a lot of advantages over manual keying. These include endpoint
authentication, which is what the PSKs are really for. It also includes all the benefits of using IKE.
Instead of using a fixed set of encryption keys, session keys will be used for a limited period of
time, where after a new set of session keys are used.
PSK Disadvantages
One thing that has to be considered when using Pre-Shared Keys is key distribution. How are the
Pre-Shared Keys distributed to remote VPN clients and firewalls? This is a major issue, since the
security of a PSK system is based on the PSKs being secret. Should one PSK be compromised, the
configuration will need to be changed to use a new PSK.
Certificates
Each VPN firewall has its own certificate, and one or more trusted root certificates.
The authentication is based on several things:
That each endpoint has the private key corresponding to the public key found in its
certificate, and that nobody else has access to the private key.
That the certificate has been signed by someone that the remote endpoint trusts.
Advantages of Certificates
A principal advantage of certificates is added flexibility. Many VPN clients, for instance, can be
managed without having the same pre-shared key configured on all of them, which is often the
case when using pre-shared keys and roaming clients. Instead, should a client be compromised,
the client's certificate can simply be revoked. No need to reconfigure every client.
Disadvantages of Certificates
The principal disadvantage of certificates is the added complexity. Certificate-based
authentication may be used as part of a larger public key infrastructure, making all VPN clients
and firewalls dependent on third parties. In other words, there are more aspects that have to be
configured, and there is more that can go wrong.
515
Chapter 9: VPN
AH (Authentication Header)
AH is a protocol used for authenticating a data stream.
AH uses a cryptographic hash function to produce a MAC from the data in the IP packet. This
MAC is then transmitted with the packet, allowing the remote endpoint to verify the integrity of
the original IP packet, making sure the data has not been tampered with on its way through the
Internet. Apart from the IP packet data, AH also authenticates parts of the IP header.
The AH protocol inserts an AH header after the original IP header. In tunnel mode, the AH header
is inserted after the outer header, but before the original, inner IP header.
516
Chapter 9: VPN
Additions to IKE that lets IPsec peers tell each other that they support NAT traversal, and the
specific versions supported. NetDefendOS supports the RFC3947 standard for NAT-Traversal
with IKE.
Changes to the ESP encapsulation. If NAT traversal is used, ESP is encapsulated in UDP, which
allows for more flexible NATing.
Below is a more detailed description of the changes made to the IKE and IPsec protocols.
NAT traversal is only used if both ends have support for it. For this purpose, NAT traversal aware
VPNs send out a special "vendor ID" to tell the other end of the tunnel that it understands NAT
traversal, and which specific versions of the draft it supports.
Changing Ports
Once the IPsec peers have decided that NAT traversal is necessary, the IKE negotiation is moved
away from UDP port 500 to port 4500. This is necessary since certain NAT devices treat UDP
packet on port 500 differently from other UDP packets in an effort to work around the NAT
problems with IKE. The problem is that this special handling of IKE packets may in fact break the
IKE negotiations, which is why the UDP port used by IKE has changed.
517
Chapter 9: VPN
UDP Encapsulation
Another problem that NAT traversal resolves is that the ESP protocol is an IP protocol. There is no
port information as we have in TCP and UDP, which makes it impossible to have more than one
NATed client connected to the same remote gateway and at the same time. Because of this, ESP
packets are encapsulated in UDP. ESP-UDP traffic is sent on port 4500, the same port as IKE when
NAT traversal is used. Once the port has been changed, all following IKE communication is done
over port 4500. Keep-alive packets are also sent periodically to keep the NAT mapping alive.
On responding firewalls, the Remote Endpoint field is used as a filter on the source IP of
received IKE packets. This should be set to allow the NATed IP address of the initiator.
When individual pre-shared keys are used with multiple tunnels connecting to one remote
firewall which are then NATed out through the same address, it is important to make sure the
Local ID is unique for every tunnel. The Local ID can be one of
Auto - The local ID is taken as the IP address of the outgoing interface. This is the
recommended setting unless the two firewalls have the same external IP address.
High
This consists of a more restricted set of algorithms to give higher security. The complete list is
3DES, AES, Blowfish, MD5, SHA1.
Medium
This consists of a longer set of algorithms. The complete list is 3DES, AES, Blowfish, Twofish,
518
Chapter 9: VPN
Web Interface
First create a list of IPsec Algorithms:
1.
Go to: Objects > VPN Objects > IPsec Algorithms > Add > IPsec Algorithms
2.
3.
4.
DES
3DES
SHA1
MD5
Click OK
2.
3.
4.
Click OK
Chapter 9: VPN
Pre-Shared Keys are used to authenticate VPN tunnels. The keys are secrets that are shared by
the communicating parties before communication takes place. To communicate, both parties
prove that they know the secret. The security of a shared secret depends on how "good" a
passphrase is. Passphrases that are common words are extremely vulnerable to dictionary
attacks.
Pre-shared Keys can be generated automatically through the Web Interface but they can also be
generated through the CLI using the command pskgen (this command is fully documented in the
CLI Reference Guide).
To have a longer, more secure 512 bit key the command would be:
gw-world:/> pskgen MyPSK -size=512
Web Interface
First create a Pre-shared Key:
1.
Go to: Objects > Key Ring > Add > Pre-shared key
2.
3.
Choose Hexadecimal Key and click Generate Random Key to generate a key to the
Passphrase textbox
4.
Click OK
520
Chapter 9: VPN
2.
3.
Under the Authentication tab, choose Pre-shared Key and select MyPSK
4.
Click OK
A Typical Scenario
Consider the scenario of travelling employees being given access to the internal corporate
networks using VPN clients. The organization administers their own Certificate Authority, and
certificates have been issued to the employees. Different groups of employees are likely to have
access to different parts of the internal networks. For example, members of the sales force need
access to servers running the order system, while technical engineers need access to technical
databases.
The Problem
Since the IP addresses of the travelling employees VPN clients cannot be known beforehand, the
incoming VPN connections from the clients cannot be differentiated. This means that the firewall
is unable to control the access to various parts of the internal networks.
521
Chapter 9: VPN
gw-world:/MyIDList> cc
Web Interface
First create an Identification List:
1.
Go to: Objects > VPN Objects > IKE ID Lists > Add > ID List
2.
3.
Click OK
Go to: Objects > VPN Objects > IKE ID Lists > Add > ID List
2.
Select MyIDList
3.
4.
5.
Now enter:
6.
Country: Sweden
Click OK
522
Chapter 9: VPN
2.
3.
4.
Select the appropriate certificate in the Root Certificate(s) and Gateway Certificate
controls
5.
6.
Click OK
523
Chapter 9: VPN
9.4.1. Overview
An IPsec Tunnel defines an endpoint of an encrypted tunnel. Each IPsec Tunnel is interpreted as a
logical interface by NetDefendOS, with the same filtering, traffic shaping and configuration
capabilities as regular interfaces.
If the local network for the tunnel is all-nets then NetDefendOS will not be able to assign an IP
address and a value will need to be assigned manually. The assigned IP address can then be
used to NAT connections out into the tunnel.
If NetDefendOS itself is sending information through the tunnel such as log messages, a valid
source IP address is needed.
If ICMP ping messages are to be sent out inside the tunnel then a valid IP address is required.
Note that if a value is assigned to this property, a core route is automatically added to all routing
tables which routes the IP address on core.
524
Chapter 9: VPN
negotiations then take place, resulting in the tunnel becoming established to the remote
endpoint.
Returning Traffic
For network traffic going in the opposite direction, back into an IPsec tunnel, a reverse process
takes place. First, the unencrypted traffic is evaluated by the rule set. If a rule and route matches,
NetDefendOS tries to find an established IPsec tunnel that matches the criteria. If not found,
NetDefendOS will try to establish a new tunnel to the remote endpoint specified by a matching
IPsec tunnel definition.
Chapter 9: VPN
Keep-alive
The IPsec Keep-alive option ensures that the tunnel remains established at all possible times even
if no traffic flows. It does this by continuously sending ICMP Ping messages through the tunnel. If
replies to the ping messages are not received then the tunnel link is assumed to be broken and
an attempt is automatically made to re-establish the tunnel. This feature is only useful for LAN to
LAN tunnels.
Optionally, a specific source IP address and/or a destination IP address for the pings can be
specified. It is recommended to specify a destination IP of a host which is known to being able to
reliably respond to ICMP messages. If a destination IP is not specified, NetDefendOS will use the
first IP address on the remote network.
An important usage of keep-alive is if a LAN to LAN tunnel with infrequent data traffic can only
be established from one side but needs to be kept alive for hosts on the other peer. If the peer
that establishes the tunnel uses keep-alive to keep the tunnel established, any hosts on the other
side can use the tunnel even though the other peer cannot establish the tunnel when it is
needed.
Keep-alive can only be used for LAN to LAN IPsec tunnels. It cannot be used with roaming
clients.
Keep-alive is much faster at detecting that a tunnel is down and re-establishing it. It is
therefore a preferred solution for LAN to LAN tunnels.
Having keep-alive and DPD enabled simultaneously for a LAN to LAN tunnel is not needed since
DPD will never trigger if keep-alive pings are being sent.
In addition to the quick start section, more explanation of tunnel setup is given below.
526
Chapter 9: VPN
over the public Internet. In a corporate context this means LANs at geographically separate sites
can communicate with a level of security comparable to that existing if they communicated
through a dedicated, private link.
Secure communication is achieved through the use of IPsec tunneling, with the tunnel extending
from the VPN gateway at one location to the VPN gateway at another location. The NetDefend
Firewall is therefore the implementer of the VPN, while at the same time applying normal
security surveillance of traffic passing through the tunnel. This section deals specifically with
setting up LAN to LAN tunnels created with a Pre-shared Key (PSK).
A number of steps are required to set up LAN to LAN tunnels with PSK:
Set up the VPN tunnel properties and include the Pre-Shared key.
Set up the Route in the main routing table (or another table if an alternate is being used).
527
Chapter 9: VPN
1.
Go to: Objects > Key Ring > Add > Pre-Shared Key
2.
Now enter:
3.
Click OK
Go to: Network > Interfaces and VPN > IPsec > Add > IPsec Tunnel
2.
Now enter:
3.
4.
Name: RoamingIPsecTunnel
Local Network: 10.0.1.0/24 (This is the local network that the roaming users will connect
to)
5.
6.
Enable the option: Dynamically add route to the remote network when a tunnel is
established.
Click OK
C. Finally configure the IP rule set to allow traffic inside the tunnel.
528
Chapter 9: VPN
for roaming clients that connect to the office to gain remote access. The head office network
uses the 10.0.1.0/24 network span with external firewall IP wan_ip.
Web Interface
A. Create a Self-signed Certificate for IPsec authentication:
The step to actually create self-signed certificates is performed outside the Web Interface using a
suitable software product. The certificate should be in the PEM (Privacy Enhanced Mail) file
format.
B. Upload all the client self-signed certificates:
1.
2.
3.
4.
Click OK
Go to: Objects > VPN Objects > ID List > Add > ID List
2.
3.
Click OK
4.
Go to: Objects > VPN Objects > ID List > Sales > Add > ID
5.
6.
7.
In the Email address field, enter the email address selected when the certificate was
created on the client
8.
Create a new ID for every client that is to be granted access rights, according to the
instructions above
Go to: Network > Interfaces and VPN > IPsec > Add > IPsec Tunnel
2.
Now enter:
3.
Name: RoamingIPsecTunnel
Local Network: 10.0.1.0/24 (This is the local network that the roaming users will connect
to)
529
Chapter 9: VPN
4.
5.
Root Certificate(s): Select all client certificates and add them to the Selected list
Identification List: Select the ID List that is to be associated with the VPN Tunnel. In this
case, it will be sales
6.
Enable the option: Dynamically add route to the remote network when a tunnel is
established.
Click OK
E. Finally configure the IP rule set to allow traffic inside the tunnel.
2.
3.
4.
Click OK
530
Chapter 9: VPN
1.
Go to: Objects > VPN Objects > ID List > Add > ID List
2.
3.
Click OK
4.
Go to: Objects > VPN Objects > ID List > Sales > Add > ID
5.
6.
7.
In the Email address field, enter the email address selected when the certificate was
created on the client
8.
Create a new ID for every client that is to be granted access rights, according to the
instructions above
Go to: Network > Interfaces and VPN > IPsec > Add > IPsec Tunnel
2.
Now enter:
3.
4.
5.
Name: RoamingIPsecTunnel
Local Network: 10.0.1.0/24 (This is the local network that the roaming users will connect
to)
Root Certificate(s): Select the CA server root certificate imported earlier and add it to
the Selected list
Identification List: Select the ID List that is to be associated with the VPN Tunnel. In this
case, it will be sales
6.
Enable the option: Dynamically add route to the remote network when a tunnel is
established
Click OK
531
Chapter 9: VPN
D. Finally configure the IP rule set to allow traffic inside the tunnel.
DNS
NBNS/WINS
DHCP
Subnets
Go to: Objects > VPN Objects > IKE Config Mode Pool
2.
The Config Mode Pool object properties web page now appears
3.
4.
5.
Click OK
532
Chapter 9: VPN
After defining the Config Mode object, the only remaining action is to enable Config Mode to be
used with the IPsec Tunnel.
Example 9.8. Using Config Mode with IPsec Tunnels
Assuming a predefined tunnel called vpn_tunnel1 this example shows how to enable Config
Mode for that tunnel.
Web Interface
Select the pool in the IKE Config Mode Pool drop down list
Click OK
IP Validation
NetDefendOS always checks if the source IP address of each packet inside an IPsec tunnel is the
same as the IP address assigned to the IPsec client with IKE config mode. If a mismatch is
detected the packet is always dropped and a log message generated with a severity level of
Warning. This message includes the two IP addresses as well as the client identity.
Optionally, the affected SA can be automatically deleted if validation fails by enabling the
advanced setting IPsecDeleteSAOnIPValidationFailure . The default value for this setting is
Disabled.
Local Gateway
In the situation where clients are initiating IPsec connections to the firewall, the usual situation is
that the client will send the initial IKE request to the IP address bound to a physical interface.
However, if there are other IP addresses being ARP published on the interface and IKE requests
are being sent to these addresses, the IPsec tunnel property Local Gateway is used to specify the
IP addresses on which IKE requests will be accepted.
The Local Gateway property is never used if NetDefendOS is initiating the IPsec tunnel
connection.
533
Chapter 9: VPN
Web Interface
1.
Go to: Objects > VPN Objects > LDAP > Add > LDAP Server
2.
Now enter:
3.
IP Address: 192.168.101.146
Username: myusername
Password: mypassword
Port: 389
Click OK
Using ikesnoop
The ikesnoop command can be entered via a CLI console or directly via the RS232 Console.
To begin monitoring the full command is:
gw-world:/> ikesnoop -on -verbose
This means that ikesnoop output will be sent to the console for every VPN tunnel IKE negotiation.
The output can be overwhelming so to limit the output to a single IP address, for example the IP
address 10.1.1.10, the command would be:
gw-world:/> ikesnoop -on 10.1.1.10 -verbose
534
Chapter 9: VPN
the IPv4 address used is the IP address of the VPN tunnel's remote endpoint (either the IP of the
remote endpoint or the client IP). To turn off monitoring, the command is:
gw-world:/> ikesnoop -off
The output from verbose option can be troublesome to interpret by an administrator seeing it for
the first time. Presented below is some typical ikesnoop output with annotations to explain it.
The tunnel negotiation considered is based on Pre-shared Keys. A negotiation based on
certificates is not discussed here but the principles are similar.
Complete ikesnoop command options can be found in the CLI Reference Guide.
535
Chapter 9: VPN
Transform 3/4
Transform ID
: IKE
Encryption algorithm
: 3DES-cbc
Hash algorithm
: MD5
Authentication method
: Pre-Shared Key
Group description
: MODP 1024
Life type
: Seconds
Life duration
: 43200
Life type
: Kilobytes
Life duration
: 50000
Transform 4/4
Transform ID
: IKE
Encryption algorithm
: 3DES-cbc
Hash algorithm
: SHA
Authentication method
: Pre-Shared Key
Group description
: MODP 1024
Life type
: Seconds
Life duration
: 43200
Life type
: Kilobytes
Life duration
: 50000
VID (Vendor ID)
Payload data length : 16 bytes
Vendor ID
: 8f 9c c9 4e 01 24 8e cd f1 47 59 4c 28 4b 21
Description : SSH Communications Security QuickSec 2.1.0
VID (Vendor ID)
Payload data length : 16 bytes
Vendor ID
: 27 ba b5 dc 01 ea 07 60 ea 4e 31 90 ac 27 c0
Description : draft-stenberg-ipsec-nat-traversal-01
VID (Vendor ID)
Payload data length : 16 bytes
Vendor ID
: 61 05 c4 22 e7 68 47 e4 3f 96 84 80 12 92 ae
Description : draft-stenberg-ipsec-nat-traversal-02
VID (Vendor ID)
Payload data length : 16 bytes
Vendor ID
: 44 85 15 2d 18 b6 bb cd 0b e8 a8 46 95 79 dd
Description : draft-ietf-ipsec-nat-t-ike-00
VID (Vendor ID)
Payload data length : 16 bytes
Vendor ID
: cd 60 46 43 35 df 21 f8 7c fd b2 fc 68 b6 a4
Description : draft-ietf-ipsec-nat-t-ike-02
VID (Vendor ID)
Payload data length : 16 bytes
Vendor ID
: 90 cb 80 91 3e bb 69 6e 08 63 81 b5 ec 42 7b
Description : draft-ietf-ipsec-nat-t-ike-02
VID (Vendor ID)
Payload data length : 16 bytes
Vendor ID
: 7d 94 19 a6 53 10 ca 6f 2c 17 9d 92 15 52 9d
Description : draft-ietf-ipsec-nat-t-ike-03
3b
d0
cd
cc
48
1f
56
Explanation of Values
Exchange type: Main mode or aggressive mode (IKEv1.0 only)
Cookies: A random number to identify the negotiation
Encryption algorithm: Cipher
Key length: Cipher key length
Hash algorithm: Hash
Authentication method: Pre-shared key or certificate
Group description: Diffie Hellman (DH) group
Life type: Seconds or kilobytes
Life duration: No of seconds or kilobytes
VID: The IPsec software vendor plus what standards are supported. For example, NAT-T
536
Chapter 9: VPN
proposal chosen" message will be seen, tunnel setup will fail and the ikesnoop command output
will stop at this point.
IkeSnoop: Sending IKE packet to 192.168.0.10:500 Exchange type :
Identity Protection (main mode) ISAKMP Version : 1.0
Flags
:
Cookies
: 0x6098238b67d97ea6 -> 0x5e347cb76e95a
Message ID
: 0x00000000
Packet length : 224 bytes
# payloads
: 8
Payloads:
SA (Security Association)
Payload data length : 52 bytes
DOI : 1 (IPsec DOI)
Proposal 1/1
Protocol 1/1
Protocol ID
: ISAKMP
SPI Size
: 0
Transform 1/1
Transform ID
: IKE
Encryption algorithm
: Rijndael-cbc (aes)
Key length
: 128
Hash algorithm
: MD5
Authentication method
: Pre-Shared Key
Group description
: MODP 1024
Life type
: Seconds
Life duration
: 43200
VID (Vendor ID)
Payload data length : 16 bytes
Vendor ID
: 8f 9c c9 4e 01 24 8e cd f1 47 59 4c 28 4b 21
Description : SSH Communications Security QuickSec 2.1.0
VID (Vendor ID)
Payload data length : 16 bytes
Vendor ID
: 27 ba b5 dc 01 ea 07 60 ea 4e 31 90 ac 27 c0
Description : draft-stenberg-ipsec-nat-traversal-01
VID (Vendor ID)
Payload data length : 16 bytes
Vendor ID
: 61 05 c4 22 e7 68 47 e4 3f 96 84 80 12 92 ae
Description : draft-stenberg-ipsec-nat-traversal-02
VID (Vendor ID)
Payload data length : 16 bytes
Vendor ID
: 44 85 15 2d 18 b6 bb cd 0b e8 a8 46 95 79 dd
Description : draft-ietf-ipsec-nat-t-ike-00
VID (Vendor ID)
Payload data length : 16 bytes
Vendor ID
: cd 60 46 43 35 df 21 f8 7c fd b2 fc 68 b6 a4
Description : draft-ietf-ipsec-nat-t-ike-02
VID (Vendor ID)
Payload data length : 16 bytes
Vendor ID
: 90 cb 80 91 3e bb 69 6e 08 63 81 b5 ec 42 7b
Description : draft-ietf-ipsec-nat-t-ike-02
VID (Vendor ID)
Payload data length : 16 bytes
Vendor ID
: 7d 94 19 a6 53 10 ca 6f 2c 17 9d 92 15 52 9d
Description : draft-ietf-ipsec-nat-t-ike-03
3b
d0
cd
cc
48
1f
56
537
Chapter 9: VPN
Payloads:
KE (Key Exchange)
Payload data length
NONCE (Nonce)
Payload data length
NAT-D (NAT Detection)
Payload data length
NAT-D (NAT Detection)
Payload data length
: 128 bytes
: 16 bytes
: 16 bytes
: 16 bytes
538
Chapter 9: VPN
The Notification field is given as Initial Contact to indicate this is not a re-key.
539
Chapter 9: VPN
SA life type
: Seconds
SA life duration
: 21600
SA life type
: Kilobytes
SA life duration
: 50000
Encapsulation mode
: Tunnel
Transform 4/4
Transform ID
: Blowfish
Key length
: 128
Authentication algorithm : HMAC-SHA-1
SA life type
: Seconds
SA life duration
: 21600
SA life type
: Kilobytes
SA life duration
: 50000
Encapsulation mode
: Tunnel
NONCE (Nonce)
Payload data length : 16 bytes
ID (Identification)
Payload data length : 8 bytes
ID : ipv4(any:0,[0..3]=10.4.2.6)
ID (Identification)
Payload data length : 12 bytes
ID : ipv4_subnet(any:0,[0..7]=10.4.0.0/16)
540
Chapter 9: VPN
Key length
: 128
Authentication algorithm : HMAC-MD5
SA life type
: Seconds
SA life duration
: 21600
SA life type
: Kilobytes
SA life duration
: 50000
Encapsulation mode
: Tunnel
NONCE (Nonce)
Payload data length : 16 bytes
ID (Identification)
Payload data length : 8 bytes
ID : ipv4(any:0,[0..3]=10.4.2.6)
ID (Identification)
Payload data length : 12 bytes
ID : ipv4_subnet(any:0,[0..7]=10.4.0.0/16)
Chapter 9: VPN
542
Chapter 9: VPN
Maximum number of certificates/CRLs that can be held in the internal certificate cache. When the
certificate cache is full, entries will be removed according to an LRU (Least Recently Used)
algorithm.
Default: 1024
DPD Metric
The amount of time in tens of seconds that the peer is considered to be alive (reachable) since
the last received IKE message. This means that no DPD messages for checking aliveness of the
peer will be sent during this time even though no packets from the peer have been received
during this time.
In other words, the amount of time in tens of seconds that a tunnel is without traffic or any other
sign of life before the peer is considered dead. If DPD is due to be triggered but other evidence of
life is seen (such as IKE packets from the other side of the tunnel) within the time frame, no
DPD-R-U-THERE messages will be sent.
For example, if the other side of the tunnel has not sent any ESP packets for a long period but at
least one IKE-packet has been seen within the last (10 x the configured value) seconds, then
NetDefendOS will not send more DPD-R-U-THERE messages to the other side.
Default: 3 (in other words, 3 x 10 = 30 seconds)
543
Chapter 9: VPN
544
Chapter 9: VPN
9.5. PPTP/L2TP
The access by a client using a modem link over dial-up public switched networks, possibly with
an unpredictable IP address, to protected networks via a VPN poses particular problems. Both the
PPTP and L2TP protocols provide two different means of achieving VPN access from remote
clients. The most commonly used feature that is relevant in this scenario is the ability of
NetDefendOS to act as either a PPTP or L2TP server and the first two sections below deal with
this. The third section deals with the further ability of NetDefendOS to act as a PPTP or L2TP
client.
Implementation
PPTP can be used in the VPN context to tunnel different protocols across the Internet. Tunneling
is achieved by encapsulating PPP packets in IP datagrams using Generic Routing Encapsulation
(GRE - IP protocol 47). The client first establishes a connection to an ISP in the normal way using
the PPP protocol and then establishes a TCP/IP connection across the Internet to the NetDefend
Firewall, which acts as the PPTP server (TCP port 1723 is used). The ISP is not aware of the VPN
since the tunnel extends from the PPTP server to the client. The PPTP standard does not define
how data is encrypted. Encryption is usually achieved using the Microsoft Point-to-Point
Encryption (MPPE) standard.
Deployment
PPTP offers a convenient solution to client access that is simple to deploy. PPTP does not require
the certificate infrastructure found in L2TP but instead relies on a username/password sequence
to establish trust between client and server. The level of security offered by a non-certificate
based solution is arguably one of PPTP's drawbacks. PPTP also presents some scalability issues
with some PPTP servers restricting the number of simultaneous PPTP clients. Since PPTP does not
use IPsec, PPTP connections can be NATed and NAT traversal is not required. PPTP has been
bundled by Microsoft in its operating systems since Windows95 and therefore has a large
number of clients with the software already installed.
545
Chapter 9: VPN
Troubleshooting PPTP
A common problem with setting up PPTP is that a router and/or switch in a network is blocking
TCP port 1723 and/or IP protocol 47 before the PPTP connection can be made to the NetDefend
Firewall. Examining the log can indicate if this problem occurred, with a log message of the
following form appearing:
Error PPP lcp_negotiation_stalled ppp_terminated
Web Interface
1.
Go to: Network > Interfaces and VPN > PPTP/L2TP Servers > Add > PPTP/L2TP Server
2.
3.
Now enter:
4.
Under the PPP Parameters tab, select pptp_Pool in the IP Pool control
5.
Under the Add Route tab, select all-nets from Allowed Networks
6.
Click OK
Use User Authentication Rules is enabled as default. To be able to authenticate the users using
the PPTP tunnel it is required to configure NetDefendOS Authentication Rules but that will not be
covered in this example.
Chapter 9: VPN
Layer 2 Tunneling Protocol (L2TP) is an IETF open standard that overcomes many of the problems
of PPTP. Its design is a combination of Layer 2 Forwarding (L2F) protocol and PPTP, making use of
the best features of both. Since the L2TP standard does not implement encryption, it is usually
implemented with an IETF standard known as L2TP/IPsec, in which L2TP packets are
encapsulated by IPsec.
The client communicates with a Local Access Concentrator (LAC) and the LAC communicates
across the Internet with a L2TP Network Server (LNS). The NetDefend Firewall acts as the LNS. The
LAC tunnels data, such as a PPP session, using IPsec to the LNS across the Internet. In most cases
the client will itself act as the LAC.
L2TP is certificate based and therefore is simpler to administer with a large number of clients and
arguably offers better security than PPTP. Unlike PPTP, it is possible to set up multiple virtual
networks across a single tunnel. Because it is IPsec based, L2TP requires NAT traversal (NAT-T) to
be implemented on the LNS side of the tunnel.
Web Interface
1.
Go to: Network > Interfaces and VPN > PPTP/L2TP Servers > Add > PPTP/L2TP Server
2.
Enter a suitable name for the L2TP Server, for example MyL2TPServer
3.
Now enter:
4.
Under the PPP Parameters tab, select L2TP_Pool in the IP Pool control.
547
Chapter 9: VPN
5.
Under the Add Route tab, select all-nets in the Allowed Networks control.
6.
Click OK
Use User Authentication Rules is enabled as default. To be able to authenticate users using the
PPTP tunnel, it is necessary to configure NetDefendOS Authentication Rules but that is not
covered in this example.
Web Interface
1.
Go to: Policies > User Authentication Local User Databases > Add > Local User
Database
2.
Enter a suitable name for the user database, for example UserDB
3.
Go to: Policies > User Authentication Local User Databases > UserDB > Add > User
4.
Now enter:
5.
Username: testuser
Password: mypassword
Click OK
Now we will setup the IPsec Tunnel, which will later be used in the L2TP section. As we are going
to use L2TP, the Local Network is the same IP as the IP that the L2TP tunnel will connect to,
wan_ip. Furthermore, the IPsec tunnel needs to be configured to dynamically add routes to the
remote network when the tunnel is established.
548
Chapter 9: VPN
Web Interface
1.
Go to: Network > Interfaces and VPN > IPsec > Add > IPsec Tunnel
2.
3.
Now enter:
a.
b.
c.
d.
e.
f.
4.
5.
6.
7.
8.
9.
Enable Dynamically add route to the remote network when a tunnel is established
Click OK
Now it is time to setup the L2TP Server. The inner IP address should be a part of the network
which the clients are assigned IP addresses from, in this lan_ip. The outer interface filter is the
interface that the L2TP server will accept connections on, this will be the earlier created
l2tp_ipsec. ProxyARP also needs to be configured for the IPs used by the L2TP Clients.
C. Setup the L2TP Tunnel:
Command-Line Interface
549
Chapter 9: VPN
Web Interface
1.
Go to: Network > Interfaces and VPN > PPTP/L2TP Servers > Add > PPTP/L2TP Server
2.
3.
Now enter:
4.
Under the PPP Parameters tab, check the Use User Authentication Rules control
5.
6.
Under the Add Route tab, select all-nets in the Allowed Networks control
7.
8.
Click OK
In order to authenticate the users using the L2TP tunnel, a user authentication rule needs to be
configured.
D. Next will be setting up the authentication rules:
Command-Line Interface
gw-world:/> add UserAuthRule AuthSource=Local
Interface=l2tp_tunnel
OriginatorIP=all-nets
LocalUserDB=UserDB
agent=PPP TerminatorIP=wan_ip
name=L2TP_Auth
Web Interface
1.
Go to: Policies > User Authentication User Authentication Rules > Add > UserAuthRule
2.
3.
Now enter:
Agent: PPP
550
Chapter 9: VPN
Interface: l2tp_tunnel
4.
Under the Authentication Options tab enter UserDB as the Local User DB
5.
Click OK
When the other parts are done, all that is left is the rules. To let traffic through from the tunnel,
two IP rules should be added.
E. Finally, set up the rules:
Command-Line Interface
gw-world:/> add IPRule action=Allow
Service=all_services
SourceInterface=l2tp_tunnel
SourceNetwork=l2tp_pool
DestinationInterface=any
DestinationNetwork=all-nets
name=AllowL2TP
Web Interface
1.
2.
3.
Now enter:
Action: Allow
Service: all_services
4.
Click OK
5.
551
Chapter 9: VPN
6.
7.
Now enter:
8.
Action: NAT
Service: all_services
Click OK
Client Setup
PPTP and L2TP shares a common approach to client setup which involves the following settings:
552
Chapter 9: VPN
General Parameters
Remote Endpoint - The IP address of the remote endpoint. Where this is specified as a URL,
the prefix dns: must be precede it.
Authentication
Security
IPsecInterface - Optionally specify an IPsecTunnel object to use. The tunnel should not have
the Dynamically add route to remote network option enabled since this can cause
problems.
MPPE - Specifies if Microsoft Point-to-Point Encryption is used and which level to use.
If Dial On Demand is enabled then the PPTP/L2TP tunnel will not be set up until traffic is sent on
the interface. The parameters for this option are:
A route is added to the routing table in NetDefendOS which specifies that traffic for the
server should be routed through the PPTP tunnel.
Using this client approach is suitable for situations where an ISP requires PPTP for authentication.
553
Chapter 9: VPN
Support for many more tunnels or many more sessions within one tunnel.
Can be manually configured with static parameters and does not require a control channel.
Like standard L2TP, L2TPv3 does not provide encryption of transmitted data. If the L2TPv3
tunnel is to be secure, it should be used with IPsec or PPPoE.
NetDefendOS L2TPv3 can only be used with IPv4. IPv6 is not supported by NetDefendOS at
this time.
554
Chapter 9: VPN
L2TPv3 support in NetDefendOS allows the NetDefend Firewall to act as either an L2TPv3
server or a client. Setting up these two functions is described next.
Local Network - Set this to the protected network that will be accessed through the
tunnel.
ii.
Inner IP Address - Set this to any IPv4 address within the network used for the Local
Network property. As a convention, it is recommended to use the IPv4 address of the
physical interface connected to the protected network.
iii.
Outer Interface Filter - Set this to be the listening interface for L2TPv3 client
connections. Without IPsec, this is set to a physical Ethernet interface. When using IPsec
for encryption, this is set to the IPsec tunnel object.
iv.
555
Chapter 9: VPN
Web Interface
A. First, define an L2TPv3 Server object:
556
Chapter 9: VPN
1.
Go to: Network > Interfaces and VPN > L2TPv3 Servers > Add > L2TPv3 Server
2.
Now enter:
3.
Name: my_l2tpv3_if
Click OK
2.
3.
4.
Click OK
557
Chapter 9: VPN
Web Interface
A. First, define an L2TPv3 Server object:
1.
Go to: Network > Interfaces and VPN > L2TPv3 Servers > Add > L2TPv3 Server
2.
Now enter:
3.
Name: my_l2tpv3_if
Click OK
2.
3.
4.
Click OK
ii.
iii.
iv.
The IPv4 address for the VLAN is any arbitrary IP from the protected local network.
558
Chapter 9: VPN
v.
The VLAN ID is the same as the previous VLAN and the same as the ID of packets sent by
clients.
ii.
iii.
iv.
The IPv4 address for the VLAN is any arbitrary IP from the protected local network but
different from the previous VLAN.
v.
Web Interface
A. First, define a L2TPv3 Server object:
559
Chapter 9: VPN
1.
Go to: Network > Interfaces and VPN > L2TPv3 Servers > Add > L2TPv3 Server
2.
Now enter:
3.
Name: my_l2tpv3_if
Click OK
Go to: Network > Interfaces and VPN > VLAN > Add > VLAN
2.
3.
Now enter:
Name: my_vlan_local
Interface: If3
IP Address: If3_arbitrary_ip1
Network: If3_net
4.
5.
Click OK
Go to: Network > Interfaces and VPN > VLAN > Add > VLAN
2.
3.
Now enter:
Name: my_vlan_l2tpv3
Interface: my_l2tpv3_if
IP Address: If3_arbitrary_ip2
Network: If3_net
4.
5.
Click OK
560
Chapter 9: VPN
Inner IP Address - The local IP address inside the tunnel. This is usually the IP address of
the physical interface which is the local tunnel endpoint
ii.
Local Network - The protected local network accessible through the tunnel.
iii.
Pseudowire Type - This will normally be Ethernet. Set to VLAN for VLANs
iv.
v.
B. Enable transparent mode on the inner interface where the protected network is located.
Web Interface
A. First, define an L2TPv3 Client object:
1.
Go to: Network > Interfaces and VPN > L2TPv3 Client > Add > L2TPv3 Client
2.
Now enter:
Name: my_l2tpv3_client
561
Chapter 9: VPN
3.
Protocol: UDP
Click OK
2.
3.
4.
Click OK
562
Chapter 9: VPN
Web Interface
A. First, define an L2TPv3 Client object:
1.
Go to: Network > Interfaces and VPN > L2TPv3 Client > Add > L2TPv3 Client
2.
Now enter:
3.
Name: my_l2tpv3_client
Protocol: UDP
IPsecInterface: l2tpv3_ipsec_tunnel
Click OK
2.
3.
4.
Click OK
563
Chapter 9: VPN
An SSL VPN Interface object needs to be created which configures a particular Ethernet
interface to accept SSL VPN connections.
ii.
An Authentication Rule needs to be defined for incoming SSL VPN clients and the rule
must have the Interface property set to be the name of the SSL VPN object created
above.
The Authentication Agent of the rule must be set to L2TP/PPTP/SSL VPN and the rule's
Terminator IP must be set to the external IP address of the firewall's listening interface.
The PPP Agent Options for the rule can be any combination of PAP, CHAP, MS-CHAP,
MS-ChAPv2 and no authentication. The SSL client will go through all the options until it
finds a method that works. By default, all options are enabled except for no
authentication.
This topic is discussed further in Section 8.2.5, Authentication Rules.
iii.
iv.
Client users need to be defined in the Authentication Source of the authentication rule.
564
Chapter 9: VPN
This source can be a local user database, a RADIUS server or an LDAP server.
v.
Define appropriate NetDefendOS IP rules to allow data flow within the SSL VPN tunnel.
As discussed below, IP rules do not normally need to be defined for the setup of the SSL
VPN tunnel itself, they are only needed for the traffic that flows inside the tunnel.
vi.
Specify the interfaces on which client IPs will be ARP published. This is necessary so a
server behind the firewall knows how to send replies back to an SSL VPN client.
Usually, the only time proxy ARP needs to be enabled is if the IPs assigned to clients are
part of an already existing subnet that clients need access to. In that case, proxy ARP
must be enabled on the interface that has the corresponding subnet. If the traffic is
routed by the firewall, for example with an Allow or NAT rule, proxy ARP is not needed.
The option exists with NetDefendOS SSL VPN to automatically ARP publish all client IPs
on all firewall interfaces but this is not recommended because of the security issues that
are raised.
vii. Routes for clients do not need to be defined in the routing tables as these are added
automatically by NetDefendOS when SSL VPN tunnels are established.
Name
A descriptive name for the object used for display in the NetDefendOS configuration.
Inner IP
This is the IP number within the tunnel that SSL VPN clients will connect to.
All clients that connect to the SSL VPN object interface are allocated an IP from the SSL VPN
interface's IP Pool. All the pool addresses as well as the Inner IP must belong to the same
network and these define the relationship between the firewall and the connecting clients.
565
Chapter 9: VPN
A private IP network should be used for this purpose. The Inner IP itself must not be one of
the IP Pool addresses that can be handed out to connecting SSL VPN clients.
Outer Interface
The interface on which to listen for SSL VPN connection attempts. This could be a physical
Ethernet interface but it could also be another logical interface. For example, a PPPoE or
VLAN interface could be used.
Server IP
The Ethernet interface IP address on which to listen for SSL VPN connection attempts by
clients. This will typically be a public IPv4 address which will be initially accessed using a web
browser across the public Internet. The following should be noted about this IP:
i.
The Server IP must be specified and will not default to the IP of the Outer Interface.
ii.
The Server IP cannot be an IP address which is ARP published on the interface. In order
for SSL to work on ARP published IPs, a core route with an accompanying proxy ARP
property must be used. This is done with the following steps:
Define a route with the Interface property set to core and the Network property set to
the Server IP value.
Set the route's Proxy ARP property to the interfaces which clients are connecting to.
Server Port
The TCP/IP port number at the Server IP used in listening for SSL VPN connection attempts by
clients. The default value is 443 which is the standard port number for SSL.
Client IP Options
IP Pool
As described above, client IP addresses for new SSL VPN connections are handed out from a
pool of private IPv4 addresses. This pool is specified by an IP address object defined in the
566
Chapter 9: VPN
NetDefendOS address book. It is not the same as an IP Pool object used with IPsec.
The pool addresses do not need to be a continuous range but must belong to the same
network. The Inner IP property must also belong to this network but must not be one of
the pool IPs.
Primary DNS
The primary DNS address handed out to a connecting client.
Secondary DNS
The secondary DNS address handed out to a connecting client.
Client Routes
By default, all client traffic is routed through the SSL tunnel when the client software is
activated. This behavior can be changed by specifying that only specific IPv4 addresses,
networks or address ranges will be accessible through the tunnel.
When this is done, only the specified routes through the tunnel are added to the client's
routing table and all other traffic is routed as normal. A maximum of five custom routes can
be specified for a tunnel.
Proxy ARP
So that SSL VPN clients can be found by a network connected to another Ethernet interface,
client IP addresses need to be explicitly ARP published on that interface.
This Add Route option allows the interfaces for ARP publishing to be chosen. In most
situations it will be necessary to choose at least one interface on which to publish the client
network.
A web browser must be opened and the protocol https:// needs to be entered into the
browser navigation field followed by the IP address or URL for the Ethernet interface on the
firewall that is configured for SSL VPN.
The IP address will be the same as the Server IP configured in the interface's SSL VPN object.
The port can also be specified after the IP address if it is different from the default value of
443.
With https, the firewall will send a certificate to the browser that is not CA signed and this
must be accepted as an exception by the user before continuing.
567
Chapter 9: VPN
2.
3.
The credentials entered are checked against the user database. If the user is authenticated, a
web page is displayed which offers two choices:
i.
ii.
To login by using a web browser to surf to the SSL VPN interface as described above. Once
the client software is installed, only the option to establish the tunnel is selected.
Once the client software is installed, it can be started by selecting it in the Windows Start
menu. The SSL VPN client user interface then opens, the user password is entered and when
OK is pressed the tunnel is established and any client computer application can then make
use of it.
568
Chapter 9: VPN
The difference between the two approaches above is that when the SSL VPN client software is
started by browsing to the SSL VPN interface, the correct settings for the tunnel are downloaded
to the SSL VPN client software and stored as the client's configuration file.
As long as these settings have not changed between tunnel sessions, it is possible to start the
SSL VPN client software running by selecting it in the Start menu and connecting to the same SSL
VPN interface. In particular, the SSL VPN client checks the certificate used by the SSL VPN
interface by comparing a certificate fingerprint stored in the configuration file with a fingerprint
sent by the interface.
The reason for checking the certificate in this way is that it solves the "man in the middle"
problem where a malicious third party might try to intercept communications between the
firewall and the client.
569
Chapter 9: VPN
A route is added to the Windows routing table. This route is equivalent to a NetDefendOS
default all-nets route.
The added default route directs all traffic from the Windows client through the SSL tunnel.
When the Windows SSL VPN client application ends, the SSL tunnel is closed and the default
route in the Windows routing table is removed, returning the routing table to its original
state.
An SSL connection is made to the configured Ethernet interface on a NetDefend Firewall and
the next available IP address is handed out to the client from the associated SSL VPN object's
IP pool.
In addition, a single route for the client is added to the NetDefendOS routing table. This route
maps the handed out client IP address to the associated SSL VPN interface.
Traffic can now flow between the client and the firewall, subject to NetDefendOS IP rules.
Client Cleanup
Should the SSL VPN client application terminate prematurely for some reason, the Windows
570
Chapter 9: VPN
routing table may not be left in a consistent state and the automatically added all-nets route may
not have been removed.
To remedy this problem, the D-Link SSL VPN client software should be started by selecting it in
the Windows Start menu and then stopped.
Note: If multiple Proxy ARP interfaces are needed, they are specified as a comma separated list.
For example: If3,If4,If5.
Web Interface
1.
Go to: Network > Interfaces and VPN > SSL > Add > SSL VPN Interface
2.
Now enter:
571
Chapter 9: VPN
IP Pool: sslvpn_pool
3.
4.
Select the If3 interface in the Available list and press the ">>" button to move it into the
Selected list
5.
Click OK
Web Interface
1.
Go to: Policies > User Authentication User Authentication Rules > Add > User
Authentication Rule
2.
Now enter:
Name: ssl_login
Interface: my_sslvpn_if
3.
4.
5.
Click OK
572
Chapter 9: VPN
address.
Web Interface
1.
2.
3.
Under Client Routes move the address object protected_server_net from Available to
Selected.
4.
Click OK
573
Chapter 9: VPN
CA Server Types
CA servers are of two types:
A private CA server operated by the same organization setting up the VPN tunnels. The IP
address of a private server will not be known to the public DNS system unless it is explicitly
registered. It also will not be known to an internal network unless it is registered on an
internal DNS server.
Access Considerations
The following considerations should be taken into account for CA server access to succeed:
For a certificate validation request to be issued, the FQDN of the certificate's CA server must
first be resolved into an IP address. The following scenarios are possible:
1.
The CA server is a private server behind the NetDefend Firewall and the tunnels are set
up over the public Internet but to clients that will not try to validate the certificate sent
by NetDefendOS.
In this case, the IP address of the private server needs only be registered on a private
DNS server so the FQDN can be resolved. This private DNS server will also have to be
configured in NetDefendOS so it can be found when NetDefendOS issues a validation
request. This will also be the procedure if the tunnels are being set up entirely internally
without using the public Internet.
2.
The CA server is a private server with tunnels set up over the public Internet and with
clients that will try to validate the certificate received from NetDefendOS. In this case the
following must be done:
a.
A private DNS server must be configured so that NetDefendOS can locate the
private CA server to validate the certificates coming from clients.
b.
574
Chapter 9: VPN
The CA server is a commercial server on the public Internet. In this, the simplest case,
public DNS servers will resolve the FQDN. The only requirement is that NetDefendOS will
need to have at least one public DNS server address configured to resolve the FQDNs in
the certificates it receives.
It must be also possible for an HTTP PUT request to pass from the validation request source
(either the NetDefend Firewall or a client) to the CA server and an HTTP reply to be received.
If the request is going to pass through the NetDefend Firewall, the appropriate rules in the
NetDefendOS IP rule set need to be defined to allow this traffic through.
IP rules are not required if it NetDefendOS itself that is issuing the request to the CA server.
Actions taken by NetDefendOS are trusted by default. This is a general rule that also applies
to DNS resolution requests issued by NetDefendOS.
Chapter 9: VPN
the way they work but the majority will attempt to validate the certificate.
576
Chapter 9: VPN
Check that all pre-shared keys and usernames/passwords are correctly entered.
Use ICMP Ping to confirm that the tunnel is working. With roaming clients this is best done by
Pinging the internal IP address of the local network interface on the NetDefend Firewall from
a client (in LAN to LAN setups pinging could be done in any direction). If NetDefendOS is to
respond to a Ping then the following rule must exist in the IP rule set:
Action
Src Interface
Src Network
Dest Interface
Dest Network
Service
Allow
vpn_tunnel
all-nets
core
all-nets
ICMP
Ensure that another IPsec Tunnel definition is not preventing the correct definition being
reached. The tunnel list is scanned from top to bottom by NetDefendOS and a tunnel in a
higher position with the Remote Network set to all-nets and the Remote Endpoint set to
none could prevent the correct tunnel being reached. A symptom of this is often an Incorrect
Pre-shared Key message.
Try and avoid duplication of IP addresses between the remote network being accessed by a
client and the internal network to which a roaming client belongs.
If a roaming client becomes temporarily part of a network such as a Wi-Fi network at an
airport, the client will get an IP address from the Wi-Fi network's DHCP server. If that IP also
belongs to the network behind the NetDefend Firewall accessible through a tunnel, then
Windows will still continue to assume that the IP address is to be found on the client's local
network. Windows therefore will not correctly route packets bound for the remote network
through the tunnel but instead route them to the local network.
The solution to this problem of local/remote IP address duplication is to create a new route in
the client's Windows routing table that explicitly routes the IP address to the tunnel.
If roaming client user authentication is not asking the users for their username/password
then ensure that the following advanced settings are enabled:
These settings should be enabled by default and they ensure that user authentication traffic
between NetDefendOS and the client can bypass the IP rule set. If the appropriate setting is
not enabled then an explicit rule needs to be added to the IP rule set to allow the
authentication traffic to pass between roaming clients and NetDefendOS. This rule will have a
destination interface of core (which means NetDefendOS itself ).
If the remote endpoint is specified as a URL, make sure that the URL string is preceded by the
prefix dns:. If, for example, the tunnel remote endpoint is to be specified as vpn.company.com,
this should be specified as dns:vpn.company.com.
577
Chapter 9: VPN
Check that the correct certificates have been used for the right purposes.
Check that the certificate .cer and .key files have the same filename. For example, my_cert.key
and my_cert.cer.
Check that the certificates have not expired. Certificates have a specific lifetime and when
this expires they cannot be used and new certificates must be issued.
Check that the NetDefendOS date and time is set correctly. If the system time and date is
wrong then certificates can appear as being expired when, in fact, they are not.
Consider time-zone issues with newly generated certificates. The NetDefend Firewall's time
zone may not be the same as the CA server's time zone and the certificate may not yet be
valid in the local zone.
Disable CRL (revocation list) checking to see if CA server access could be the problem. CA
Server issues are discussed further in Section 9.7, CA Server Access.
Local Net
-------------214.237.225.43
192.168.0.0/24
Remote Net
-----------84.13.193.179
172.16.1.0/24
Remote GW
------------84.13.193.179
82.242.91.203
578
Chapter 9: VPN
In these circumstances, using the option with a small number, for example -num=10, is
recommended.
Once issued, an ICMP ping can then be sent to the NetDefend Firewall from the remote end of
the tunnel. This will cause ikesnoop to output details of the tunnel setup negotiation to the
console and any algorithm proposal list incompatibilities can be seen.
If there are multiple tunnels in a setup or multiple clients on a single tunnel then the output from
verbose option can be overwhelming. It is therefore better to specify that the output comes from
a single tunnel by specifying the IP address of the tunnel's endpoint (this is either the IP of the
remote endpoint or a client's IP address). The command takes the form:
gw-world:/> ikesnoop -on <ip-address> -verbose
For a more detailed discussion of this topic, see Section 9.4.5, Troubleshooting with ikesnoop.
579
Chapter 9: VPN
580
Chapter 9: VPN
Name
Local Network
Remote Network
Remote Gateway
VPN-1
lannet
office1net
office1gw
VPN-2
lannet
office2net
office2gw
L2TP
ip_wan
all-nets
all-nets
VPN-3
lannet
office3net
office3gw
Since the tunnel L2TP in the above table is above the tunnel VPN-3, a match will trigger before
VPN-3 because of the all-nets remote gateway (all-nets will match any network). Since these two
tunnels use different pre-shared keys, NetDefendOS will generate an "Incorrect pre-shared key"
error message.
The problem is solved if we reorder the list and move VPN-3 above L2TP. The gateway office3gw
will be then matched correctly and VPN-3 will be the tunnel selected by NetDefendOS.
3. Ike_invalid_payload, Ike_invalid_cookie
In this case the IPsec engine in NetDefendOS receives an IPsec IKE packet but is unable to match
it against an existing IKE.
If a VPN tunnel is only established on one side, this can be the resulting error message when
traffic arrives from a tunnel that does not exist. An example would be if, for some reason, the
tunnel has only gone down from the initiator side but the terminator still sees it as up. It then
tries to send packets through the tunnel but when they arrive at the initiator it will drop them
since no matching tunnel can be found.
Simply remove the tunnel from the side that believes it is still up to solve the immediate
problem. An investigation as to why the tunnel only went down from one side is recommended.
It could be that DPD and/or Keep-Alive is only used on one side. Another possible cause could be
that even though it has received a DELETE packet, it has not deleted/removed the tunnel.
4. Payload_Malformed
This problem is very similar to the Incorrect pre-shared key problem described above. A possible
reason is that the PSK is of the wrong TYPE on either side (Passphrase or Hex key).
Verify that the same type is being used on both sides of the IPsec tunnel. If one side is using Hex
and the other Passphrase then this is most likely the error message that will be generated.
581
Chapter 9: VPN
A certificate's validity time has expired or it has not yet become valid. The latter can occur if
the clock is set incorrectly on either the CA server or the NetDefend Firewall or they are in
different time zones.
The NetDefend Firewall is unable to reach the Certificate Revocation List (CRL) on the CA
server in order to verify if the certificate is valid or not. Double-check that the CRL path is valid
in the certificate's properties. (Note that usage of the CRL feature can be turned off.)
Also make sure that there is a DNS client configured for NetDefendOS in order to be able to
correctly resolve the path to the CRL on the CA server.
If multiple similar or roaming tunnels exist and there is a need to separate them using ID lists,
a possible cause can be that none of the ID lists match the certificate properties of the
connecting user. Either the user is not authorized or the certificate properties are wrong on
the client or the ID list needs to be updated with this user/information.
With L2TP, the client certificate is imported into the wrong certificate store on the Windows
client. When the client connects, it is using the wrong certificate.
Side A
Local Network = 192.168.10.0/24
Remote Network = 10.10.10.0/24
Side B
Local Network = 10.10.10.0/24
Remote Network = 192.168.10.0/16
In this scenario, it can be seen that the defined remote network on Side B is larger than that
defined for Side A's local network. This means that Side A can only initiate the tunnel
successfully towards Site B as its network is smaller.
582
Chapter 9: VPN
When Side B tries to initiate the tunnel, Side A will reject it because the network is bigger than
what is defined. The reason it works the other way around is because a smaller network is
considered more secure and will be accepted. This principle also applies to the lifetimes in the
proposal lists.
2. Unable to set up with config mode and getting a spurious XAuth message
The reason for this message is basically "No proposal chosen". The case where this will appear is
when there is something that fails in terms of network size on either local network or remote
network. Since NetDefendOS has determined that it is a type of network size problem, it will try
one last attempt to get the correct network by sending a config mode request.
By using ikesnoop when both sides initiate the tunnel, it should be simple to compare the
network that both sides are sending in phase-2. With that information it should be possible to
spot the network problem. It can be the case that it is a network size mismatch or that it does not
match at all.
583
Chapter 9: VPN
584
NetDefendOS forwards the 6 bits which make up the Diffserv Differentiated Services Code
Point (DSCP) as well as copying these bits from the data traffic inside VPN tunnels to the
encapsulating packets.
As described later in this chapter, DSCP bits can be used by the NetDefendOS traffic shaping
subsystem as a basis for prioritizing traffic passing through the NetDefend Firewall.
It is important to understand that NetDefendOS traffic shaping does not add new Diffserv
information as packets traverse a NetDefend Firewall. The NetDefendOS traffic shaping priorities
described later in this chapter are for traffic shaping within NetDefendOS only and are not
translated into Diffserv information that is then added to packets.
585
Applying bandwidth limits and queuing packets that exceed configured limits, then sending
them later when bandwidth demands are lower.
Dropping packets if packet buffers are full. The packets to be dropped should be chosen from
those that are responsible for the congestion.
Prioritizing traffic according to administrator decisions. If traffic with a high priority increases
while a communication line is full, traffic with a low priority can be temporarily limited to
make room for the higher priority traffic.
Traffic shaping does not typically work by queuing up immense amounts of data and then
sorting out the prioritized traffic to send before sending non-prioritized traffic. Instead, the
amount of prioritized traffic is measured and the non-prioritized traffic is limited dynamically so
that it will not interfere with the throughput of prioritized traffic.
Note: Traffic shaping will not work with the SIP ALG
Any traffic connections that trigger an IP rule with a service object that uses the SIP ALG
cannot be also subject to traffic shaping.
Pipes
Pipe Rules
586
Pipes
A Pipe is the fundamental object for traffic shaping and is a conceptual channel through which
data traffic can flow. It has various characteristics that define how traffic passing through it is
handled. As many pipes as are required can be defined by the administrator. None are defined by
default.
Pipes are simplistic in that they do not care about the types of traffic that pass through them nor
the direction of that traffic. They simply measure the aggregate data that passes through them
and then apply the administrator configured limits for the pipe as a whole or for Precedences
and/or Groups (these concepts are explained later in Section 10.1.6, Precedences).
NetDefendOS is capable of handling hundreds of pipes simultaneously, but in reality most
scenarios require only a handful of pipes. It is possible that dozens of pipes might be needed in
scenarios where individual pipes are used for individual protocols. Large numbers of pipes might
also be needed in an ISP scenario where individual pipes are allocated to each client.
Pipe Rules
One or more Pipe Rules make up the NetDefendOS Pipe Rule set which determine what traffic will
flow through which pipes.
Each pipe rule is defined like other NetDefendOS security policies: by specifying the
source/destination interface/network as well as the service to which the rule is to apply. Once a
new connection is permitted by the IP rule set, the pipe rule set is then checked for any matching
pipe rules.
Pipe rules are checked in the same way as IP rules, by going from top to bottom (first to last) in
the rule set. The first matching rule, if any, decides if the connection is subject to traffic shaping.
Keep in mind that any connection that does not trigger a pipe rule will not be subject to traffic
shaping and could potentially use as much bandwidth as it wants.
587
The pipes that are to be used are specified in a pipe list. If only one pipe is specified then that is
the pipe whose characteristics will be applied to the traffic. If a series of pipes are specified then
these will form a Chain of pipes through which traffic will pass. A chain can be made up of a
maximum of 8 pipes.
588
Web Interface
1.
Go to: Policies > Traffic Management > Pipes > Add > Pipe
2.
3.
4.
Click OK
589
Traffic needs to be passed through the pipe and this is done by using the pipe in a Pipe Rule.
We will use the above pipe to limit inbound traffic. This limit will apply to the actual data packets,
and not the connections. In traffic shaping we're interested in the direction that data is being
shuffled, not which computer initiated the connection.
Create a simple rule that allows everything from the inside, going out. We add the pipe that we
created to the return chain. This means that the packets travelling in the return direction of this
connection (outside-in) should pass through the std-in pipe.
Command-Line Interface
gw-world:/> add PipeRule ReturnChain=std-in
SourceInterface=lan
SourceNetwork=lannet
DestinationInterface=wan
DestinationNetwork=all-nets
Service=all_services
Name=Outbound
Web Interface
1.
Go to: Traffic Management > Traffic Shaping > Add > Pipe Rule
2.
3.
Now enter:
Service: all_services
4.
Under the Traffic Shaping tab, make std-in selected in the Return Chain control
5.
Click OK
This setup limits all traffic from the outside (the Internet) to 2 megabits per second. No priorities
are applied, and neither is any dynamic balancing.
590
Just inserting std-in in the forward chain will not work since we probably want the 2 Mbps limit
for outbound traffic to be separate from the 2 Mbps limit for inbound traffic. If 2 Mbps of
outbound traffic attempts to flow through the pipe in addition to 2 Mbps of inbound traffic, the
total attempting to flow is 4 Mbps. Since the pipe limit is 2 Mbps, the actual flow will be close to 1
Mbps in each direction.
Raising the total pipe limit to 4 Mbps will not solve the problem since the single pipe will not
know that 2 Mbps of inbound and 2 Mbps of outbound are the intended limits. The result might
be 3 Mbps outbound and 1 Mbps inbound since this also adds up to 4 Mbps.
Web Interface
1.
Go to: Policies > Traffic Management > Pipes > Add > Pipe
2.
3.
4.
Click OK
After creating a pipe for outbound bandwidth control, add it to the forward pipe chain of the
rule created in the previous example:
Command-Line Interface
gw-world:/> set PipeRule Outbound ForwardChain=std-out
Web Interface
1.
2.
Right-click on the pipe rule that was created in the previous example and choose Edit
3.
Under the Traffic Shaping tab, select std-out in the Forward Chain list
4.
Click OK
This results in all outbound connections being limited to 2 Mbps in each direction.
591
If surfing uses the full limit of 125 Kbps, those 125 Kbps will occupy half of the std-in pipe leaving
125 Kbps for the rest of the traffic. If no surfing is taking place then all of the 250 Kbps allowed
through std-in will be available for other traffic.
This does not provide a bandwidth guarantee for web browsing but instead limits it to 125 Kbps
592
and provides a 125 Kbps guarantee for everything else. For web browsing the normal rules of
first-come, first-forwarded will apply when competing for the 125 Kbps bandwidth. This may
mean 125 Kbps, but it may also mean much slower speed if the connection is flooded.
Setting up pipes in this way only puts limits on the maximum values for certain traffic types. It
does not give priorities to different types of competing traffic.
10.1.6. Precedences
The Default Precedence is Zero
All packets that pass through NetDefendOS traffic shaping pipes have a Precedence. In the
examples so far, precedences have not been explicitly set and so all packets have had the same
default precedence which is 0.
593
Minimum Precedence: 0
Default Precedence: 0
Maximum Precedence: 7
As described above, the Default Precedence is the precedence taken by a packet if it is not
explicitly assigned by a pipe rule.
The minimum and maximum precedences define the precedence range that the pipe will
handle. If a packet arrives with an already allocated precedence below the minimum then its
precedence is changed to the minimum. Similarly, if a packet arrives with an already allocated
precedence above the maximum, its precedence is changed to the maximum.
For each pipe, separate bandwidth limits may be optionally specified for each precedence level.
These limits can be specified in kilobits per second and/or packets per second (if both are
specified then the first limit reached will be the limit used).
In the illustration below the minimum precedence is 2 and the maximum precedence is 6.
Precedence 2 is taken as the best effort precedence.
Applying Precedences
Continuing to use the previous traffic shaping example, let us add the requirement that SSH and
Telnet traffic is to have a higher priority than all other traffic. To do this we add a Pipe Rule
specifically for SSH and Telnet and set the priority in the rule to be a higher priority, say 2. We
specify the same pipes in this new rule as are used for other traffic.
The effect of doing this is that the SSH and Telnet rule sets the higher priority on packets related
to these services and these packets are sent through the same pipe as other traffic. The pipe then
makes sure that these higher priority packets are sent first when the total bandwidth limit
595
specified in the pipe's configuration is exceeded. Lower priority packets will be buffered and sent
when higher priority traffic uses less than the maximum specified for the pipe. The buffering
process is sometimes referred to as "throttling back" since it reduces the flow rate.
Differentiated Guarantees
A problem arises if the aim is to give a specific 32 Kbps guarantee to Telnet traffic, and a specific
64 Kbps guarantee to SSH traffic. A 32 Kbps limit could be set for precedence 2, a 64 Kbps limit
set for precedence 4 and then pass the different types of traffic through each precedence.
However, there are two obvious problems with this approach:
Which traffic is more important? This question does not pose much of a problem here, but it
becomes more pronounced as the traffic shaping scenario becomes more complex.
The number of precedences is limited. This may not be sufficient in all cases, even without
the "which traffic is more important?" problem.
The solution is to create two new pipes: one for telnet traffic, and one for SSH traffic, much like
the "surf" pipe that was created earlier.
First, remove the 96 Kbps limit from the std-in pipe, then create two new pipes: ssh-in and
telnet-in. Set the default precedence for both pipes to 2, and the precedence 2 limits to 32 and
64 Kbps, respectively.
Then, split the previously defined rule covering ports 22 through 23 into two rules, covering 22
596
Source IP
Destination IP
Source Network
Destination Network
Source Interface
Destination Interface
This feature is enabled by enabling the Grouping option in a pipe. The individual users of a group
can then have a limit and/or guarantee specified for them in the pipe. For example, if grouping is
done by source IP then each user corresponds to each unique source IP address.
597
The users in a group are first separated by pipe rules into precedences.
The users are then subject to the guarantees specified for their precedence.
The illustration below shows this flow where the grouping has been selected to be according to
source IP.
598
Set the Grouping option for the pipe to have the value Destination IP.
Set the total for the pipe's Group Limits to be 100 Kbps.
Bandwidth is now allocated on a "first come, first forwarded" basis but no single destination IP
address can ever take more than 100Kbps. No matter how many connections are involved the
combined total bandwidth can still not exceed the pipe limit of 400 Kbps.
Dynamic Balancing
Instead of specifying a total for Group Limits, the alternative is to enable the Dynamic Balancing
option. This ensures that the available bandwidth is divided equally between all addresses
599
regardless of how many there are. This is done up to the limit of the pipe.
If a total group limit of 100 Kbps is also specified with dynamic balancing, then this still means
that no single user may take more than that amount of bandwidth.
600
Attacks on Bandwidth
Traffic shaping cannot protect against incoming resource exhaustion attacks, such as DoS attacks
or other flooding attacks. NetDefendOS will prevent these extraneous packets from reaching the
hosts behind the NetDefend Firewall, but cannot protect the connection becoming overloaded if
an attack floods it.
Troubleshooting
For a better understanding of what is happening in a live setup, the console command:
601
A pipe can have a limit which is the maximum amount of traffic allowed.
A pipe can only know when it is full if a total limit for the pipe is specified.
A single pipe should handle traffic in only one direction (although 2 way pipes are allowed).
Pipes can be chained so that one pipe's traffic feeds into another pipe.
Priorities can be given a maximum limit which is also a guarantee. Traffic that exceeds this
will be sent at the minimum precedence which is also called the Best Effort precedence.
At the best effort precedence all packets are treated on a "first come, first forwarded" basis.
Within a pipe, traffic can also be separated on a Group basis. For example, by source IP
address. Each user in a group (for example, each source IP address) can be given a maximum
limit and precedences within a group can be given a limit/guarantee.
A pipe limit need not be specified if group members have a maximum limit.
Dynamic Balancing can be used to specify that all users in a group get a fair and equal
amount of bandwidth.
A Basic Scenario
The first scenario will examine the configuration shown in the image below, in which incoming
and outgoing traffic is to be limited to 1 megabit per second.
602
The reason for using 2 different pipes in this case, is that these are easier to match to the physical
link capacity. This is especially true with asynchronous links such as ADSL.
First, two pipes called in-pipe and out-pipe need to be created with the following parameters:
Pipe Name
Min Prec
Def Prec
Max Prec
Grouping
Net size
Pipe limit
in-pipe
PerDestIP
24
1000kb
out-pipe
PerSrcIP
24
1000kb
Dynamic Balancing should be enabled for both pipes. Instead of PerDestIP and PerSrcIP we
could have used PerDestNet and PerSrcNet if there were several networks on the inside.
The next step is to create the following Pipe Rule which will force traffic to flow through the
pipes.
Rule
Name
Forward
Pipes
Return
Pipes
Source
Interface
Source
Network
Destination
Interface
Destination
Network
Selected
Service
all_1mbps
out-pipe
in-pipe
lan
lannet
wan
all-nets
all_services
The rule will force all traffic to the default precedence level and the pipes will limit total traffic to
their 1 Mbps limit. Having Dynamic Balancing enabled on the pipes means that all users will be
allocated a fair share of this capacity.
603
To implement this scheme, we can use the in-pipe and out-pipe. We first enter the Pipe Limits for
each pipe. These limits correspond to the list above and are:
Priority 6 - 500
Priority 4 - 250
Priority 2 - 1000
Forward
Pipes
Return
Pipes
Source
Interface
Source
Network
Dest
Interface
Dest
Network
Selected
Service
Prece
dence
web_surf
out-pipe
in-pipe
lan
lannet
wan
all-nets
http-all
voip
out-pipe
in-pipe
lan
lannet
wan
all-nets
H323
citrix
out-pipe
in-pipe
lan
lannet
wan
all-nets
citrix
other
out-pipe
in-pipe
lan
lannet
wan
all-nets
all_services
These rules are processed from top to bottom and force different kinds of traffic into
precedences based on the Service. Customized service objects may need to be first created in
order to identify particular types of traffic. The all service at the end, catches anything that falls
through from earlier rules since it is important that no traffic bypasses the pipe rule set otherwise
using pipes will not work.
Pipe Chaining
Suppose the requirement now is to limit the precedence 2 capacity (other traffic) to 1000 Kbps so
that it does not spill over into precedence 0. This is done with pipe chaining where we create new
pipes called in-other and out-other both with a Pipe Limit of 1000. The other pipe rule is then
modified to use these:
Rule
Name
Forward
Pipes
Return
Pipes
Source
Interface
Source
Network
Dest
Interface
Dest
Network
Selected
Service
Prece
dence
other
out-other
out-pipe
in-other
in-pipe
lan
lannet
wan
all-nets
all_services 2
Note that in-other and out-other are first in the pipe chain in both directions. This is because we
want to limit the traffic immediately, before it enters the in-pipe and out-pipe and competes with
VoIP, Citrix and Web-surfing traffic.
A VPN Scenario
In the cases discussed so far, all traffic shaping is occurring inside a single NetDefend Firewall.
VPN is typically used for communication between a headquarters and branch offices in which
case pipes can control traffic flow in both directions. With VPN it is the tunnel which is the source
and destination interface for the pipe rules.
604
An important consideration which has been discussed previously, is allowance in the Pipe Total
values for the overhead used by VPN protocols. As a rule of thumb, a pipe total of 1700 bps is
reasonable for a VPN tunnel where the underlying physical connection capacity is 2 Mbps.
It is also important to remember to insert into the pipe all non-VPN traffic using the same
physical link.
The pipe chaining can be used as a solution to the problem of VPN overhead. A limit which allows
for this overhead is placed on the VPN tunnel traffic and non-VPN traffic is inserted into a pipe
that matches the speed of the physical link.
To do this we first create separate pipes for the outgoing traffic and the incoming traffic. VoIP
traffic will be sent over a VPN tunnel that will have a high priority. All other traffic will be sent at
the best effort priority (see above for an explanation of this term). Again, we will assume a 2/2
Mbps symmetric link.
The pipes required will be:
vpn-in
Total: 1700
vpn-out
Total: 1700
in-pipe
Total: 2000
out-pipe
Total: 2000
The following pipe rules are then needed to force traffic into the correct pipes and precedence
levels:
Rule
Name
Forward Return
Pipes
Pipes
Src
Int
Source
Network
Dest Destination
Int
Network
Selected
Service
Prece
dence
vpn_voip_out
vpn-out
out-pipe
vpn-in
in-pipe
lan
lannet
vpn
vpn_remote_net
H323
vpn_out
vpn-out
out-pipe
vpn-in
in-pipe
lan
lannet
vpn
vpn_remote_net
all_services 0
vpn_voip_in
vpn-in
in-pipe
vpn-out
out-pipe
vpn
vpn_remote_net
lan
lannet
H323
vpn_in
vpn-in
in-pipe
vpn-out
out-pipe
vpn
vpn_remote_net
lan
lannet
all_services 0
out
out-pipe
in-pipe
lan
lannet
wan all-nets
605
all_services 0
Rule
Name
Forward Return
Pipes
Pipes
Src
Int
in
in-pipe
wan all-nets
out-pipe
Source
Network
Dest Destination
Int
Network
Selected
Service
lan
all_services 0
lannet
Prece
dence
With this setup, all VPN traffic is limited to 1700 Kbps, the total traffic is limited to 2000 Kbps and
VoIP to the remote site is guaranteed 500 Kbps of capacity before it is forced to best effort.
Forward
Pipes
Return
Pipes
Source
Interface
Source
Network
Dest
Interface
Dest
Network
Selected
Service
Prece
dence
all-in
in-pipe
out-pipe
wan
all-nets
core
all-nets
all_services 0
606
2.
3.
4.
607
This will be the period of time after rule triggering during which traffic shaping is applied to
any associated connections that are opened.
Typically, a P2P transfer starts with an initial connection to allow transfer of control
information followed by a number of data transfer connections to other hosts.
It is the initial connection that IDP detects and the Time Window specifies the expected
period afterwards when other connections will be opened and subject to traffic shaping.
Connections opened after the Time Window has expired will no longer be subject to traffic
shaping.
A Time Window value of 0 means that only traffic flowing over the initial triggering
connection will be subject to traffic shaping. Any associated connections that do not trigger
an IDP rule will not be subject to traffic shaping.
5.
A new connection is opened by one host to another through the NetDefend Firewall and
traffic begins to flow. The source and destination IP address of the connection is noted by
NetDefendOS.
2.
The traffic flowing on the connection triggers an IDP rule. The IDP rule has Pipe as action so
the traffic on the connection is now subject to the pipe traffic shaping bandwidth specified
in the IDP rule.
3.
A new connection is then established that does not trigger an IDP rule but has a source or
destination IP that is the same as the connection that did trigger a rule. If the source or
destination is also a member of the IP range specified as the Network, then the connection's
traffic is included in the pipe performing traffic shaping for the original triggering
connection.
If no Network is specified then this new connection is also included in the triggering
connection's pipe traffic if source or destination match.
608
Unintended Consequences
To explain this unintended traffic shaping, consider a client A that connects to host X with P2P
traffic and triggers an IDP rule with the Pipe action so the connection becomes subject to traffic
shaping. Now, if another client B also connects to host X but this time with web surfing traffic, an
IDP rule is not triggered but the connection should not be traffic shaped along with client A's
connection just because host X is involved.
Excluding Hosts
To avoid these unintended consequences, we specify the IPv4 addresses of client A and client B
in the Network range but not host X. This tells NetDefendOS that host X is not relevant in making
a decision about including new non-IDP-triggering connections in traffic shaping.
It may seem counter-intuitive that client B is also included in the Network range but this is done
on the assumption that client B is a user whose traffic might also have to be traffic shaped if they
become involved in a P2P transfer.
If Network is not specified then any connection involving either client A or host X will be subject
to traffic shaping and this is probably not desirable.
The client with IP address 192.168.1.15 initiates a P2P file transfer through a connection (1) to
the tracking server at 81.150.0.10.
This connection triggers an IDP rule in NetDefendOS which is set up with an IDP signature
that targets the P2P application.
The Pipe action in the rule sets up a traffic shaping pipe with a specified capacity and the
connection is added to it.
A subsequent connection (2) to the file host at 92.92.92.92 occurs within the IDP rule's Time
Window and its traffic is therefore added to the pipe and is subject to shaping.
The client network to which 192.168.1.15 belongs, should ideally be included in the Network
address range for the IDP rule.
609
A host, in this case with IP address 192.168.1.1, can be removed from traffic shaping using the
command:
gw-world:/> idppipes -unpipe -host=192.168.1.1
A full description of the idppipes command can be found in the separate CLI Reference Guide.
Viewing Pipes
IDP Traffic Shaping makes use of normal NetDefendOS pipe objects which are created
automatically. These pipes are always allocated the highest priority and use the Group feature to
throttle traffic.
The created pipes are, however, hidden from the administrator when examining the currently
defined traffic shaping objects with the Web Interface, but they can be examined and
manipulated using the normal CLI pipes command. For example, to show all currently defined
610
The IDP Traffic Shaping pipes can be recognized by their distinctive naming convention which is
explained next.
Pipe Naming
NetDefendOS names the pipes it automatically creates in IDP Traffic Shaping using the pattern
IDPPipe_<bandwidth> for pipes with upstream (forward) flowing traffic and
IDPPipe_<bandwidth>R for pipes with downstream (return) flowing traffic. A number suffix is
appended if name duplication occurs.
For example, the first pipes created with a limit of 1000 Kbps will be called IDPPipe_1000 for
upstream traffic and IDPPipe_1000R for downstream traffic. Duplicates with the same limit would
get the names IDPPipe_1000_(2) and IDPPipe_1000R_(2). If another set of duplicates occur, the
suffix (3) is used.
10.2.8. Logging
IDP Traffic Shaping generates log messages on the following events:
When an IDP rule with the Pipe option has triggered and either host or client is present in the
Network range.
When the subsystem adds a host that will have future connections blocked.
When a timer for piping news connections expires, a log message is generated indicating
that new connections to or from the host are no longer piped.
There are also some other log messages which indicate less common conditions. All log
messages are documented in the Log Reference Guide.
611
Threshold Policies
A Threshold Rule is like other policy based rules found in NetDefendOS, a combination of
source/destination network/interface can be specified for a rule and a type of service such as
HTTP can be associated with it. Each rule can have one or more Actions associated with it and
these specify how to handle different threshold conditions.
A Threshold Rule has the following parameters associated with it:
Action
This is the response of the rule when the limit is exceeded. Either the option Audit or Protect
can be selected. These options are explained in more detail below.
Group By
The rule can be either Host or Network based. These options are explained below.
Threshold
This is the numerical limit which must be exceeded for the action to be triggered.
Threshold Type
The rule can be specified to either limit the number of connections per second or limit the
total number of concurrent connections.
Host Based
The threshold is applied separately to connections from different IP addresses.
Network Based
The threshold is applied to all connections matching the rules as a group.
Rule Actions
When a Threshold Rule is triggered one of two responses are possible:
Audit
Leave the connection intact but log the event.
Protect
Drop the triggering connection.
Logging would be the preferred option if the appropriate triggering value cannot be determined
beforehand. Multiple actions for a given rule might consist of Audit for a given threshold while
the action might become Protect for a higher threshold.
Exempted Connections
It should be noted that some advanced settings, known as Before Rules settings, can exempt
certain types of connections for remote management from examination by the NetDefendOS IP
rule set if they are enabled. These Before Rules settings will also exempt the connections from
Threshold Rules if they are enabled.
If the Protect option is used, Threshold Rules can be configured so that the source that triggered
the rule, is added automatically to a Blacklist of IP addresses or networks. If several Protect actions
with blacklisting enabled are triggered at the same time, only the first triggered blacklisting
action will be executed by NetDefendOS.
A host based action with blacklisting enabled will blacklist a single host when triggered. A
network based action with blacklisting enabled will blacklist the source network associated with
the rule. If the Threshold Rule is linked to a service then it is possible to block only that service.
When blacklisting is selected, the administrator can choose to leave pre-existing connections
from the triggering source unaffected, or can alternatively choose to have the connections
dropped by NetDefendOS.
The length of time, in seconds, for which the source is blacklisted can also be set.
This feature is discussed further in Section 6.7, Blacklisting Hosts and Networks.
614
Performance
Scalability
Reliability
Ease of administration
The principle SLB benefit of sharing the load across multiple servers can improve not just the
performance of applications but also scalability by facilitating the implementation of a cluster of
servers (sometimes referred to as a server farm) that can handle many more requests than a
single server.
The illustration below shows a typical SLB scenario, with Internet access to internal server
applications by external clients being managed by a NetDefend Firewall.
615
SLB increases the reliability of network applications by actively monitoring the servers
sharing the load. NetDefendOS SLB can detect when a server fails or becomes congested and
will not direct any further requests to that server until it recovers or has less load.
The combination of network monitoring and distributed load sharing also provides an extra
level of protection against Denial Of Service (DoS) attacks.
616
Connection-rate
This algorithm considers the number of requests that each server has
been receiving over a certain time period. This time period is known as
the Window Time. SLB sends the next request to the server that has
received the least number of connections during the last Window Time
number of seconds.
The Window Time is a setting that the administrator can change. The
default value is 10 seconds.
617
IP Address Stickiness
Network Stickiness
Stickiness Parameters
If either IP stickiness or network stickiness is enabled then the following stickiness parameters
can be adjusted:
Idle Timeout
When a connection is made, the source IP address for the connection is remembered in a
table. Each table entry is referred to as a slot. After it is create, the entry is only considered
valid for the number of seconds specified by the Idle Timeout. When new connection is made,
the table is searched for the same source IP, providing that the table entry has not exceeded
its timeout. When a match is found, then stickiness ensures that the new connection goes to
the same server as previous connections from the same source IP.
The default value for this setting is 10 seconds.
Max Slots
This parameter specifies how many slots exist in the stickiness table. When the table fills up
then the oldest entry is discarded to make way for a new entry even though it may be still
valid (the Idle Timeout has not been exceeded).
The consequence of a full table can be that stickiness will be lost for any discarded source IP
addresses. The administrator should therefore try to ensure that the Max Slots parameter is
set to a value that can accommodate the expected number of connections that require
stickiness.
The default value for this setting is 2048 slots in the table.
Net Size
The processing and memory resources required to match individual IP addresses when
implementing stickiness can be significant. By selecting the Network Stickiness option these
resource demands can be reduced.
When the Network Stickiness option is selected, the Net Size parameter specifies the size of the
network which should be associated with the source IP of new connections. A stickiness table
lookup does not then compare individual IP addresses but instead compares if the source IP
address belongs to the same network as a previous connection already in the table. If they
belong to the same network then stickiness to the same server will result.
The default value for this setting is a network size of 24.
618
When the round-robin algorithm is used, the first arriving requests R1 and R2 from Client 1 are
both assigned to one sever, say Server 1, according to stickiness. The next request R3 from Client 2
is then routed to Server 2. When R4 from Client 3 arrives, Server 1 gets back its turn again and will
be assigned with R4.
If the connection-rate algorithm is applied instead, R1 and R2 will be sent to the same server
because of stickiness, but the subsequent requests R3 and R4 will be routed to another server
since the number of new connections on each server within the Window Time span is counted in
for the distribution.
619
Regardless which algorithm is chosen, if a server goes down, traffic will be sent to other servers.
And when the server comes back online, it can automatically be placed back into the server farm
and start getting requests again.
This works at OSI layer 3. SLB will ping the IP address of each individual
server in the server farm. This will detect any failed servers.
TCP Connection
Define an IP address object for each server for which SLB is to be enabled.
2.
Define an IP address group object which includes all these individual objects.
3.
Define an SLB_SAT rule in the IP rule set which refers to this IP address group and where all
other SLB parameters are defined.
4.
Allow
NAT
620
The table below shows the rules that would be defined for a typical scenario of a set of web
servers behind the NetDefend Firewall for which the load is being balanced. Access across the
internet is via the wan interface which has the IP address wan_ip. The rules allow external clients
to access the web servers. The service is not listed.
Rule Name
Action
Src Interface
Src Network
Service
web_slb
SLB_SAT
any
all-nets
core
wan_ip
http-all
wan
all-nets
core
wan_ip
http-all
web_slb_allow Allow
The SLB_SAT rule has any as the source interface in case any internal clients want to access the
server (an interface group could be used to precisely specify the allowed source interfaces). If the
accessing clients are on the same network as the web servers then an NAT rule for those clients
would also be needed as shown below:
Rule Name
Action
Src Interface
Src Network
Service
web_slb
SLB_SAT
any
all-nets
core
wan_ip
http-all
web_slb_nat
NAT
lan
lan_net
core
wan_ip
http-all
wan
all-nets
core
wan_ip
http-all
web_slb_allow Allow
It is assumed here that internal clients also open connections to wan_ip in order to access the
web servers and so their connections are automatically routed to core.
In the IP rules, the destination interface is always specified as core, meaning NetDefendOS itself
deals with the connection. The key advantage of having a separate Allow rule is that the web
servers can log the exact IP address that is generating external requests. Using only a NAT rule,
which is possible, means that web servers would see only the IP address of the NetDefend
Firewall.
Example 10.3. Setting up SLB
In this example server load balancing is to be done between two HTTP web servers which are
situated behind the NetDefend Firewall. The web servers have the private IPv4 addresses
192.168.1.10 and 192.168.1.11. Access by external client is via the wan interface which has the
IPv4 address wan_ip.
The default SLB values for monitoring, distribution method and stickiness are used. A NAT rule is
used in conjunction with the SLB_SAT rule so that clients behind the firewall can access the web
servers.
An Allow rule is used to allow access by external clients.
Command-Line Interface
A. Create an address object for each of the web servers:
gw-world:/> add Address IP4Address server1 Address=192.168.1.10
621
Web Interface
A. Create an Object for each of the web servers:
1.
Go to: Objects > Address Book > Add > IP4 Address
2.
3.
4.
Click OK
5.
Repeat the above to create an object called server2 for the 192.168.1.11 IP address
Go to: Objects > Address Book > Add > IP4 Group
2.
622
3.
4.
Click OK
Go to: Policies > Firewalling > Main IP Rules > Add > IP Rule
2.
Enter:
Name: web_slb
Action: SLB_SAT
Service: HTTP
3.
4.
5.
Click OK
Go to: Policies > Firewalling > Main IP Rules > Add > IP Rule
2.
Enter:
3.
Name: web_slb_nat
Action: NAT
Service: http-all
Click OK
Go to: Policies > Firewalling > Main IP Rules > Add > IP Rule
2.
Enter:
Name: web_slb_allow
623
3.
Action: Allow
Service: http-all
Click OK
624
625
11.1. Overview
HA Clusters
NetDefendOS High Availability (HA) provides a fault tolerant capability to NetDefend Firewall
installations. HA works by adding a back-up slave NetDefend Firewall to an existing master
firewall. The master and slave are connected together and make up a logical HA Cluster. One of
the units in a cluster will be active when the other unit is inactive and on standby.
Initially, the cluster slave will be inactive and will only monitor the activity of the master. If the
slave detects that the master has become inoperative, an HA failover takes place and the slave
becomes active, assuming processing responsibility for all traffic. If the master later becomes
operative again, the slave will continue to be active but the master will now monitor the slave
with failover only taking place if the slave fails. This is sometimes known as an active-passive
implementation of fault tolerance.
626
Cluster Management
When managing the individual hardware units in a cluster, they must be administered separately
using the Web Interface or the CLI. Configuration changes are not automatically duplicated
between the cluster peers.
Load-sharing
D-Link HA clusters do not provide load-sharing since only one unit will be active while the other
is inactive and only two NetDefend Firewalls, the master and the slave, can exist in a single
cluster. The only processing role that the inactive unit plays is to replicate the state of the active
unit and to take over all traffic processing if it detects the active unit is not responding.
Hardware Duplication
D-Link HA will only operate between two NetDefend Firewalls. As the internal operation of
different firewall manufacturer's software is completely dissimilar, there is no common method
available to communicating state information to a dissimilar device.
It is also strongly recommended that the NetDefend Firewalls used in cluster have identical
configurations. They must also have identical licenses which allow identical capabilities including
the ability to run in an HA cluster.
Extending Redundancy
Implementing an HA Cluster will eliminate one of the points of failure in a network. Routers,
switches and Internet connections can remain as potential points of failure and redundancy for
these should also be considered.
627
628
11.2. HA Mechanisms
This section discusses in more depth the mechanisms NetDefendOS uses to implement the high
availability feature.
Basic Principles
D-Link HA provides a redundant, state-synchronized hardware configuration. The state of the
active unit, such as the connection table and other vital information, is continuously copied to
the inactive unit via the sync interface. When cluster failover occurs, the inactive unit knows
which connections are active, and traffic can continue to flow after the failover with negligible
disruption.
The inactive system detects that the active system is no longer operational when it no longer
detects sufficient Cluster Heartbeats. Heartbeats are sent over the sync interface as well as all
other interfaces.
Heartbeat Frequency
NetDefendOS sends 5 heartbeats per second from the active system and when three heartbeats
are missed (that is to say, after 0.6 seconds) a failover will be initiated. By sending heartbeats over
all interfaces, the inactive unit gets an overall view of the active unit's health. Even if sync is
deliberately disconnected, failover may not result if the inactive unit receives enough heartbeats
from other interfaces via a shared switch, however the sync interface sends twice as many
heartbeats as any of the normal interfaces.
Heartbeats are not sent at smaller intervals because such delays may occur during normal
operation. An operation, for example opening a file, could result in delays long enough to cause
the inactive system to go active, even though the other is still active.
Heartbeat Characteristics
Cluster heartbeats have the following characteristics:
The IP TTL is always 255. If NetDefendOS receives a cluster heartbeat with any other TTL, it is
assumed that the packet has traversed a router and therefore cannot be trusted.
629
The destination MAC address is the Ethernet multicast address corresponding to the shared
hardware address and this has the form:
11-00-00-00-nn-mm
Where nn is a bit mask made up of the interface bus, slot and port on the master and mm
represents the cluster ID,
Link layer multicasts are used over normal unicast packets for security. Using unicast packets
would mean that a local attacker could fool switches to route heartbeats somewhere else so
the inactive system never receives them.
Failover Time
The time for failover is typically about one second which means that clients may experience a
failover as a slight burst of packet loss. In the case of TCP, the failover time is well within the
range of normal retransmit timeouts so TCP will retransmit the lost packets within a very short
space of time, and continue communication. UDP does not allow retransmission since it is
inherently an unreliable protocol.
Promiscuous Mode
The Ethernet interfaces in an HA cluster must operate in promiscuous mode for HA to function.
This mode means that traffic with a destination MAC address that does not match the Ethernet
interface's MAC address will be sent to NetDefendOS and not discarded by the interface.
Promiscuous mode is enabled automatically by NetDefendOS and the administrator does not
need to worry about doing this.
If the administrator enters a CLI command ifstat <ifname>, the Receive Mode status line will show
the value Promiscuous next to it instead of Normal to indicate the mode has changed. This is
discussed further in Section 3.4.2, Ethernet Interfaces.
630
If a NetDefendOS cluster has the Anti-Virus or IDP subsystems enabled then updates to the
Anti-Virus signature database or IDP pattern database will routinely occur. These updates involve
downloads from the external D-Link databases and they require NetDefendOS reconfiguration to
occur for the new database contents to become active.
A database update causes the following sequence of events to occur in an HA cluster:
1.
The active (master) unit downloads the new database files from the D-Link servers. The
download is done via the shared IP address of the cluster.
2.
The active (master) node sends the new database files to the inactive peer.
3.
The inactive (slave) unit reconfigures to activate the new database files.
4.
The active (master) unit now reconfigures to activate the new database files causing a
failover to the slave unit. The slave is now the active unit.
5.
After reconfiguration of the master is complete, failover occurs again so that the master
once again becomes the active unit.
A restart of the inactive unit will cause the following to take place:
During startup, the inactive unit sends a message to the active unit to flag that its state has
been initialized and it requires the entire state of the active unit to be sent.
The active unit then sends a copy of its entire state to the inactive unit.
The inactive unit then becomes synchronized after which a failover can take place
631
632
11.3. Setting Up HA
This section provides a step-by-step guide for setting up an HA Cluster. Setup is explained in the
following subsections:
Start with two physically identical NetDefend Firewalls. Both may be newly purchased or an
existing unit may have a new unit added to it to create the cluster.
2.
Both master and slave units must be running the same version of NetDefendOS.
3.
4.
Connect the matching interfaces of master and slave through separate switches or
separate broadcast domains. It is important to keep the traffic on each interface pair
separated from other pairs.
Connect together the sync interfaces. This can be done directly with a crossover cable or
through a separate switch (or broadcast domain).
Decide on a shared IP address for each interface in the cluster. Some interfaces could have
shared addresses only while others could also have unique, individual IP addresses for each
interface specified in an IP4 HA Address object. The shared and individual addresses are used
as follows:
The individual addresses specified for an interface in an IP4 HA Address object allow
remote management through that interface. These addresses can also be "pinged" using
ICMP provided that IP rules are defined to permit this (by default, ICMP queries are
dropped by the rule set).
If either unit is inoperative, its individual IP addresses will also be unreachable. These IP
addresses are usually private but must be public if management access across the public
Internet is required.
If an interface is not assigned an individual address through an IP4 HA Address object
then it must be assigned the default address localhost (the loopback address) which is
an IP address from the sub-network 127.0.0.0/8. The localhost object behaves as two
addresses and uses 127.0.0.1 for the master and 127.0.0.2 for the slave.
ARP queries for the individual IP addresses specified in IP4 HA Address objects are
answered by the firewall that owns the address, using the normal hardware address, just
as with normal IP units.
One single shared IP address is used for routing and it is also the address used by
dynamic address translation, unless the configuration explicitly specifies another
address.
633
In the scenario shown above, the lan interface on the master and the lan interface on the slave
would be connected to the same switch which then connects to an internal network. Similarly
the wan interface on the master and the wan interface would connect to a switch which in turn
connects to the external Internet.
634
interfaces of each unit. Alternatively, the connection could be via a switch or broadcast
domain.
2.
Go to: Objects > Address Book and create an IP4 HA Address object for each interface pair
in the cluster. Each object will contain the master and slave IP addresses for the interface
pair. Inclusion in an IP4 HA Address object is mandatory for any interface that will be used for
remote management but optional for other interfaces. The private address must be
different in the IP4 HA Address object for the management interface of the master and
slave unit.
3.
Save and activate the new configuration before continuing to the next step.
4.
Go to System > Device > High Availability in the web interface and press the Start Wizard
button. Running the wizard for the master and slave units is described in A and B below.
5.
Specify the NodeType, ClusterID and Interface that will be used for synchronization.
2.
If the two hardware models used in the cluster are different, this should also be indicated
(see Section 11.3.5, Unique Shared Mac Addresses below for an explanation of this option).
3.
Select the shared IP address and, if desired, the individual IP4 HA Address objects created
earlier. Make sure the management interface IPs are different for master and slave.
4.
Specify the NodeType, ClusterID and Interface that will be used for synchronization.
2.
If the two hardware models used in the cluster are different, this should also be indicated
(see Section 11.3.5, Unique Shared Mac Addresses below for an explanation of this option).
3.
The wizard will acknowledge that it will synchronize with the master unit.
4.
5.
The wizard will confirm that slave setup and synchronization is complete.
new unit, perhaps because of an equipment failure, the wizard can be used to perform the initial
setup since it will copy over the configuration from the master.
But what if it is the slave unit that contains the configuration that is to be used and it is the
master unit that is to be synchronized with it? This would be the case if the master unit suffered a
fault and had to be swapped with a brand new unit.
There are two methods to resolve this:
Method A. Copying the slave configuration to the new master
The easiest and quickest way to configure a new master unit is as follows:
1.
Use the normal configuration backup function to make a backup of the configuration that
exists on the existing slave unit.
2.
Restore the backup from the slave to the new master unit.
3.
Through the management interface, change the new master unit's HA designation to be
Master and rename the device so both do not have the same name.
2.
3.
4.
Set the Cluster ID. This must be unique for each cluster.
5.
6.
7.
Go to: Objects > Address Book and create an IP4 HA Address object for each interface
pair. Each must contain the master and slave interface IP addresses for the pair.
Creating an object is mandatory for an interface pair used for remote management, but
optional for other interfaces (in which case the default loopback address localhost must be
used and this is an IP address from the 127.0.0.0/8 sub-network). The IPv4 address for the
management interfaces of the master and slave units must be different.
636
8.
Optionally create an IP6 HA Address object for any relevant interface pairs. Management
access or logging is not possible using an IPv6 address. However, a private IPv6 address
could be pinged by incoming ICMP messages when the HA cluster is active or used as the
source IP for outgoing ICMP ping messages when HA is not active.
9.
Go to: Network > Interfaces and VPN > Ethernet and go through each interface in the list,
entering the shared IP address for that interface in the IP Address field.
Also select the Advanced tab for each interface and set the High Availability, Private IP
Address field to be the name of the IP4 HA Address object created previously for the
interface (NetDefendOS will automatically select the appropriate address from the master
and slave addresses defined in the object).
This will ensure both units will try to correctly synchronize with each other.
This step can be skipped but may be necessary later if synchronization does not succeed
or other problems occur.
To verify that the cluster is performing correctly, first use the ha command on each unit. The
output will look similar to the following for the master:
gw-world:/> ha
This device is an HA MASTER
This device is currently ACTIVE (will forward traffic)
HA cluster peer is ALIVE
637
Then use the stat command to verify that both the master and slave have about the same
number of connections. The output from the command should contain a line similar to the
following:
Connections 2726 out of 128000
The lower number on the left in this output is the current number of connections and the higher
number on the right is the maximum number of connections allowed by the license.
The following points are also relevant to cluster setup:
If this is not the first cluster in a network then the Cluster ID must be changed for the cluster
so that it is unique (the default value is 0). The Cluster ID determines that the MAC address for
the cluster is unique.
Enabling the advanced setting Use Unique Share MAC is recommended so that each interface
has its own MAC address. If this is not enabled, interfaces share a MAC address and this can
confuse some third party switches.
Make sure that the advanced setting High Buffers is set to be automatic for both units in the
cluster. This setting determines how memory is allocated by NetDefendOS for handling
increasing numbers of connections. A NetDefendOS restart is required for a change in this
setting to take effect and this can be achieved with the CLI command:
gw-world:/> shutdown
Where a cluster has a very high number (for example, tens of thousands) of simultaneous
connections then it may be necessary to set a high value for this instead of enabling the
Dynamic High Buffers option. A very high value for High Buffers can suit situations with large
numbers of connections but can have the disadvantage of increasing throughput.
See Section 13.9, Miscellaneous Settings for a full explanation of these settings.
Problem Diagnosis
An HA cluster will function if this setting is disabled but can cause problems with a limited
number of switch types where the switch uses a shared ARP table. Such problems can be hard to
diagnose which is why it is best to always have the setting enabled.
638
be used.
639
11.4. HA Issues
The following points should be kept in mind when managing and configuring an HA Cluster.
PPP
L2TP
L2TPv3
SSL VPN
In the event of a failover occurring for these types of tunnel, incoming clients must re-establish
their tunnels after the original tunnels are deemed non-functional. This timeout for this can vary
according to the scenario but can be as long as 30 seconds.
DHCP
Servers for IPv4 DHCP as well as DHCPv6 have full HA synchronization support. However, the
clients for both IPv4 DHCP and DHCPv6 are not supported.
SNMP
SNMP statistics are not shared between master and slave. SNMP managers have no failover
capabilities. Therefore both firewalls in a cluster need to be polled separately.
Failed Interfaces
Failed interfaces will not be detected unless they fail to the point where NetDefendOS cannot
continue to function. This means that failover will not occur if the active unit can still send "I am
640
alive" heartbeats to the inactive unit through any of its interfaces, even though one or more
interfaces may be inoperative.
641
ii.
When the inactive unit is once again synchronized with the active unit, cause a failover to
occur so that the inactive becomes the active unit.
iii.
Now upgrade the inactive unit. Both units will then resynchronize and have the new
NetDefendOS version.
These three steps will now be broken down into a more detailed description:
A. Establish which is the inactive unit in the cluster
The currently inactive unit will be upgraded first so it is necessary to identify this. To do this,
connect with a CLI console to one of the cluster units and issue the ha command. The typical
output if the unit is active is shown below.
gw-world:/> ha
This device is a HA SLAVE
This device is currently ACTIVE (will forward traffic)
This device has been active: 430697 sec
HA cluster peer is ALIVE
This unit (the slave) is the currently active unit, so the other one (the master) is the inactive unit.
B. Upgrade the inactive unit
Once the inactive unit is identified, upgrade this unit with the new NetDefendOS version. This is
done exactly as though the unit were not in a cluster. For example, the Web Interface can be
used to do the upgrade.
642
Now, connect to the active unit (which is still running the old NetDefendOS version) with a CLI
console and issue the ha -deactivate command. This will cause the active unit to become inactive,
and the inactive to become active.
gw-world:/> ha -deactivate
HA Was: ACTIVE
HA going INACTIVE...
To check that the failover has completed successfully, an ha command can be issued again and
the text "INACTIVE" and "is ALIVE" should appear in the output.
D. Upgrade the newly inactive unit
When the failover is complete, upgrade the newly inactive unit with the new NetDefendOS
version. Just like step B, this is done in the normal way as though the unit were not part of a
cluster.
E. Wait for resynchronization
Once the second software upgrade is complete, two units will automatically resynchronize and
the cluster will continue operation. The roles of active and inactive unit will have been reversed.
If it is desirable to make the active unit inactive, and the inactive unit active, the CLI command ha
-active can be used.
643
Monitoring Paths
Monitoring the availability of specific network paths can be done with the NetDefendOS Link
Monitor. The Link Monitor allows the administrator to specify particular hosts whose reachability
is monitored using ICMP "Ping" requests and therefore link status. If these hosts become
unreachable then the link is considered failed and a failover to a slave can be initiated. Provided
that the slave is using a different network link and also monitoring the reachability of different
hosts, traffic can continue to flow.
644
Initial Silence
The time in seconds to stay silent on startup or after reconfiguration. When the active unit in an
HA cluster believes the inactive unit is no longer reachable, it continues to send synchronization
traffic normally for a period of one minute in the expectation that the inactive unit will again
become reachable. In order not to flood the network unnecessarily, after one minute has
elapsed, the synchronization traffic is then only sent after repeated periods of silence. The length
of this silence is taken from this setting.
Default: 5
645
646
12.1. Overview
ZoneDefense Controls Switches
ZoneDefense allows a NetDefend Firewall to control locally attached switches. It can be used as a
counter-measure to stop a virus-infected computer in a local network from infecting other
computers.
When hosts or clients on a network become infected with viruses or another form of malicious
code, this can often show its presence through anomalous behavior, often by large numbers of
new connections being opened to outside hosts.
Using Thresholds
By setting up Threshold Rules, hosts or networks that are exceeding a defined connection
threshold can be dynamically blocked using the ZoneDefense feature. Thresholds are based on
either the number of new connections made per second, or on the total number of connections
being made.
These connections may be made by either a single host or all hosts within a specified CIDR
network range (an IP address range specified by a combination of an IP address and its
associated network mask).
ACL Upload
When NetDefendOS detects that a host or a network has reached the specified limit, it uploads
Access Control List (ACL) rules to the relevant switches and this blocks all traffic for the host or
network displaying the unusual behavior. Blocked hosts and networks remain blocked until the
system administrator manually unblocks them using the Web or Command Line interface.
647
648
649
SNMP Managers
A typical managing device, such as a NetDefend Firewall, uses the SNMP protocol to monitor and
control network devices in the managed environment. The manager can query stored statistics
from the controlled devices by using the SNMP Community String. This is similar to a userid or
password which allows access to the device's state information. If the community string type is
write, the manager will be allowed to modify the device's state.
Managed devices
The managed devices must be SNMP compliant, as are D-Link switches. They store state data in
databases known as the Management Information Base (MIB) and provide the information to the
manager upon receiving an SNMP query.
Connection Rate Limit - This can be triggered if the rate of new connections per second to
the firewall exceeds a specified threshold.
Total Connections Limit - This can be triggered if the total number of connections to the
firewall exceeds a specified threshold.
Threshold rules have parameters which are similar to those for IP Rules. These parameters specify
what type of traffic a threshold rule applies to.
A single threshold rule has the parameters:
Service
Traffic that matches the above criteria and causes the host/network threshold to be exceeded
will trigger the ZoneDefense feature. This will prevent the host/networks from accessing the
switch(es). All blocking in response to threshold violations will be based on the IP address of the
host or network on the switch(es). When a network-based threshold has been exceeded, the
source network will be blocked out instead of just the offending host.
For a general description of how Threshold Rules are specified and function, please see
Section 10.3, Threshold Rules.
650
A D-Link switch model DES-3226S is used in this case, with a management interface address
192.168.1.250 connecting to the firewall's interface address 192.168.1.1. This firewall interface is
added into the exclude list to prevent the firewall from being accidentally locked out from
accessing the switch.
Web Interface
Add a new switch into ZoneDefense section:
1.
2.
Now enter:
Name: switch1
651
IP Address: 192.168.1.250
3.
For SNMP Community enter the Write Community String configured for the switch
4.
Press Check Switch to verify the firewall can communicate with the switch and the
community string is correct.
5.
Click OK
2.
For Addresses choose the object name of the firewall's interface address 192.168.1.1 from
the Available list and put it into the Selected list.
3.
Click OK
Go to: Policies > Traffic Management > Threshold Rules > Add > Threshold Rule
2.
3.
4.
Name: HTTP-Threshold
Service: http
Click OK
Specify the threshold, the threshold type and the action to take if exceeded:
1.
2.
Action: Protect
Threshold: 10
Click OK
652
FTP - ZoneDefense can block a local FTP client that is uploading viruses.
SMTP - ZoneDefense can block a local SMTP client that is sending viruses with emails.
This feature is described further in Section 6.4, Anti-Virus Scanning and in the sections covering
the individual ALGs.
12.3.5. Limitations
There are some differences in ZoneDefense operation depending on switch model. The first
difference is the latency between the triggering of a blocking rule to the moment when
switch(es) actually starts blocking out the traffic matched by the rule. All switch models require a
short period of latency time to implement blocking once the rule is triggered. Some models can
activate blocking in less than a second while some models may require a minute or more.
A second difference is the maximum number of rules supported by different switches. Some
switches support a maximum of 50 rules while others support up to 800 (usually, in order to
block a host or network, one rule per switch port is needed). When this limit has been reached no
more hosts or networks will be blocked out.
653
654
655
Default: Enabled
Block 0 Net
Block 0.* as source addresses.
Default: DropLog
TTL Min
The minimum TTL value accepted on receipt.
Default: 3
TTL on Low
Determines the action taken on packets whose TTL falls below the stipulated TTLMin value.
Default: DropLog
656
Default TTL
Indicates which TTL NetDefendOS is to use when originating a packet. These values are usually
between 64 and 255.
Default: 255
SecuRemoteUDP Compatibility
Allow IP data to contain eight bytes more than the UDP total length field specifies. Checkpoint
SecuRemote violates NAT-T drafts.
Default: Disabled
IP Option Sizes
Verifies the size of "IP options". These options are small blocks of information that may be added
to the end of each IP header. This function checks the size of well-known option types and
ensures that no option exceeds the size limit stipulated by the IP header itself.
Default: ValidateLogBad
IP Option Source/Return
Indicates whether source routing options are to be permitted. These options allow the sender of
the packet to control how the packet is to be routed through each router and firewall. These
constitute an enormous security risk. NetDefendOS never obeys the source routes specified by
these options, regardless of this setting.
Default: DropLog
IP Options Timestamps
Time stamp options instruct each router and firewall on the packet's route to indicate at what
time the packet was forwarded along the route. These options do not occur in normal traffic.
Time stamps may also be used to "record" the route a packet has taken from sender to final
destination. NetDefendOS never enters information into these options, regardless of this setting.
Default: DropLog
657
Default: ValidateLogBad
IP Options Other
All options other than those specified above.
Default: DropLog
Directed Broadcasts
Indicates whether NetDefendOS will forward packets which are directed to the broadcast
address of its directly connected networks. It is possible to achieve this functionality by adding
lines to the Rules section, but it is also included here for simplicity's sake. This form of validation
is faster than entries in the Rules section since it is more specialized.
Default: DropLog
IP Reserved Flag
Indicates what NetDefendOS will do if there is data in the "reserved" fields of IP headers. In
normal circumstances, these fields should read 0. Used by OS Fingerprinting.
Default: DropLog
Strip DontFragment
Strip the Don't Fragment flag for packets equal to or smaller than the size specified by this
setting.
Default: 65535 bytes
658
659
660
TCP SYN/URG
Specifies how NetDefendOS will deal with TCP packets with SYN (synchronize) flags and URG
(urgent data) flags both turned on. The presence of a SYN flag indicates that a new connection is
in the process of being opened, and an URG flag means that the packet contains data requiring
urgent attention. These two flags should not be turned on in a single packet as they are used
exclusively to crash computers with poorly implemented TCP stacks.
Default: DropLog
TCP SYN/PSH
Specifies how NetDefendOS will deal with TCP packets with SYN and PSH (push) flags both
turned on. The PSH flag means that the recipient stack should immediately send the information
in the packet to the destination application in the computer.
These two flags should not be turned on at the same time as it could pose a crash risk for poorly
implemented TCP stacks. However, some Apple MAC systems implement TCP in a non-standard
way, meaning that they always send out SYN packets with the PSH flag turned on. This is why
NetDefendOS normally removes the PSH flag and allows the packet through despite the fact that
such packets would be dropped if standards were strictly followed.
Default: StripSilent
661
TCP SYN/RST
The TCP RST flag together with SYN; normally invalid (strip=strip RST).
Default: DropLog
TCP SYN/FIN
The TCP FIN flag together with SYN; normally invalid (strip=strip FIN).
Default: DropLog
TCP FIN/URG
Specifies how NetDefendOS will deal with TCP packets with both FIN (Finish, close connection)
and URG flags turned on. This should normally never occur, as it is not usually attempted to close
a connection at the same time as sending "important" data. This flag combination could be used
to crash poorly implemented TCP stacks and is also used by OS Fingerprinting.
Default: DropLog
TCP URG
Specifies how NetDefendOS will deal with TCP packets with the URG flag turned on, regardless of
any other flags. Many TCP stacks and applications deal with Urgent flags in the wrong way and
can, in the worst case scenario, cease working. Note however that some programs, such as FTP
and MS SQL Server, nearly always use the URG flag.
Default: StripLog
TCPE ECN
Specifies how NetDefendOS will deal with TCP packets with either the Xmas or Ymas flag turned
on. These flags are currently mostly used by OS Fingerprinting.
It should be noted that a developing standard called Explicit Congestion Notification also makes
use of these TCP flags, but as long as there are only a few operating systems supporting this
standard, the flags should be stripped.
Default: StripLog
TCP NULL
Specifies how NetDefendOS will deal with TCP packets that do not have any of the SYN, ACK, FIN
or RST flags turned on. According to the TCP standard, such packets are illegal and are used by
both OS Fingerprinting and stealth port scanners, as some firewalls are unable to detect them.
662
Default: DropLog
663
664
Log Connections
Specifies how NetDefendOS, will log connections:
NoLog Does not log any connections; consequently, it will not matter if logging is enabled
for either Allow or NAT rules in the IP rule set; they will not be logged. However, FwdFast, Drop
and Reject rules will be logged as stipulated by the settings in the Rules section.
Log Logs connections in short form; gives a short description of the connection, which rule
allowed it to be made and any SAT rules that apply. Connections will also be logged when
they are closed.
LogOC As for Log, but includes the two packets that cause the connection to be opened
and closed. If a connection is closed as the result of a timeout, no ending packet will be
logged
LogOCAll Logs all packets involved in opening and closing the connection. In the case of
TCP, this covers all packets with SYN, FIN or RST flags turned on
665
Default: Log
Max Connections
This setting applies if Dynamic Max Connections above is disabled. Specifies how many
connections NetDefendOS may keep open at any one time. Each connection consumes
approximately 150 bytes RAM. When this setting is dynamic, NetDefendOS will try to use as
many connections as is allowed by product.
Default: 8192
666
667
668
669
Max AH Length
Specifies in bytes the maximum size of an AH packet. AH, Authentication Header, is used by IPsec
where only authentication is applied. This value should be set at the size of the largest packet
allowed to pass through the VPN connections, regardless of its original protocol, plus approx. 50
bytes.
Default: 2000
670
Default: Enabled
671
Illegal Fragments
Determines how NetDefendOS will handle incorrectly constructed fragments. The term
"incorrectly constructed" refers to overlapping fragments, duplicate fragments with different
data, incorrect fragment sizes, etc. Possible settings include:
Drop Discards the illegal fragment without logging it. Also remembers that the packet that
is being reassembled is "suspect", which can be used for logging further down the track.
DropLog Discards and logs the illegal fragment. Also remembers that the packet that is
being reassembled is "suspect", which can be used for logging further down the track.
DropPacket Discards the illegal fragment and all previously stored fragments. Will not allow
further fragments of this packet to pass through during ReassIllegalLinger seconds.
DropLogAll As DropLogPacket, but also logs further fragments belonging to this packet that
arrive during ReassIllegalLinger seconds.
The choice of whether to discard individual fragments or disallow the entire packet is governed
by two factors:
If, as the result of receiving an illegal fragment, it is chosen to discard the whole packet,
attackers will be able to disrupt communication by sending illegal fragments during a
reassembly, and in this way block almost all communication.
Default: DropLog discards individual fragments and remembers that the reassembly attempt is
"suspect".
number of samples, it is more likely to find mismatching duplicates. However, more comparisons
result in higher CPU load.
Default: Check8 compare 8 random locations, a total of 32 bytes
Some of the fragments did not arrive within the time stipulated by the ReassTimeout or
ReassTimeLimit settings. This may mean that one or more fragments were lost on their way
across the Internet, which is a quite common occurrence.
NetDefendOS was forced to interrupt the reassembly procedure due to new fragmented
packets arriving and the system temporarily running out of resources. In situations such as
these, old reassembly attempts are either discarded or marked as "failed".
Under normal circumstances, it is not desirable to log failures as they occur frequently. However,
it may be useful to log failures involving "suspect" fragments. Such failures may arise if, for
example, the IllegalFrags setting has been set to Drop rather than DropPacket.
The following settings are available for FragReassemblyFail:
LogSuspect - Logs failed reassembly attempts only if "suspect" fragments have been involved.
LogSuspectSubseq - As LogSuspect, but also logs subsequent fragments of the packet as and
when they arrive
LogAllSubseq - As LogAll, but also logs subsequent fragments of the packet as and when they
arrive.
Default: LogSuspectSubseq
Dropped Fragments
If a packet is denied entry to the system as the result of the settings in the Rules section, it may
also be worth logging individual fragments of that packet. The DroppedFrags setting specifies
how NetDefendOS will act. Possible settings for this rule are as follows:
NoLog No logging is carried out over and above that which is stipulated in the rule set.
Default: LogSuspect
Duplicate Fragments
If the same fragment arrives more than once, this can mean either that it has been duplicated at
some point on its journey to the recipient or that an attacker is trying to disrupt the reassembly
673
of the packet. DuplicateFrags determines whether such a fragment should be logged. Note that
DuplicateFragData can also cause such fragments to be logged if the data contained in them
does not match up. Possible settings are as follows:
LogSuspect - Logs duplicated fragments if the reassembly procedure has been affected by
"suspect" fragments.
Default: LogSuspect
Fragmented ICMP
Other than ICMP ECHO (Ping), ICMP messages should not normally be fragmented as they
contain so little data that fragmentation should never be necessary. FragmentedICMP
determines the action taken when NetDefendOS receives fragmented ICMP messages that are
not either ICMP ECHO or ECHOREPLY.
Default: DropLog
Reassembly Timeout
A reassembly attempt will be interrupted if no further fragments arrive within Reassembly
Timeout seconds of receipt of the previous fragment.
Default: 65
674
675
Max Size
Maximum size of a locally reassembled packet.
Default: 10000
Large Buffers
Number of large ( over 2K) local reassembly buffers (of the above size).
Default: 32
676
Port 0
How to treat TCP/UDP packets with destination port 0 and TCP packets with source port 0.
Default: DropLog
Watchdog Time
Number of non-responsive seconds before watchdog is triggered (0=disable).
Default: 180
Max Connections
Packet re-assembly collects IP fragments into complete IP datagrams and, for TCP, reorders
segments so that they are processed in the correct order and also to keep track of potential
segment overlaps and to inform other subsystems of such overlaps. The associated settings limit
memory used by the re-assembly subsystem.
This setting specifies how many connections can use the re-assembly system at the same time. It
is expressed as a percentage of the total number of allowed connections. Minimum 1, Maximum
100.
Default: 80
Max Memory
This setting specifies how much memory that the re-assembly system can allocate to process
packets. It is expressed as a percentage of the total memory available. Minimum 1, Maximum
100.
Default: 3
677
be allocated, regardless of this setting. For more information about pipes and pipe users, see
Section 10.1, Traffic Shaping.
Default: 512
678
679
On purchase, customers receive a unique activation code to identify them as a user of the
service.
Go to: Status > Maintenance > License in the Web Interface of your NetDefend Firewall
system and enter this activation code. NetDefendOS will indicate the code is accepted and
the update service will be activated. Make sure access to the public Internet is possible when
doing this.
Subscription renewal
In the Web Interface, go to Status > Maintenance > License to check which update services are
activated and when your subscription is ends.
An IDP database update can be forced at any time by using the command:
gw-world:/> updatecenter -update IDP
Once removed, NetDefendOS should be restarted and a database update initiated. Removing
the database is also recommended if either IDP or Anti-Virus is not used for longer periods of
time.
Anti-Virus
681
Subscription expiry results in following the action specified by the Fail Mode property of the
ALG. By default, this is Deny and the affected traffic will therefore be dropped. The default of
Deny is always used when this feature is configured IP Policy objects.
A message appears under in the Web Interface to indicate that the subscription has expired.
In addition, a no_valid_license av_scanning_aborted log message is generated.
IDP
Subscription expiry results in IDP scanning being disabled. No traffic will be dropped because
of this.
When the administrator tries to add a new IDP rule or examine existing rules in the Web
Interface, they will get a warning message that no valid license exists for IDP.
Application Control
Subscription expiry results in all applications being tagged as unknown. Traffic will be
allowed or dropped depending on how the administrator has configured application control
to behave with the unknown tag.
In addition, a warning expiry message is shown on the CLI console and log messages are
generated indicating that traffic is being tagged unknown because of subscription expiry.
For all these features, the current status of the relevant subscription along with the expiry date
can be viewed in the Web Interface by going to Status > Maintenance > License.
682
Intrusion Type
APP_AMANDA
APP_ETHEREAL
Ethereal
APP_ITUNES
APP_REALPLAYER
APP_REALSERVER
APP_WINAMP
WinAMP
APP_WMP
AUTHENTICATION_GENERAL
Authenticantion
AUTHENTICATION_KERBEROS
Kerberos
AUTHENTICATION_XTACACS
XTACACS
BACKUP_ARKEIA
BACKUP_BRIGHTSTOR
BACKUP_GENERAL
BACKUP_NETVAULT
BACKUP_VERITAS
Backup solutions
BOT_GENERAL
BROWSER_FIREFOX
Mozilla Firefox
BROWSER_GENERAL
BROWSER_IE
Microsoft IE
BROWSER_MOZILLA
Mozilla Browser
COMPONENT_ENCODER
COMPONENT_INFECTION
COMPONENT_SHELLCODE
DB_GENERAL
Database systems
DB_MSSQL
MS SQL Server
DB_MYSQL
MySQL DBMS
DB_ORACLE
Oracle DBMS
DB_SYBASE
Sybase server
DCOM_GENERAL
MS DCOM
DHCP_CLIENT
DHCP_GENERAL
DHCP protocol
DHCP_SERVER
DNS_EXPLOIT
DNS attacks
DNS_GENERAL
DNS_OVERFLOW
DNS_QUERY
ECHO_GENERAL
ECHO_OVERFLOW
FINGER_BACKDOOR
Finger backdoor
FINGER_GENERAL
FINGER_OVERFLOW
683
Group Name
Intrusion Type
FS_AFS
FTP_DIRNAME
FTP_FORMATSTRING
FTP_GENERAL
FTP_LOGIN
Login attacks
FTP_OVERFLOW
GAME_BOMBERCLONE
Bomberclone game
GAME_GENERAL
GAME_UNREAL
HTTP_APACHE
Apache httpd
HTTP_BADBLUE
HTTP_CGI
HTTP CGI
HTTP_CISCO
HTTP_GENERAL
HTTP_MICROSOFTIIS
HTTP_OVERFLOWS
HTTP_TOMCAT
Tomcat JSP
ICMP_GENERAL
IGMP_GENERAL
IGMP
IMAP_GENERAL
IMAP protocol/implementation
IM_AOL
AOL IM
IM_GENERAL
IM_MSN
MSN Messenger
IM_YAHOO
Yahoo Messenger
IP_GENERAL
IP_OVERFLOW
Overflow of IP protocol/implementation
IRC_GENERAL
LDAP_GENERAL
LDAP_OPENLDAP
Open LDAP
LICENSE_CA-LICENSE
LICENSE_GENERAL
MALWARE_GENERAL
Malware attack
METASPLOIT_FRAME
METASPLOIT_GENERAL
MISC_GENERAL
General attack
MSDTC_GENERAL
MS DTC
MSHELP_GENERAL
NETWARE_GENERAL
NFS_FORMAT
Format
NFS_GENERAL
NFS protocol/implementation
NNTP_GENERAL
NNTP implementation/protocol
OS_SPECIFIC-AIX
AIX specific
OS_SPECIFIC-GENERAL
OS general
OS_SPECIFIC-HPUX
HP-UX related
OS_SPECIFIC-LINUX
Linux specific
OS_SPECIFIC-SCO
SCO specific
OS_SPECIFIC-SOLARIS
Solaris specific
OS_SPECIFIC-WINDOWS
Windows specific
684
Group Name
Intrusion Type
P2P_EMULE
P2P_GENERAL
P2P_GNUTELLA
PACKINGTOOLS_GENERAL
PBX_GENERAL
PBX
POP3_DOS
POP3_GENERAL
POP3_LOGIN-ATTACKS
POP3_OVERFLOW
POP3_REQUEST-ERRORS
Request Error
PORTMAPPER_GENERAL
PortMapper
PRINT_GENERAL
PRINT_OVERFLOW
REMOTEACCESS_GOTOMYPC
Goto MY PC
REMOTEACCESS_PCANYWHERE
PcAnywhere
REMOTEACCESS_RADMIN
REMOTEACCESS_VNC-CLIENT
REMOTEACCESS_VNC-SERVER
REMOTEACCESS_WIN-TERMINAL
RLOGIN_GENERAL
RLOGIN_LOGIN-ATTACK
Login attacks
ROUTER_CISCO
ROUTER_GENERAL
ROUTING_BGP
RPC_GENERAL
RPC_JAVA-RMI
Java RMI
RSYNC_GENERAL
Rsync
SCANNER_GENERAL
Generic scanners
SCANNER_NESSUS
Nessus Scanner
SECURITY_GENERAL
Anti-virus solutions
SECURITY_ISS
SECURITY_MCAFEE
McAfee
SECURITY_NAV
Symantec AV solution
SMB_ERROR
SMB Error
SMB_EXPLOIT
SMB Exploit
SMB_GENERAL
SMB attacks
SMB_NETBIOS
NetBIOS attacks
SMB_WORMS
SMB worms
SMTP_COMMAND-ATTACK
SMTP_DOS
SMTP_GENERAL
SMTP_OVERFLOW
SMTP Overflow
SMTP_SPAM
SPAM
SNMP_ENCODING
SNMP encoding
SNMP_GENERAL
SNMP protocol/implementation
SOCKS_GENERAL
SSH_GENERAL
SSH_LOGIN-ATTACK
685
Group Name
Intrusion Type
SSH_OPENSSH
OpenSSH Server
SSL_GENERAL
TCP_GENERAL
TCP_PPTP
TELNET_GENERAL
TELNET_OVERFLOW
TFTP_DIR_NAME
TFTP_GENERAL
TFTP_OPERATION
Operation Attack
TFTP_OVERFLOW
TFTP_REPLY
TFTP_REQUEST
TROJAN_GENERAL
Trojan
UDP_GENERAL
General UDP
UDP_POPUP
UPNP_GENERAL
UPNP
VERSION_CVS
CVS
VERSION_SVN
Subversion
VIRUS_GENERAL
Virus
VOIP_GENERAL
VOIP_SIP
WEB_CF-FILE-INCLUSION
WEB_FILE-INCLUSION
File inclusion
WEB_GENERAL
WEB_JSP-FILE-INCLUSION
WEB_PACKAGES
WEB_PHP-XML-RPC
WEB_SQL-INJECTION
SQL Injection
WEB_XSS
Cross-Site-Scripting
WINS_GENERAL
MS WINS Service
WORM_GENERAL
Worms
X_GENERAL
Generic X applications
686
The ALGs listed above also offer the option to explicitly allow or block certain filetypes as
downloads from a list of types. That list is the same one found in this appendix.
For a more detailed description of MIME verification and the filetype block/allow feature, see
Section 6.2.2, The HTTP ALG.
Filetype extension
Application
3ds
3d Studio files
3gp
aac
ab
Applix Builder
ace
ACE archive
ad3
ag
aiff, aif
am
arc
Archive file
alz
avi
arj
Compressed archive
ark
arq
Compressed archive
as
asf
avr
aw
bh
bmp
box
bsa
bz, bz2
cab
cdr
cgm
chz
class
687
Filetype extension
Application
cmf
core/coredump
cpl
dbm
Database file
dcx
deb
djvu
DjVu file
dll
dpa
dvi
eet
EET archive
egg
Allegro datafile
elc
emd
esp
exe
Windows Executable
fgf
flac
flc
fli
FLIC Animation
flv
gdbm
Database file
gif
hap
hpk
hqx
icc
icm
ico
imf
inf
ipa
it
java
jar
jng
JPEG file
jrc
jsw
kdelnk
lha
lim
lisp
lzh
md
mdb
mid,midi
688
Filetype extension
Application
mmf
mng
mod
mp3
mp4
mpg,mpeg
mpv
Microsoft files
msa
niff, nif
noa
nsf
obj, o
ocx
ogg
out
Linux executable
pac
pbf
pbm
pe
pfb
pgm
pkg
pll
pma
png
ppm
ps
PostScript file
psa
psd
qxd
QuarkXpress Document
ra, ram
rar
rbs
riff, rif
rm
rpm
rtf, wri
sar
sbi
sc
SC spreadsheet
sgi
sid
sit
StuffIt archives
sky
snd, au
689
Filetype extension
Application
so
sof
ReSOF archive
sqw
sqz
stm
svg
svr4
swf
tar
tfm
tiff, tif
tnef
torrent
ttf
TrueType Font
txw
ufa
vcf
Vcard file
viv
wav
Waveform Audio
wk
wmv
wrl, vrml
xcf
xm
xml
XML file
xmcd
xpm
yc
zif
ZIF image
zip
zoo
zpk
690
Layer purpose
Layer 7
Application
Layer 6
Presentation
Layer 5
Session
Layer 4
Transport
Layer 3
Network
Layer 2
Data-Link
Layer 1
Physical
Layer Functions
The different layers perform the following functions:
Layer 7 - Application Layer
691
Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3
and 4 of this License without being bound by section 3 of the GNU GPL.
2.
If you modify a copy of the Library, and, in your modifications, a facility refers to a function
or data to be supplied by an Application that uses the facility (other than as an argument
passed when the facility is invoked), then you may convey a copy of the modified version:
i.
Under this License, provided that you make a good faith effort to ensure that, in the
event an Application does not supply the function or data, the facility still operates, and
performs whatever part of its purpose remains meaningful, or
ii.
Under the GNU GPL, with none of the additional permissions of this License applicable
692
to that copy.
3.
4.
Object Code Incorporating Material from Library Header Files. The object code form of an
Application may incorporate material from a header file that is part of the Library. You may
convey such object code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure layouts and accessors, or
small macros, inline functions and templates (ten or fewer lines in length), you do both of
the following:
i.
Give prominent notice with each copy of the object code that the Library is used in it
and that the Library and its use are covered by this License.
ii.
Accompany the object code with a copy of the GNU GPL and this license document.
Combined Works. You may convey a Combined Work under terms of your choice that, taken
together, effectively do not restrict modification of the portions of the Library contained in
the Combined Work and reverse engineering for debugging such modifications, if you also
do each of the following:
i.
Give prominent notice with each copy of the Combined Work that the Library is used in
it and that the Library and its use are covered by this License.
ii.
Accompany the Combined Work with a copy of the GNU GPL and this license
document.
iii.
For a Combined Work that displays copyright notices during execution, include the
copyright notice for the Library among these notices, as well as a reference directing
the user to the copies of the GNU GPL and this license document.
iv.
v.
5.
Convey the Minimal Corresponding Source under the terms of this License, and the
Corresponding Application Code in a form suitable for, and under terms that
permit, the user to recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the manner specified
by section 6 of the GNU GPL for conveying Corresponding Source.
Use a suitable shared library mechanism for linking with the Library. A suitable
mechanism is one that (a) uses at run time a copy of the Library already present on
the user's computer system, and (b) will operate properly with a modified version of
the Library that is interface-compatible with the Linked Version.
You may place library facilities that are a work based on the Library side by side in a single
library together with other library facilities that are not Applications and are not covered by
this License, and convey such a combined library under terms of your choice, if you do both
of the following:
i.
Accompany the combined library with a copy of the same work based on the Library,
uncombined with any other library facilities, conveyed under the terms of this License.
ii.
Give prominent notice with the combined library that part of it is a work based on the
Library, and explaining where to find the accompanying uncombined form of the same
693
work.
6.
6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation
may publish revised and/or new versions of the GNU Lesser General Public License from
time to time. Such new versions will be similar in spirit to the present version, but may differ
in detail to address new problems or concerns. Each version is given a distinguishing version
number. If the Library as you received it specifies that a certain numbered version of the
GNU Lesser General Public License "or any later version" applies to it, you have the option of
following the terms and conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you received it does not specify
a version number of the GNU Lesser General Public License, you may choose any version of
the GNU Lesser General Public License ever published by the Free Software Foundation. If
the Library as you received it specifies that a proxy can decide whether future versions of
the GNU Lesser General Public License shall apply, that proxy's public statement of
acceptance of any version is permanent authorization for you to choose that version for the
Library.
Definitions. "License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the
copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are
controlled by, or are under common control with that entity. For the purposes of this
definition, "control" means (i) the power, direct or indirect, to cause the direction or
management of such entity, whether by contract or otherwise, or (ii) ownership of fifty
percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by
this License. "Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files. "Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but not limited to compiled object
code, generated documentation, and conversions to other media types. "Work" shall mean
the work of authorship, whether in Source or Object form, made available under the
License, as indicated by a copyright notice that is included in or attached to the work (an
example is provided in the Appendix below). "Derivative Works" shall mean any work,
whether in Source or Object form, that is based on (or derived from) the Work and for which
the editorial revisions, annotations, elaborations, or other modifications represent, as a
whole, an original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by name) to the
interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of
authorship, including the original version of the Work and any modifications or additions to
that Work or Derivative Works thereof, that is intentionally submitted to Licensor for
inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized
to submit on behalf of the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent to the Licensor or its
representatives, including but not limited to communication on electronic mailing lists,
source code control systems, and issue tracking systems that are managed by, or on behalf
of, the Licensor for the purpose of discussing and improving the Work, but excluding
communication that is conspicuously marked or otherwise designated in writing by the
copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any
individual or Legal Entity on behalf of whom a Contribution has been received by Licensor
and subsequently incorporated within the Work.
2.
Grant of Copyright License. Subject to the terms and conditions of this License, each
Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
694
Grant of Patent License. Subject to the terms and conditions of this License, each
Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable (except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies
only to those patent claims licensable by such Contributor that are necessarily infringed by
their Contribution(s) alone or by combination of their Contribution(s) with the Work to
which such Contribution(s) was submitted. If You institute patent litigation against any
entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory patent
infringement, then any patent licenses granted to You under this License for that Work shall
terminate as of the date such litigation is filed.
4.
Redistribution. You may reproduce and distribute copies of the Work or Derivative Works
thereof in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:
i.
You must give any other recipients of the Work or Derivative Works a copy of this
License; and
ii.
You must cause any modified files to carry prominent notices stating that You changed
the files; and
iii.
You must retain, in the Source form of any Derivative Works that You distribute, all
copyright, patent, trademark, and attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of the Derivative Works; and
iv.
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative
Works that You distribute must include a readable copy of the attribution notices
contained within such NOTICE file, excluding those notices that do not pertain to any
part of the Derivative Works, in at least one of the following places: within a NOTICE
text file distributed as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or, within a display
generated by the Derivative Works, if and wherever such third-party notices normally
appear. The contents of the NOTICE file are for informational purposes only and do not
modify the License. You may add Your own attribution notices within Derivative Works
that You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as modifying the
License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or distribution of
Your modifications, or for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with the conditions stated in
this License.
5.
6.
Trademarks. This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for reasonable and
customary use in describing the origin of the Work and reproducing the content of the
NOTICE file.
695
7.
8.
Limitation of Liability. In no event and under no legal theory, whether in tort (including
negligence), contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for
damages, including any direct, indirect, special, incidental, or consequential damages of any
character arising as a result of this License or out of the use or inability to use the Work
(including but not limited to damages for loss of goodwill, work stoppage, computer failure
or malfunction, or any and all other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in
writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
excanvas by Google
Copyright 2006 Google Inc. Licensed under the Apache License, Version 2.0 (see above). You
may not use this file except in compliance with the License.
Martin Wendt. Dual licensed under the MIT (see above) or GPL Version 2 licenses.
flot by MIT
Javascript plotting library for jQuery. Released under the MIT license (see above) by IOLA,
December 2007.
697
Alphabetical Index
A
access rules, 316
accounting, 77
advanced settings, 82
and high availability, 81
configuring, 79
interim messages, 79
limitations with NAT, 82
messages, 77
messages frequency, 79
security, 81
system shutdowns, 82
address book, 103
addresses group, 106
Ethernet MAC addresses, 106
folders, 108
IP addresses in, 104
address group, 106
address groups
excluding addresses, 107
address translation, 427
admin account, 32
changing password for, 44
multiple logins, 33
advanced settings, 655
ARP, 154
connection timeout, 667
DHCP relay, 310
DHCP server, 304
fragmentation, 672
fragment reassembly, 676
hardware monitoring, 90
high availability, 645
ICMP, 664
IP level, 655
IPsec, 541
IPv6, 110
L2TP/PPTP, 552
length limit, 669
logging, 75
memory monitoring, 92
RADIUS, 82
remote management, 61
routing, 220
SNMP, 89
state, 665
TCP level, 659
transparent mode, 299
VLAN, 139
Alarm Repeat Interval setting, 76
Alert Level setting, 93
ALG, 320
deploying, 320
FTP, 325
H.323, 359
HTTP, 321
POP3, 345
PPTP, 346
SIP, 348
SMTP, 336
TFTP, 335
TLS, 375
698
Alphabetical Index
databases, 460
HTTP, 475
identity awareness agent, 486
local user database, 460
rules, 472
setup summary, 460
source, 473
SSH client key usage, 462
user identity awareness, 483
using IP address objects, 460
using LDAP, 465
using RADIUS, 463
XAuth, 473
Auto Add Multicast Route setting, 279
autonomous system (see OSPF)
Auto Save Interval (DHCP) setting, 311
Auto Save Policy (DHCP) setting, 311
auto-update, 97
B
backing up configurations, 97
bandwidth guarantees, 596
banner files
for web authentication, 479
for web content filtering, 395
parameters, 395, 480
SCP access, 54
blacklisting
hosts and networks, 424
URLs, 380
wildcarding, 380
with IDP, 413
with threshold rules, 613
Block 0000 Src setting, 656
Block 0 Net setting, 656
Block 127 Net setting, 656
blocking applications with IDP, 405
Block Multicast Src setting, 656
boot menu (see console boot menu)
BOOTP, 309
BPDU relaying, 298
C
CAM Size setting, 299
CAM To L3 Cache Dest Learning setting, 299
CA servers
access, 574
client access, 575
disabling validation, 576
private server placement, 576
certificates, 183
CA authority, 183
certificate chains, 184
certificate requests, 187
identification lists, 521
intermediate, 184
revocation list, 184
self-signed, 498, 528
the certificate cache, 184
uploading, 186
validity, 184
with IPsec, 502
VPN troubleshooting, 578
chains (in traffic shaping), 586
CLI, 31, 38
appending property values, 41
699
Alphabetical Index
D
date and time, 189
Deactivate Before Reconf (HA) setting, 645
dead peer detection, 525
Decrement TTL setting, 299
default access rule, 209, 316
Default TTL setting, 657
demilitarized zone (see DMZ)
denial of service attacks, 419
amplification attacks, 421
distributed attacks, 423
fragmentation overlap, 420
from IP spoofing, 317
ping of death attacks, 419
TCP SYN flood attacks, 422
destination RLB algorithm, 231
DHCP, 302
displaying server info, 305
HA synchronization support, 640
leases, 302
multiple servers, 303
over Ethernet, 131
relay advanced settings, 310
relaying, 309
relay with transparent mode, 289
server advanced settings, 304
server blacklist, 306
servers, 303
static host assignment, 306
with transparent mode, 289
DHCPv6
HA synchronization support, 640
DH groups, 514
diagnostic tools
pcapdump, 94
diffie-hellman (see DH Groups)
diffserv, 585
Directed Broadcasts setting, 658
distance vector algorithms, 238
DMZ, 442
DNS, 196
dynamic lookup, 197
DNS black lists for Spam filtering, 340
documentation, 21
DoS attack (see denial of service attacks)
downloading files with SCP, 53
DPD Expire Time (IPsec) setting, 543
DPD Keep Time (IPsec) setting, 543
DPD Metric (IPsec) setting, 543
drop all IP rule, 160
Drop IP rule, 162
Dropped Fragments setting, 673
DSCP, 585
in setting precedence, 593
DST End Date setting, 195
DST Offset setting, 194
DST Start Date setting, 194
Duplicated Fragment Data setting, 672
Duplicate Fragments setting, 673
dynamic balancing (in pipes), 599
Dynamic CAM Size setting, 299
dynamic content filtering (see web content filtering)
dynamic DNS, 197
Dynamic High Buffers setting
with high availability, 638
E
Enable Sensors setting, 90
end of life procedures, 100
ESMTP extensions, 338
Ethernet interface, 129
changing IP addresses, 133
CLI command summary, 134
default gateway, 130
disabling, 136
enabling, 136
IP address, 130
logical/physical difference, 133
promiscuous mode, 133
with DHCP, 131
evasion attack prevention, 409
events (see logging)
log messages, 69
log receiver types, 70
F
Failed Fragment Reassembly setting, 673
filetype download block/allow
in FTP ALG, 328
in HTTP ALG, 322
with IP policies, 323
Flood Reboot Time setting, 677
folders
with IP rules, 164
with the address book, 108
Fragmented ICMP setting, 674
FTP ALG, 325
command restrictions, 327
connection restriction options, 327
control channel restrictions, 328
filetype checking, 328
hybrid mode, 326
server IP setup for passive, 335
virus scanning, 329
FwdFast IP rule, 162
exclusion from traffic shaping, 588
with multiplex rules, 270
G
Generic Router Encapsulation (see GRE)
Grace time setting, 220
gratuitous ARP generation, 217
Gratuitous ARP on fail setting, 217, 221
GRE, 143
additional checksum, 143
and IP rules, 144
setting up, 143
tunneling multicast, 281
tunnel IP address advantages, 143
Grouping interval setting, 195
groups
configuration objects, 165
in authentication, 460
in pipes, 597
700
Alphabetical Index
H
H.323 ALG, 359
HA (see high availability)
hardware
monitoring, 90
monitoring message frequency, 76, 92
heartbeats (see high availability)
high availability, 626
advanced settings, 645
and accounting, 81
and high buffers setting, 638
both units going active, 629, 641
changing HA management IPs, 60
cluster ID, 641
cluster interconnections, 627
disabling heartbeat sending, 629
forcing resynchronization, 631
hardware setup, 633
heartbeats, 629
IP4 HA Address objects, 633, 635, 636
IP6 HA Address objects, 637
issues, 640
link monitor usage, 644
making OSPF work, 641
manual setup, 636
mechanisms, 629
promiscuous mode, 133, 630
setting up, 633
set unique management IPs, 633
slave becomes master, 636
swapping out the master, 635
sync interface failure, 631
unique shared MAC, 638
unused interface problem, 629, 641
upgrading NetDefendOS, 642
with IDP and anti-virus, 630
with IPv6, 115
with link monitoring, 85
with transparent mode, 289
wizard setup, 635
VPN tunnel synchronization, 640
High Buffers setting
with high availability, 638
host monitoring
for route failover, 218
HTML pages
content filtering customizing, 395
web auth customizing, 479
HTTP
ALG, 321
authentication, 475
enforcing SafeSearch, 323
whitelist precedence, 323
HTTP poster, 197
HTTPS Certificate setting, 62
HTTP URI normalization in IDP, 409
I
ICMP ping (see ping)
ICMP Sends Per Sec Limit setting, 664
ICMP Unreachable message, 163
IDENT and IP rules, 162
identification lists, 521
identity awareness agent, 486
IDP, 405
701
Alphabetical Index
L
L2TP, 545
advanced settings, 552
client, 552
M
MAC address, 148
in the address book, 106
with ARP, 148
with ARP publish, 150
702
Alphabetical Index
management access
changing access rule/IP address, 56
changing a remote access rule, 59
changing HA management IPs, 60
changing the interface IP, 58
changing validation timeout, 58
default IP address, 56
VPN routing problem, 38
management interfaces, 31
advanced settings, 61
and IPv6, 114
configuring remote access, 47
managing NetDefendOS, 31
Max AH Length setting, 669
Max Auto Routes (DHCP) setting, 311
Max Concurrent (reassembly) setting, 676
Max Connections (reassembly) setting, 677
Max Connections setting, 666
Max ESP Length setting, 669
Max GRE Length setting, 669
Max Hops (DHCP) setting, 311
Max ICMP Length setting, 669
Max IPIP/FWZ Length setting, 670
Max IPsec IPComp Length setting, 670
Max L2TP Length setting, 670
Max lease Time (DHCP) setting, 311
Max Memory (reassembly) setting, 677
Max OSPF Length setting, 670
Max Other Length setting, 670
Max Pipe Users setting, 677
Max PPM (DHCP) setting, 310
Max PPP Resends setting, 552
Max Radius Contexts setting, 82
Max Reassembly Time Limit setting, 674
max sessions
services parameter, 122
Max Size (reassembly) setting, 676
Max SKIP Length setting, 670
Max TCP Length setting, 669
Max time drift setting, 195
Max Transactions (DHCP) setting, 310
Max UDP Length setting, 669
memlog (see logging)
Memory Log Repetition setting, 93
memory monitoring settings, 92
Memory Poll Interval setting, 92
Memory Use Percent setting, 92
MIB
for traps, 74
MIME filetype verification
in FTP ALG, 328
in HTTP ALG, 322
in POP3 ALG, 345
in SMTP ALG, 336
list of filetypes, 687
Min Broadcast TTL setting, 658
Minimum Fragment Length setting, 674
multicast, 268
address translation, 272
forwarding, 269
IGMP, 273
promiscuous mode, 133, 268
Receive Multicast Traffic setting, 269
reverse path forwarding, 268
tunneling using GRE, 281
Multicast Mismatch setting, 658
Multicast TTL on Low setting, 656
multiple login authentication, 472
N
NAT, 429
anonymizing with, 434
IP rules, 162, 431
pools, 436
stateful pools, 436
traversal, 517
with an IP Policy, 432
neighbor discovery, 112
advanced settings, 115
cache, 115
timing settings, 116
network address translation (see NAT)
NTP (see time synchronization)
O
open shortest path first (see OSPF)
open source code requests, 697
OSPF, 238
aggregates, 243, 251
areas, 242, 248
autonomous system, 241
checking deployment, 257
CLI command, 266
command, 258
concepts, 241
dynamic routing rules, 252
interface, 249
logging options, 265
neighbors, 252
promiscuous mode, 133, 251
router process, 246
setting up, 255
troubleshooting, 264
virtual links, 243, 252
Other Idle Lifetimes setting, 668
overriding content filtering, 389
P
packet flow
description, 26
simplified, 161
password length, 44
pcapdump, 94
downloading output files, 95
output file cleanup, 95
output file naming, 95
pcap file format (see pcapdump)
phishing (see content filtering)
ping, 199
packet simulation with -srcif, 201
setting the source IP, 201
source interface selection, 199
testing TCP/UDP connectivity, 200
with IPv6, 114
Ping Idle Lifetime setting, 667
Ping poll interval setting, 220
pipe rules, 587
pipes, 586
policies, 158
IP policy, 169
Poll Interval setting, 90
703
Alphabetical Index
Q
QoS (see quality of service)
quality of service, 585
R
RADIUS
accounting, 77
advanced settings, 82
allow on error setting, 81
authentication, 463
primary retry interval, 464
setting source IP, 464
setting the vendor ID, 464
unresponsive servers, 81
vendor ID, 80
Reassembly Done Limit setting, 674
Reassembly Illegal Limit setting, 675
Reassembly Timeout setting, 674
Receive Multicast Traffic setting, 269
reconf CLI command, 46
Reconf Failover Time (HA) setting, 85, 645
Reject IP rule, 162
Relay MPLS setting, 300
Relay Spanning-tree BPDUs setting, 299, 300
restarting NetDefendOS
with the CLI, 46
restore to factory defaults, 99
restoring backups, 97
reverse path forwarding (see multicast)
reverse route lookup, 161, 209, 316
S
SA (see security association)
SafeSearch enforcement, 323
SafeStream anti-virus database, 400
SAT, 440
all-to-one IP translation, 450
IP rules, 162
many-to-many IP translation, 446
multiplex rule, 269
one-to-one IP translation, 442
port forwarding, 440
port translation, 452
translating source and destination, 441
untranslated IP in second rule, 440
using an IP policy, 454
with FwdFast rules, 453
schedules, 180
SCP, 53
allowable operations, 53
backup/restore usage, 98
command format, 53
uploading certificates, 186
scripting (see CLI scripts)
Secondary Time Server setting, 195
secure copy (see SCP)
SecuRemoteUDP Compatibility setting, 657
secure shell (see SSH)
security/transport enabled option, 147
security association, 508
Send Limit setting, 75
serial console (see console)
serial console port, 43
server load balancing, 615
connection-rate algorithm, 617
704
Alphabetical Index
renegotiation, 375
running the client, 568
setting client routes, 573
specifying client default gateway, 571
using CA signed certificates, 568
with LDAP, 469
with PPPoE, 565
state-engine, 22
packet flow, 26
stateful inspection (see state-engine)
stateful NAT pools (see NAT)
Static address translation (see SAT)
Static ARP Changes setting, 155
Strip DontFragment setting, 658
subscriptions
expiry behavior, 681
switch routes (see transparent mode)
Sync Buffer Size (HA) setting, 645
Sync Pkt Max Burst (HA) setting, 645
SYN flood protection, 121, 422
syslog (see logging)
RFC5224 compliance, 72
setting the hostname, 73
system backup/restore, 97
System Contact (SNMP) setting, 89
System Location (SNMP) setting, 90
System Name (SNMP)setting, 89
T
tab completion (see CLI)
TCP Auto Clamping setting, 660
TCP ECN setting, 662
TCP FIN/URG setting, 662
TCP FIN Idle Lifetime setting, 667
TCP Idle Lifetime setting, 667
TCP MSS Log Level setting, 659
TCP MSS Max setting, 659
TCP MSS Min setting, 659
TCP MSS On High setting, 659
TCP MSS on Low setting, 659
TCP MSS VPN Max setting, 659
TCP NULL setting, 662
TCP Option ALTCHKDATA setting, 661
TCP Option ALTCHKREQ setting, 660
TCP Option Con Timeout setting, 661
TCP Option Other setting, 661
TCP Option SACK setting, 660
TCP Option Sizes setting, 659
TCP Option TSOPT setting, 660
TCP Option WSOPT setting, 660
TCP Reserved Field setting, 662
TCP Sequence Numbers setting, 663
TCP SYN/FIN setting, 662
TCP SYN/PSH setting, 661
TCP SYN/RST setting, 661
TCP SYN/URG setting, 661
TCP SYN Idle Lifetime setting, 667
TCP URG setting, 662
TCP Zero Unused ACK setting, 660
TCP Zero Unused URG setting, 660
Tertiary Time Server setting, 195
TFTP ALG, 335
third party software licenses, 692
threshold rules, 612, 650
in zonedefense, 650
time synchronization, 191
Time Sync Server Type setting, 195
705
Alphabetical Index
U
UDP Bidirectional Keep-alive setting, 667
UDP Idle Lifetime setting, 667
UDP Source Port 0 setting, 677
Unknown VLAN Tags setting, 139
unnumbered PPPoE, 141
Unsolicited ARP Replies setting, 155
upgrading NetDefendOS
with an HA cluster, 642
uploading files with SCP, 53
URL filtering
with HTTPS, 383
with URL filter objects, 382
user authentication (see authentication)
user identity awareness, 483
identity awareness agent, 486
monitoring, 488
with a terminal server, 487
Use Unique Shared Mac (HA) setting, 638, 645
V
Validation Timeout setting, 58, 62
virtual LAN (see VLAN)
virtual private networks (see VPN)
VLAN, 136
advanced settings, 139
license limitations, 139
port based, 137
trunk, 137
voice over IP
with H.323, 359
with SIP, 348
VoIP (see voice over IP)
VPN, 492
encryption, 493
IPsec, 508
key distribution, 494
planning, 494
quick start guide, 496
SSL VPN, 564
troubleshooting, 577
usage, 492
W
Warning Level setting, 93
Watchdog Time setting, 677
WCF (see web content filtering)
webauth, 475
web content filtering, 379
active content handling, 379
allowing TCP port 9998 access, 384
dynamic content filtering, 383
dynamic WCF and HTTPS, 388
dynamic WCF audit mode, 388
dynamic WCF fail mode, 386
dynamic WCF override, 389
dynamic WCF whitelisting, 385
setting up dynamic WCF, 386
site reclassification, 389
static content filtering, 380
subscription expiry behavior, 682
with IP policies, 390
with IP rules or IP policies, 379
web interface, 31, 33
access with CA signed certificates, 37
activating configuration changes, 37
cursor hover help, 36
default connection interface, 33
object cloning, 36
password caching prevention, 34
recommended browsers, 33
setting workstation IP, 33
WebUI (see web interface)
WebUI Before Rules setting, 61
WebUI HTTP port setting, 62
WebUI HTTPS port setting, 62
whitelisting
hosts and networks, 424
URLs, 380
wildcarding, 380
wildcarding
in blacklists and whitelists, 338, 380
in IDP rules, 412
in static content filtering, 324
Windows CA certificate requests, 187
wireshark with pcapdump, 96
X
X.509 certificates, 183
XAuth (see authentication)
Z
zonedefense, 647
switches, 649
706
Alphabetical Index
707