SunScreen is shipped with a number of predefined network services. The table below lists the services in SunScreen, along with the state engine and discriminator (port, RPC program number, or type) for each service. Parameters (state engine modifiers, such as time-outs) and BROADCAST are indicated where applicable.
Service information is stored in the common object registry. See "add service" in Appendix B, Configuration Editor Reference.
Some of the services in the table are described at the end of this table. The * service is not included in the table, but is described in "* Service".
Service |
State Engine (forward filtering) |
Discriminator |
State Engine (reverse filtering) |
Discriminator |
---|---|---|---|---|
ah |
iptunnel |
IP protocol 51 |
|
|
archie |
udp |
port 1525 parameters (360 -1 0) |
|
|
auth |
tcp |
port 113 |
|
|
automount |
pmap_tcp pmap_udp rpc_tcp rpc_udp |
program no. 300019 program no. 300019 program no. 300019 program no. 300019 |
|
|
Backweb |
udp |
port 370 parameters (60 0 3) |
|
|
biff |
udp_datagram |
port 512 (BROADCAST) |
|
|
bootp |
udp |
port 67 (BROADCAST) parameters (60 0 3) |
|
|
certificate discovery |
udp |
port 1640 parameters (60 1 1) |
|
|
chargen |
tcp |
port 19 |
|
|
CoolTalk |
tcp udp_datagram |
ports 6499-6500 port 13000 |
udp_datagram |
port 13000 |
CU See Me |
udp_datagram |
ports 7648-7652 |
|
|
daytime |
tcp |
port 13 |
|
|
daytime-udp |
udp |
port 13 |
|
|
discard |
tcp |
port 9 |
|
|
discard-udp |
udp |
port 9 |
|
|
dns |
tcp |
port 53 |
|
|
|
dns |
port 53 |
|
|
echo |
tcp |
port 7 |
|
|
echo-udp |
udp |
port 7 |
|
|
esp |
iptunnel |
IP protocol 50 |
|
|
exec |
tcp |
program no. 512 |
|
|
finger |
tcp |
port 79 |
|
|
ftp |
ftp |
port 21 |
|
|
gopher |
tcp |
port 70 |
|
|
HA |
tcp |
port 3856 |
|
|
HA administration |
tcp |
port 3856 |
|
|
HA heartbeat |
ping |
port 8 |
|
|
icmp all |
icmp |
* |
|
|
icmp echo-reply |
icmp |
type 0 |
|
|
icmp echo-request |
icmp |
type 8 |
|
|
icmp exceeded |
icmp |
type 11 |
|
|
icmp info |
icmp |
types 13 14 15 16 17 18 |
|
|
icmp params |
icmp |
type 12 |
|
|
icmp quench |
icmp |
type 4 |
|
|
icmp redirect |
icmp |
type 5 |
|
|
icmp unreach |
icmp |
type 3 |
|
|
ip all |
ip |
* |
|
|
ip forward |
ipfwd |
* |
|
|
ip mobile |
ipmobile |
* |
|
|
ip tunnel3 |
iptunnel |
* |
|
|
ipv6 tunnel |
iptunnel |
IP protocol 41 |
|
|
irc |
tcp |
port 6670 |
|
|
|
tcp |
port 6680 |
|
|
isakmp |
udp |
port 500 |
|
|
kerberos |
udp |
port 88 |
|
|
klm |
rpc_udp |
program no. 100020 |
|
|
|
pmap_udp |
program no. 100020 |
|
|
lpd |
tcp |
port 2766 |
|
|
mountd |
rpc_udp |
program no. 100005 |
|
|
|
pmap_udp |
program no. 100005 |
|
|
netbios datagram |
udp_datagram |
port 138 |
|
|
netbios name |
udp |
port 137 |
|
|
netstat |
tcp |
Port 15 |
|
|
nfs acl |
rpc_udp |
program no. 100227 |
|
|
|
pmap_udp |
program no. 100227 |
|
|
nfs prog |
pmap_udp |
program no. 100003 |
|
|
|
tcp |
port 2049 |
|
|
|
udp |
port 2049 |
|
|
nfs readonly prog |
pmap_udp |
program no. 100003 |
|
|
|
nfsro |
port 2049 |
|
|
nicname |
tcp |
port 43 |
|
|
nlm |
rpc_udp |
program no. 100021 |
|
|
|
pmap_udp |
program no. 100021 |
|
|
|
|
|
rpc_udp |
program no. 100021 |
|
|
|
pmap_udp |
program no. 100021 |
nntp |
tcp |
port 119 |
|
|
ntp |
udp |
port 123 |
|
|
ntp-tcp |
tco |
port 123 |
|
|
ospf |
ip |
type 89 (BROADCAST) |
|
|
pcnfsd |
pmap_tcp pmap_udp rpc_tcp rpc_udp |
program no. 150001 program no. 150001 program no. 150001 program no. 150001 |
|
|
ping |
ping |
port 8 |
|
|
pmap tcp all |
pmap_tcp |
* |
|
|
pmap udp all |
pmap_udp |
* (BROADCAST) |
|
|
pop |
tcp |
ports 109-110 |
|
|
printer |
tcp |
port 515 |
|
|
quote |
tcp |
port 17 |
|
|
radius |
udp |
port 1645 |
|
|
real audio |
realaudio |
port 7070 |
|
|
remote administration |
tcp |
ports 3852-3853 |
|
|
rex |
rpc_udp |
program no. 100017 |
|
|
|
pmap_udp |
program no. 100017 |
|
|
rip |
udp_datagram |
port 520 port 520 (BROADCAST) |
|
|
rlogin |
tcp |
port 513 |
|
|
|
tcp_keepalive |
port 513 |
|
|
router announcement |
icmp |
type 9 type 9 (BROADCAST) |
|
|
router discovery |
icmp |
type 10 |
|
|
|
|
type 10 (BROADCAST) |
icmp |
type 9 type 9 (BROADCAST) |
router solicitation |
icmp |
type 10 type 10 (BROADCAST) |
|
|
rpc all |
rpc_udp |
* |
|
|
rpc tcp all |
rpc_tcp |
* |
|
|
rquota |
rpc_udp |
program no. 100011 |
|
|
|
pmap_udp |
program no. 100011 |
|
|
rsh |
rsh |
port 514 |
|
|
rstat |
rpc_udp |
program no. 100001 |
|
|
|
pmap_udp |
program no. 100001 |
|
|
rusers |
rpc_udp |
program no. 100002 |
|
|
|
pmap_udp |
program no. 100002 |
|
|
securid |
udp |
port 5500 |
|
|
SecurID PIN |
tcp |
port 3855 |
|
|
securidprop |
tcp |
port 5510 |
|
|
skip |
iptunnel |
type 57 |
|
|
|
|
type 79 |
|
|
|
|
* (BROADCAST) |
|
|
smtp |
tcp |
port 25 |
|
|
snmp |
tcp |
port 161 |
|
|
|
udp |
port 161 |
|
|
snmp traps |
udp_datagram |
port 162 |
|
|
spray |
rpc_udp |
program no. 100012 |
|
|
|
pmap_udp |
program no. 100012 |
|
|
sqlnet |
sqlnet |
port 1521 |
|
|
ssh |
tcp_keepalive |
port 22 |
|
|
ssl |
tcp |
port 443 |
|
|
status |
rpc_udp |
program no. 100024 |
|
|
|
pmap_udp |
program no. 100024 |
|
|
StreamWorks |
udp_datagram |
port 1558 |
|
|
|
|
|
udp_datagram |
port 1558 |
syslog |
udp_datagram |
port 514 |
|
|
syslog |
udp_datagram |
port 514 |
|
|
systat |
tcp |
port 11 |
|
|
tcp all |
tcpall |
ports 0-3850 |
|
|
|
|
ports 3854-65535 |
|
|
tcp-high-ports |
tcp |
ports 1024-65535 |
|
|
telnet |
tcp |
port 23 |
|
|
|
tcp_keepalive |
port 23 |
|
|
tftp |
udp |
port 69 parameters (60 -1 7) |
|
|
time |
tcp |
port 37 |
|
|
time-udp |
udp |
port 37 |
|
|
traceroute |
udp_datagram |
ports 33430-34000 |
|
|
|
|
|
icmp |
type 11 |
|
|
|
icmp |
type 3 |
tsolpeerinfo_tcp |
pmap_tcp |
port 110002 |
|
|
|
rpc_tcp |
port 110002 |
|
|
tsolpeerinfo_udp |
pmap_udp |
port 110002 |
|
|
|
rpc_udp |
port 110002 |
|
|
udp all |
udpall |
* |
|
|
udp-high-ports |
udp |
ports 1024-65535 |
|
|
uucp |
tcp |
port 540 |
|
|
VDOLive |
tcp tcp |
port 7000 port 7010 |
|
|
|
|
|
udp |
port 32649 |
Vosaic |
tcp |
port 1235 |
|
|
|
|
|
udp_datagram udp_datagram |
ports 61801-61820 ports 20000-20020 |
wais |
tcp |
port 210 |
|
|
wall |
rpc_udp |
program no. 100008 |
|
|
|
pmap_udp |
program no. 100008 |
|
|
who |
udp_datagram |
port 513 (BROADCAST) |
|
|
whois |
tcp |
port 43 |
|
|
www |
tcp |
port 80 |
|
|
X11 |
tcp |
ports 6000-6063 |
|
|
|
tcp_keepalive |
ports 6000-6063 |
|
|
ypbind |
rpc_udp |
program no. 100007 |
|
|
|
pmap_udp |
program no. 100007 |
|
|
yppasswd |
rpc_udp |
program no. 100009 |
|
|
|
pmap_udp |
program no. 100009 |
|
|
ypserv |
nis |
port 100004 |
|
|
|
pmap_nis |
program no. 100004 |
|
|
|
pmap_nis |
program no. 100004 (BROADCAST) |
|
|
ypupdate |
rpc_udp |
program no. 100028 |
|
|
|
pmap_udp |
program no. 100028 |
|
|
ypxfrd |
pmap_tcp |
program no. 100069 |
|
|
|
pmap_udp |
program no. 100069 |
|
|
|
rpc_tcp |
program no. 100069 |
|
|
|
rpc_udp |
program no. 100069 |
|
|
The * service is a special type of internal service which has some of the characteristics of a service group. It includes a number of services, as shown in the list below, but those services are not displayed when you list services in the configuration editor or the GUI, and you cannot edit the services in *.
The * service, which acts as if each of its services were in separate rules, is designed to allow anything through, but it attempts to use the best service first, thereby providing better security. For example, the ftp state engine enforces the proper use of the stateful FTP protocols, in contrast to ipmobile, which does not inspect packets according to any of the stateful protocols. Note that ipmobile, which allows any IP traffic initiated by the source address, is the last service in the list of * services:
nis
pmap_nis
pmap_dup
pmap_tcp
rpc_tpc
rpc_udp
realaudio
rsh
ftp
tcp
tcpall
dns
udp_datagram
udp
udpall
ping
icmp
ipmobile
IPsec Authentication Header (ah) uses IP protocol 51 and is used for traffic that has been authenticated using IPsec.
SunScreen contains a service definition to handle the Archie UDP protocol. To screen Archie traffic, use the archie service.
The CoolTalk service definition allows calls to be initiated but does not allow calls to be received. To receive calls, define a second rule with the addresses reversed. For example:
CoolTalk joe sam allow CoolTalk sam joe allow |
DNS traffic consists of both UDP and TCP traffic. SunScreen includes a state engine to handle the UDP DNS protocol. TCP DNS is handled through the normal TCP state engine. To screen DNS traffic, use the predefined dns service.
IPsec Encapsulating Security Payload (esp) uses IP protocol 50 and is used for traffic that has been encrypted or authenticated using IPsec.
The File Transfer Protocol (FTP) is used to copy files from one system to another. FTP is designed to work between hosts using different file structures and character sets.
SunScreen contains an ftp state engine to screen the FTP data connection. You specify the number for the FTP control port; the number for the FTP data port is one less than the FTP control port number. The predefined FTP service definition, ftp, uses the standard FTP control port number (21) and data connection port number (20).
FTP control connections time out after a period of inactivity. The FTP server typically closes the connect before this inactivity timeout occurs; however, if the timeout period elapses, the quit command can take 60 seconds or more to complete. During this time, FTP packets may be logged.
The ftp service supports both PASV and standard FTP connections. By default, the ftp service verifies that the FTP data port is 20 for standard FTP connections. To communicate with FTP servers that do not use port 20 for the data port, modify the ftp service definition to set its three parameters to: 600 600 1. The first parameter is the control session timeout (600 seconds). The second parameter is the data session timeout (600 seconds). The third parameter is a flag; a value of 1 specifies that the system will not verify that the FTP data port is 20.
Note that this does not affect PASV FTP sessions, because they never use port 20 for the data connection.
SunScreen provides predefined services for screening ICMP packets including ping.
The icmp state engine can also be used to create other services to pass ICMP messages of a specific type. Most of the common ICMP packets have entries in the predefined services.
These rules allow Inside systems to ping Outside systems, but not vice versa. It also allows ICMP unreachable packets to be sent from Outside systems to Inside systems. Note that the ping service allows packets in two directions (ping-requestpackets from Source to Destination and ping-response packets from Destination to Source) while the icmp-unreach service only allows packets to flow in one direction (from Source to Destination).
SunScreen includes predefined services for screening ICMP packets such as ping. These services use the icmp state engine and allow ICMP ping request-and-response exchanges between a Source and Destination system. Use the predefined service ping if you want to provide ping access.
You can use the icmp state engine to create other services to pass ICMP messages of a specific type. Most of the common ICMP packets have entries in the predefined services, as shown in the table:
Service |
Source |
Destination |
Action |
---|---|---|---|
ping | Inside | Outside | allow |
icmp-unreach | Outside | Inside | allow |
These rules allow Inside systems to ping Outside systems, but block Outside systems from sending ping messages to Inside systems. It also allows ICMP unreachable packets to be sent from Outside systems to Inside systems. Note that the ping service allows packets in two directions (ping-request packets from Source to Destination and ping-response packets from Destination to Source), while the icmp-unreach service only allows packets to flow in one direction (from Source to Destination).
SunScreen can filter IP packets by IP protocol type alone. This is useful in special situations such as passing non-TCP/UDP protocols or when data are being encrypted.
To pass IP packets by protocol type, you need to define a new service using either the ip, ip tunnel, ip mobile, or ip fwd state engine. Specify the protocol of the packets you wish to pass. Note that protocol is always specified in decimal notation. If you specify * for the protocol, this means to pass all IP packets regardless of protocol type.
There are several predefined services included, such as skip (IP protocols 79 and 57), ip tunnel, ip mobile, and ip fwd.
Using one of the state engines with a protocol specification of * (any protocol), can be dangerous, because any traffic would be allowable. State engines should only be used in special cases or if the data are part of an encrypted tunnel.
The predefined IP services do not pass broadcast traffic. To pass broadcast traffic, you must define a new service or add broadcast to the predefined service.
The ip all service is provided for backward compatibility with previous SunScreen products. You can achieve better performance by using either the ip forward (for IP traffic in one direction) or the ip tunnel (for IP traffic in both directions) services instead.
Example of the old method using ip all:
"ip all" host1 host2 allow "ip all" host2 host1 allow |
Example of the new method using ip tunnel:
"ip tunnel" host1 host2 allow |
The ip mobile service is provided for use with mobile, remote clients. Like the ip tunnel service, ip mobile passes all IP traffic between a pair of addresses. Unlike the ip tunnel service, however, a rule specifying ip mobile forces the first connection to be made from the mobile client (a system with one of the addresses in Source Address).
Generally, ip mobile is used for SKIP-encrypted connections with the SKIP identity providing the authentication and access control. For example:
"ip mobile" Internet Mailhost SKIP-VERSION2 |
SunScreen can filter IP packets by IP protocol type alone. This is useful in special situations such as passing non-TCP/UDP protocols or when data are being encrypted.
If you want a Screen to pass IP packets by protocol type, you define a new service using either the ip, ip tunnel, ip mobile, or ip fwd state engine. Specify the protocol of the packets you wish to pass in decimal notation. If you specify * for the protocol, the service will pass all IP packets regardless of protocol type.
There are several predefined services included, such as skip (IP protocols 79 and 57), ip tunnel, ip mobile, and ip fwd.
Using one of the state engines with a protocol specification of * (any protocol), can be dangerous, because any traffic would be allowable. State engines should only be used in special cases or if the data are part of an encrypted tunnel.
The predefined IP services do not pass broadcast traffic. To pass broadcast traffic, you must define a new service or add broadcast to the predefined service.
ipsec is a service group that comprises the three packet types that are used in IPsec secure communication.
Internet Security Association and Key Management Protocol provides communication between security processes such as IKE key negotiation.
ipv6 uses IP protocol 41 and carries encapsulated IPv6 packets over an IPv4 link such as the Internet.
The nfs readonly service allows read-only access to the NFSv3.0 file system. Read-related functions, such as lookup, read, and access, are allowed. Functions that are not read-related, such as rename and write, are blocked; traffic is not permitted to pass under the nfs readonly rule.
To screen NTP traffic, use the ntp service. SunScreen contains a state engine to handle the NTP protocol. The source and destination UDP ports numbers are fixed at port 123. Broadcast NTP is not supported.
SunScreen contains a service definition to handle RealAudio sessions. To screen RealAudio traffic, use the realaudio service.
The Routing Information Protocol (RIP) is a dynamic routing protocol commonly used by Internet routers. RIP messages are carried in UDP datagrams. SunScreen includes a predefined service (rip) for passing RIP packets using the udp-datagram state engine with broadcast enabled. This means that a rule allows RIP packets (including broadcasts) from source to destination.
Enabling RIP in the default rule that passes RIP from the routers to all other addresses is usually sufficient. This enables the Screen to send and receive RIP packets without restriction. To restrict RIP traffic, do not enable RIP using the default access rules. Instead, define rules for RIP based on your security policy, for example:
Service |
Source |
Destination |
Action |
---|---|---|---|
route | routers | * | allow |
route | * | routers | allow |
SunScreen contains a state engine to handle the RPC protocols. This can safely screen RPC protocol as long as they use the portmapper and do not use dynamic RPC program values.
To define a new RPC service, add a new service entry using both the rpc_udp and pmap_udp state engines. You specify the well-known RPC program of the RPC service you wish to pass. If you specify * for the RPC program, the service entry passes all RPC services, regardless of program.
Several well-known RPC services such as NFS and NIS have been defined to include all the RPC and non-RPC protocols that these systems require.
Some NFS clients use the lock manager. Because the lock manager makes connections in both directions (to NFS server and from NFS server), you may need to use the nlm service when you allow NFS access as shown in the following example:
Service |
Source |
Destination |
Action |
---|---|---|---|
nfs | Inside | DMZ | allow |
nlm | DMZ | Inside | allow |
Broadcast port mapping (NIS) is not supported for encrypted connections.
Simple Mail Transfer Protocol (SMTP) is used to send electronic mail between two message transfer agents using TCP. SunScreen includes a predefined service definition, smtp, to send and receive SMTP mail on TCP port 25.
SunScreen contains an sqlnet state engine to screen Oracle SQL*Net protocol. SQL*Net is Oracle's remote data access protocol that enables client-server and server-server communications across networks.
An Oracle client connects to the server using the port address of the listener, which is normally defined as TCP port 1521 during Oracle installation. sqlnet service is defined as using TCP port 1521. If Oracle is installed using a different port for the listener, you can modify the service definition for sqlnet service accordingly.
SQL*Net connections are established in two ways. An Oracle client connects to the listener using TCP port 1521, and the connection is established with the listener process. With Oracle multithreaded servers and prespawned server processes, the client connects to the listener on TCP port 1521. The listener issues a redirect message back to the client containing an IP address and port number, and the client connects to this redirected IP address and port.
SunScreen supports both types of SQL*Net connections.
SunScreen screens TCP services by destination port numbers. Most common TCP services are already defined in the service entries supplied with SunScreen.
To define a new TCP service, define a new service entry specifying the tcp filter state system. Specify the destination TCP port or ports of the service you wish to pass. If you specify * for the port, the service will pass all TCP services regardless of port. Note that some services, such as FTP and RSH, cannot be passed in this way. They are not simple TCP protocols. They make additional connections in the reverse direction. These services must be specified as separate services if you wish to pass them.
The tcp state engine times out unused and silent connections five hours after a connection has been established. Some systems repeatedly retransmit until they receive an error about a terminated TCP connection. To send an ICMP rejection message, therefore, configure a rule using the tcp service, especially on your internal interfaces.
For example, the following rule allows telnet connections to be made from Inside systems to Outside systems.
Service |
Source |
Destination |
Action |
---|---|---|---|
telnet |
Inside |
Outside |
allow |
The traceroute service entry assumes that the UDP ports being used for traceroute are in the range of 33430-34000. If implementations of traceroute at your site use other ports, modify the port range as appropriate.
When two Trusted Solaris systems communicate with each other using the TSOL protocol, they typically use rpc program 110002 to exchange process attributes for peer processes. The entry in /etc/rpc is tsolpeerinfo 110002 rpc.getpeerinfo peerinfod.
If this service is blocked, services do not work. A connection is established, but Trusted Solaris waits for a response from peerinfod for additional information. Until it gets that response, the connection cannot proceed. The tsolpeerinfo service prevents this problem by ensuring that this service can be initiated from both sides of a connection through a firewall.
A server (ftpd, telnetd, etc., for example) spawned by inetd requests the audit attributes of a connecting client from a Trusted Solaris system. The server sends a getpeerinfo RPC back to the client, which responds with the required information. For example, to allow telnet through the firewall from HostA to HostB, but not from HostB to HostA, your rule base must include the following three rules:
1 telnet HostA HostB ALLOW
2 tsolpeerinfo HostA HostB ALLOW
3 tsolpeerinfo HostB HostA ALLOW
Without the tsolpeerinfo rules, the telnet connection appears to connect and hang. Note that if your rules involve encryption, the tsolpeerinfo rules must be modified to include the relevant encryption parameters as well.
Alternatively, you could define a group--HostA+B--containing both hosts. Rules 2 and 3 could then be combined to form the following rule:
2 tsolpeerinfo HostA+B HostA+B ALLOW
The tsolpeerinfo service does not work with dynamic NAT. Assume a client goes through a firewall and its address is dynamically changed with NAT. The server tries to getpeerinfo to the NAT address. Since this is a new connection initiated from a server that is unassociated with any state engine, this connection is dropped. There is no way to "de-NAT" the connection.
See the Trusted Solaris installation instructions in SunScreen 3.2 Installation Guide for details about installing SunScreen on a system running Trusted Solaris.
SunScreen contains several state engines to handle UDP protocols:
udp - Provides stateful UDP packet filtering. Allows a single request-and-response exchange between source and destination. State entries time out in 20 seconds if no response is received.
udpall - Identical to udp. It is useful for avoiding conflicts while defining service groups containing many services.
udp_datagram - Passes UDP packets from source to destination. You can specify that broadcast packets should be passed.
udp_stateless - Allows UDP packets to be sent between source and destination. The UDP Port(s) field specifies the list of destination UDP ports that are allowed. The source UDP port must be a unreserved port. Note that this is a two-way exchange of UDP packets.
Because some services use unreserved port numbers, use of this state engine can open up security holes. Its use is not recommended.
For all UDP engines, you define a new service entry specifying the well-known destination, UDP port. Specifying port * passes all UDP traffic.
The VDOLive service definition requires that the VDOLive clients be set to use a fixed port, which is port 32649 by default. You can modify the service definitions so that VDOLive will use another port.
The World Wide Web provides a graphical user interface that enables users to browse a global network of services and documents. SunScreen contains a predefined service definition for WWW that passes TCP connections on port 80.
Not all WWW services on the Internet use port 80; many reside on ports with other numbers, such as 8000 or 8080. If you only allow outbound WWW access under the www service entry, users cannot connect to all WWW resources. To compensate, you can define a new TCP service that enumerates additional nonstandard WWW ports you want to allow, or you can allow TCP access to all ports outbound using the default service.
Do not use the tcp all service to enable inbound www access to your public Web servers. This opens up a large security hole and allows outside users access to any TCP service on your systems. Instead, use a more restrictive service rule, such as the www service definition, with the port your Web server uses (generally port 80).