AppleShare IP 6.1: TCP Filtering

This article describes how to use the TCP Filter Admin program to control access to the ASIP 6.1 server. It includes the following sections:

  • What is TCP Filtering?
    • System requirements/Compatibility
    • Components installed
  • How it works
  • Creating, Editing, Duplicating, and Deleting Filters
  • Troubleshooting Tips
What is TCP Filtering?

TCP/IP Filters allow the server administrator to restrict access to TCP services running on the ASIP server by port number, by IP address of the client, or a combination of both. This powerful feature allows the administrator a great deal of flexibility in offering services and providing extra security. Here are some examples of how an administrator could filter services on the ASIP server:


TCP/IP Filtering includes a TCP Filter Admin program which is used to create the filters (like other ASIP administration programs, launching the TCP/IP Admin program requires the admin name & password). The other components are extensions which interpret the filters created and allow or deny services accordingly.





Figure 1, TCP Filter folder contents



System Requirements/Compatibility

Operating system

The TCP Filter feature is fully compatible with Mac OS 8.5 which includes Open Transport 2.0. It is not supported, and may not run on, 8.1 or earlier due to limitations in earlier versions of Open Transport.

Hardware

The TCP Filter feature will run on any supported hardware platform of the AppleShare IP 6.x product.

Components Installed

TCP/IP Filtering is installed as a standard part of the AppleShare IP 6.1 easy installation, and is implemented in 3 components:


The TCP/IP Filtering extension module verifies all incoming TCP/IP packets and the admin application is used for configuring the TCP filters for each TCP/IP port.

The initial state is off and thus by default all TCP/IP packets are accepted.

How it works

TCP/IP Filters may be defined for individual ports on the server or as server-wide filters that apply to "All ports" on the server machine. When a packet comes in, the software first checks to see if there is a filter that applies to that particular port. If more than one filter has been defined for that port, it will then check the IP address field, and use the filter that most closely matches the sender's IP address.

If no filter exists for that specific port, then it will look for the "All Ports" filters, and again, apply the one that most closely matches the sender's IP address.

TCP Filtering is installed on the server machine in the "off " or disabled state which means that there are no restrictions on incoming TCP/IP packets after installation. The administrator must enable TCP Filtering and restart the server before any filters can be operational; he should at this time also choose the Default filter state. The Default filter may be set to "Deny All" clients not specifically allowed by another filter or "Allow All" clients if not specifically denied by another filter. The initial state of the Default filter is "Deny All". After enabling TCP Filtering, the Default filter state should be either changed to "allow all", or supplemented by adding new filters.





Figure 2, TCP Filter List



To create a TCP filter, the administrator sets three values:


Services or Port numbers

When adding TCP filters, you may choose a service or a well-known TCP port number from the Port pop-up menu or you may type in any valid port number for which to define filters (port number only; no text). In addition, you may choose the "All ports" designation from the Port pop-up menu to apply the filter to all services running on the server system.

These are the ports that map to services offered by AppleShare IP 6.x:





Figure 3, All Ports pop-up menu



IP Addresses

Filters specify an IP address or range of IP addresses from which to control access to services running on the server system. An IP address consists of 4 decimal numbers (ranging from 0 to 255) that are separated by the period character (.). When creating a filter, an IP address may contain wildcard characters (*) that indicate that any number in that location is considered valid. Wildcard characters can not precede any numerical value in the filter, and must always be followed by other wildcard characters, or terminated. For example:


Three wildcard characters are always assumed. If the administrator has specified only one or two wildcard characters for an individual byte of the address, the user interface will expand the wildcard character(s) to three. The following is the appropriate wildcard interpretation within individual bytes:

Use of wildcard within byte
Example of use
Could represent any value from:
*192.1.1.*0-255
**192.1.1.**0-255
***192.1.1.***0-255
0**192.1.1.0**0-99
0*192.1.1.0*0-9
1**192.1.1.1**100-199
1*192.1.1.1*10-19
2**192.1.1.2**200-255
2*192.1.1.2*20-29
3*192.1.1.3*30-39
4*192.1.1.4*40-49

Access Type

Filters may Allow or Deny access to ports on your servers. The initial Default of the TCP Filter is that all incoming packets are denied so you must add Allow filters after enabling filtering, to provide client access to your server.


Filter Interpretation

Filters that pertain to a specific port take precedence over filters that pertain to "all ports." And when more than one filter applies, the one that has a value in the IP address field that most closely matches the sender's IP address will be used.

The interpretation of the filters is not order dependent; in fact, the filters are sorted in order by port, with "All Ports" appearing first, and other specific port numbers listed numerically.

The following examples will clarify how filters are interpreted.

Example 1: In this case, the administrator wishes to restrict access to the local LANs, but they do want to open mail service to everyone except one particular site, which is a known spammer. He might set up his filters like this:




Figure 4, Filter set-up for Example 1


Example 2: The administrator wishes to allow everyone access to everything, but wants to limit access to the IMAP Admin Access port to his own computer.




Figure 5, Filter set-up for Example 2


Creating, Editing, Duplicating, and Deleting Filters

The icons on the toolbar can be used to create, edit, duplicate, and delete filters, respectively:




Figure 6, Filter toolbar icons: New, Edit, Duplicate, Delete

To add or edit a filter,





Figure 7, TCP Filter dialog box



When you select "Save" then the filter is added to the list for this port. Selecting "Cancel" will discard this entry or any modification to an existing filter.

To duplicate a filter, select it and click the "duplicate" icon in the toolbar; then edit as needed.

To delete a filter, select it and click the trash can icon in the toolbar.

"Find...'

The TCP/IP Filter Admin also lets you do DNS lookups (Find IP Address).




Figure 8, Find IP Address dialog box



The administrator may specify a host name for which it wants to look up the associated IP address. The resulting IP address may then be used by the administrator to create a filter. If the administrator knows how the subnets are partitioned for a given network, she can replace the appropriate lower bytes of the returned IP address with wildcards, thus creating a filter that would apply to everyone at the site (i.e., on that network).

For example, if the IP address returned for "marvin.apple.com" is 17.104.104.86, and the server administrator knows that they are using subnet mask 255.255.255.0, then a filter can be created for IP address 17.104.104.***, thus applying not only to marvin.apple.com, but every other client on that network as well.


Troubleshooting Tips

Here are some suggestions for troubleshooting issues with TCP Filtering:

Published Date: Feb 20, 2012