Chapter 9 Network Security Administration
Table of Contents This chapter describes how to manage the following network security components:
TCP Wrapper lets you control access to network services. TCP Wrapper intercepts an incoming network connection, and verifies whether the connection is allowed before passing the connection to the actual network daemon. For example, you can restrict access to a network service, such as telnet, to exclude all hosts outside of a local domain. After you modify the access to a service, you can use the Administration utility to test the modification. During installation, the TCP service entries in the /etc/inetd.conf file that match the service entries specified in the /usr/internet/security/config.tcp file are modified to include the TCP Wrapper (tcpd) daemon. The syntax of service entries in the /etc/inetd.conf file is:
On Tru64 UNIX Version 5.1 or later, the ProtocolName field for TCP services can be tcp or tcp6, depending on the type of socket that the network service is using (that is, AF_INET or AF_INET6). For example, the following entry appears in the /etc/inetd.conf file for the telnetd service after installation:
Notice the placement of the TCP Wrapper daemon, /usr/bin/tcpd, in this entry. Also notice that the ProtocolName field is tcp6. Services that specify tcp6 respond to both IPv4-enabled and IPv6-enabled clients over either network protocol. For more information, see the inetd.conf(4) reference page. Table 9-1 lists the network services that are wrapped by the Internet Express installation and the default access setting for each service. (Section explains how to modify access settings.) To see a list of the services that are wrapped on your system, select Display/Update Configuration from the TCP Wrapper Administration menu. The service name and description on this form are retrieved from the /usr/internet/security/config.tcp file. Depending on which services were installed on your system, you might not see all the services listed in this table. Table 9-1 Network Services Wrapped by Internet Express
You can use TCP Wrapper to control access to network services other than those wrapped by Internet Express, and include these additional services in the list displayed on the Display/Update Configuration form, as follows:
You can use the /usr/internet/security/deinstall.sh script to remove the TCP wrapper from all services in the inetd.conf file. To modify the access setting for a network service, follow these steps:
Figure 9-1 shows the TCP Wrapper Service Management form for the remote login server (rlogind). To deny access to rlogind for all users on your system, select the option button for “Access is allowed for nobody” and click Submit. To customize access to a service, select the option button for “Access is customized” and enter the access specification string in the accompanying field. For example:
In this example, any user in either the foo.fsu.edu or abc.company.com domain is allowed to log in remotely.
After you modify access to a service, follow these steps to test the modification:
After you complete the procedure, the utility displays a message of the following form:
Internet Express provides a set of security tools that help you reduce your system's vulnerability to Denial of Service (DoS) attacks. This chapter provides the following information:
Internet Express provides Denial of Service (DoS) tools that improve network security by detecting and preventing DoS attacks. A DoS attack is an attack against a Web site, a network, a system, or other service provider intended to disrupt its ability to provide services to its users. Software that performs a DoS attack overloads the service provider with requests for service until its capacity to respond to new service requests is exceeded. Legitimate requests for service are cannot access to the service until the attack is stopped. The Denial of Service Tools component provides a set of security tools for preventing and detecting DoS attacks. Although DoS attacks are not new to administrators, recent Distributed Denial of Service (Distributed DoS) attacks against well-known E-commerce sites (for example, Yahoo.com and Amazon.com) demonstrate the need for solutions. Distributed DoS attacks are characterized by the distributed nature of the attack. False requests for service are generated from a set of DoS agents or servers installed on multiple systems and networks, all working together to saturate the service provider with requests. These attacks are much harder to stop once they are initiated, because they make it much more difficult to identify the source of the attack. At present, there is no way to completely stop DoS and Distributed DoS attacks. Internet Express DoS tools, however, help you greatly reduce the possibility of DoS attacks.
Ingress filtering filters out any IP packets with untrusted source addresses before they have a chance to enter and affect your system or network. Egress filtering prevents IP packets with randomly generated source addresses from exiting your system or network, when one of your systems has been compromised and when the system is being used to perpetrate an attack against other systems. Ingress and Egress filtering are used to deter DoS attacks by eliminating and logging IP packets containing spoofed source addresses that arrive at a system from untrusted upstream or downstream network sources. These filtering methods do not protect against DoS attacks with IP packets that originate from trusted sources. They can, however, assist you in tracing the true source of the IP packets from a DoS attack, because an attacker must use a valid source address to reach your system or network when Ingress and Egress filtering is in effect. For detailed analyses of these filtering methods, see the following online documents:
Most Distributed DoS attacks attempt to hide the origin of the IP packets to disrupt service by using a randomly generated address for the source address of each IP packet (that is, forging the address). Others allow the attacker to control the IP packet source address that is created, potentially implicating innocent parties as the originators of the attack. Ingress and Egress filtering is implemented using Access filtering on Tru64 UNIX. (Section : Access Filtering). The FireScreen component can provide further IP packet logging and filtering capabilities on your gateways, routers, and firewalls. On systems with multiple interfaces, you can filter IP packets as they are routed between interfaces based on protocol, port number, and so forth. See Section : FireScreen Administration for more information on FireScreen. On Tru64 UNIX, Access filtering is the preferred means of filtering IP packets at a system, router, gateway, or firewall. This capability is provided with Tru64 UNIX Version 4.0F or later in the OSFCLINETxxx subset, where xxx represents the operating system version. Internet Express provides a user interface to access filtering. The interface is installed with the IAEADMxxx subset, where xxx represents the Internet Express version number. Use Access filtering to detect and prevent spoofed or forged IP packet attacks from accessing your system or network. When you enable Access filtering, the source address of each IP packet arriving at an interface is checked against filters defined in the ifaccess.conf file, and the action associated with the first matching filter is taken. If no filters are defined in the ifaccess.conf file, a default filter permits access to all IP packets on the interface. See the ifaccess.conf(4) reference page for information. Access filtering is enabled on each network interface on a system using the ifconfig command's filter and -filter options, respectively. See the ifconfig(8) reference page for information. Logging is performed by syslogd whenever a packet matches a filter with a denylog action specified in its filter definition. (See the syslogd(8) reference page.) Filtered packets are discarded and logged to a file specified by the kern.debug entry in the /etc/syslog.conf file. The default log file is /var/adm/syslog.dated/date/kern.log. See Section : Adding and Deleting Access Filters for information on adding (or deleting) Access filters and Section : Enabling and Disabling Access Filtering for information on enabling (or disabling) Access filters. Access the Denial of Service tools from the Administration utility as follows:
To add or delete Access filters, you must create Access filters for each network interface on your gateway, router, firewall, or system. You can use the Add Access Filters option to define the Ingress and Egress filtering that protects your administrative domain from DoS attacks originating from untrusted sources. The filters are defined in the ifaccess.conf file. Use the Add Access Filters form to add Access filters:
Depending on your networking environment, consider adding individual filters to deny access to source addresses listed in Table 9-3. Table 9-3 Potential Source Addresses to be Denied
Use the Delete Access Filters form to remove obsolete or syntactically incorrect filters created with the Add Access Filters form. You cannot enable Access filtering on an interface for syntactically incorrect filters or for network interfaces not configured and running.
Use the Enable/Disable Access Filtering form to enable and disable Access filtering on each network interface. You must use the Add Access Filters form and Delete Access Filters form to define filters for the interface before Access filtering can be enabled on the interface. (See Section : Adding Access Filters and Section : Deleting Access Filters, respectively.) In addition, the interface must be of type inet, it must be configured, and it must be in an UP state for Access filtering to be enabled on the network interface.
To enable (or disable) Access filtering:
If you add new filters with the Add Access Filters form after enabling Access filtering on an interface, before the new filters can take effect, you must disable and reenable existing Access filtering on that interface. If any filters are syntactically incorrect, you cannot enable Access filtering until the filter is correctly defined or deleted. The FireScreen menus and forms lead you through the process of installing, configuring, and enabling the FireScreen firewall. An Internet Protocol (IP) packet arriving at a gateway is routed by the system's routing daemon to the kernel for forwarding through a particular network interface. FireScreen filters routed packets by inhibiting the kernel IP forwarding functionality the based on screening rules stored in its configuration file. Use the FireScreen Administration menu to perform the following tasks:
Under Network Security on the Manage Components menu, choose FireScreen to access the FireScreen Administration menu, shown in Figure 9-7.
See Tuning Compaq Tru64 UNIX for Internet Services at the following URL for system tuning information that applies to gateways, routers, and systems performing packet filtering (in this case, FireScreen): http://www.tru64unix.compaq.com/docs/internet/TITLE.HTM To install FireScreen, follow these steps:
To configure FireScreen, on the FireScreen Administration menu, choose Configure FireScreen. Figure 9-12 shows the Configure FireScreen menu. Use the Configure FireScreen menu to perform the following tasks:
To set the command-line options for FireScreen, follow these steps:
For more information on specifying command-line options for FireScreen, see the screend(8) reference page.
To set the screening mode for FireScreen, follow these steps:
As long as screening mode is enabled, your system is protected from unauthorized access. Screening rules determine which IP packets are allowed to pass through the gateway to your network and which packets are to be rejected. By default, all IP packets are rejected. You can add screening rules to the FireScreen configuration file to allow certain packets to be passed to your network. Screening rules are not checked for correct syntax at the time you add them; you must use the Check Screening Rules option on the Configure FireScreen menu to verify that the syntax of screening rules is correct. FireScreen searches screening rules in the order that the rules appear in the FireScreen configuration file, from first to last. Because action is taken on each packet as soon as a matching rule is found, place specific rules before general rules. If no matching rule is found, the action specified by the default rule is taken. The FireScreen Administration utility forces the default rule to be the last rule in the configuration file; you cannot add screening rules after the default rule. If the FireScreen configuration file contains conflicting screening rules, the IP packet is accepted or rejected based on the first rule encountered in the file that applies to that packet. You can also delete screening rules from the FireScreen configuration file. You must restart FireScreen for screening rule changes to take effect (Section : Starting and Stopping FireScreen). Before setting up your firewall using FireScreen Administration, you should read the following technical report on implementing TCP/IP security policies:
This report explains how FireScreen (which is based on the screend daemon) operates, what FireScreen can and cannot do to protect your network, and how to use screening rules to implement firewall security policies. To add a screening rule, follow these steps:
The Add New Screening Rule confirmation page confirms that the new screening rule has been added to the FireScreen configuration file and displays all screening rules, as shown in Figure 9-17. Note the order in which the screening rules are listed in the FireScreen configuration file. To return to the Add New Screening Rule form, use the navigation bar at the top of the screen. To check the syntax of screening rules, see Section : Checking Syntax of Screening Rules. To check the syntax of screening rules in the FireScreen configuration file, on the Configure FireScreen menu, choose Check Screening Rules. The existing screening rules are displayed and checked for syntax errors. Figure 9-18 shows the Check Screening Rules confirmation page. If screening errors are reported, you must use the Delete Screening Rules option on the Configure FireScreen menu to remove the offending rule from the FireScreen configuration file and then add the rule using correct syntax. For more information, see Section : Deleting a Screening Rule and Section : Adding a Screening Rule. To delete a screening rule from the FireScreen configuration file, follow these steps:
When you make changes to the FireScreen configuration file, you must restart FireScreen for the changes to take effect (Section : Starting FireScreen). When you stop FireScreen with screening mode enabled, all IP forwarding is rejected until FireScreen starts again (Section : Stopping FireScreen). The contents of the Start/Stop FireScreen form reflect the current state of the FireScreen daemon; the form updates immediately whenever the daemon's state changes. To start (or restart) FireScreen, choose Start/Stop FireScreen from the FireScreen Administration menu. The Start/Stop FireScreen form is displayed. The contents of the Start/Stop FireScreen form depend on the current state of the FireScreen daemon.
To protect your system from unauthorized access, the Administration utility starts a new FireScreen process, which reads the latest FireScreen configuration file, and then stops any FireScreen process that was previously running, as shown in the confirmation page (Figure 9-22). To stop FireScreen, follow these steps:
The confirmation page indicates that FireScreen is stopped (Figure 9-24). Using the View FireScreen Status menu, you can view the following:
To access this menu, choose View FireScreen Status from the FireScreen Administration menu. To view FireScreen screening rules in the FireScreen configuration file, from the View FireScreen Status menu, choose View Screening Rules. The screening rules and the line numbers they occupy in the FireScreen configuration file are displayed (Figure 9-25). If you need to modify a screening rule, you must first delete the rule and then add the modified rule. See Section : Checking Syntax of Screening Rules for information on the syntax for screening rules. To view the FireScreen log file, choose View Log from the View FireScreen Status menu. The contents of the FireScreen log file are displayed (Figure 9-26). When the log file requires more than one page, buttons are displayed at the top of the page to allow you to navigate through the log file To specify the types of events to be recorded in the FireScreen log file, access the Configure FireScreen menu and choose Set Options. See Section : Setting Command-Line Options for more information. FireScreen invokes the /usr/sbin/screenstat command to display statistics for IP packet handling. To view FireScreen statistics, choose View Statistics from the View FireScreen Status menu. The statistics are displayed (Figure 9-27). Snort is an intrusion detection system which enables you to log packets, and track network activity on IP networks. Snort files are installed in the following directories:
On Tru64 UNIX, Snort runs in two different modes: sniffer, packet logger, and network intrusion detection. Network intrusion detection currently does not work on Tru64 UNIX. In sniffer mode, Snort will continually read packets from the network and display them on the console. In packet logger mode, it will write the packets to a log file on disk.
There are several ways in which you may configure the Snort output. See the Snort Users Manual for details. The FreeRadiusUser Authentication tool scales from embedded systems with small amounts of memory, to systems with millions of users. It is configurable, and supports more authentication protocols than many commercial servers. This section describes the following FreeRADIUS Server Administration information:
For information on FreeRADIUS server, see the FreeRADIUS Web site: The installation procedure includes the build, install of the IAEFRAD subset. For more details, refer the Installation Guide. FreeRadius is installed in the /usr/local/radius directory. The configuration files exist in /usr/local/etc/raddb directory. When you install FreeRadius, all the necessary directories are created. You can run tests by using existing UNIX system accounts. Follow these steps to start or stop the FreeRADIUS Server.
Important functions of FreeRADIUS are controlled by configuration directives in the users file, radiusd.conf and clients.conf. Users FileThis file contains authentication security and configuration information for each user. Accounting requests are not processed through this file. Instead, see acct_users in the same directory. The first field is the user's name and can be up to 253 characters in length. This is followed (on the same line) with the list of authentication requirements for that user. This can include password, comm server name, comm server port number, protocol type (perhaps set by the hints file), and huntgroup name (set by the huntgroups file). If you are not sure why a particular reply is being sent by the server, then run the server in debugging mode (radiusd -X), and you will see which entries in this file are matched. When an authentication request is received from the comm server, these values are tested. Only the first match is used unless the Fall-Through variable is set to Yes. A special user named DEFAULT matches on all user names. You can have several DEFAULT entries. All entries are processed in the order they appear in this file. The first entry that matches the login-request will stop processing unless you use the Fall-Through variable. If you use the database support to turn this file into a .db or .dbm file, the DEFAULT entries have to be at the end of this file. You cannot have multiple entries for one user name. You do not need to specify a password if you set Auth-Type += System on the list of authentication requirements. The RADIUS server will then check the system password file. Indented (with the tab character) lines following the first line indicate the configuration values to be passed back to the comm server to allow the initiation of a user session. This can include things like the PPP configuration values or the host onto which the user will log on. You can include another users file with $INCLUDE users.other. The following example shows a typical users file entry format :
clients.conf fileThis file defines a RADIUS client (usually a NAS). The information given here over rides anything given in the clients file, or in the naslist file. The configuration here contains all of the information from those two files, and allows for more configuration items. The shortname is be used for logging. The nastype, login and password fields are mainly used for checkrad and are optional. This defines a RADIUS client. The format is as follows: 127.0.0.1 is another name for localhost. It is enabled by default, to allow testing of the server after an initial installation. If you are not going to be permitting RADIUS queries from localhost, you need to comment it out. Refer to /usr/local/etc/raddb/clients.conf for more information. radiusd.conf fileThis file contains values for multiple directives used by FreeRADIUS. Some of the directives are explained in the following sections.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||