To view license terms, attribution, and copyright for IP Filter, the default path is /usr/lib/ipf/IPFILTER.LICENCE. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the installed
location.
Portions Copyright (c) 2009, Sun Microsystems Inc. All Rights Reserved.
Portions Copyright (c) 2015, Joyent, Inc.
ipf [-6AdDEGInoPRrsvVyzZ] [-l block | pass | nomatch] [-T optionlist] [-F i | o | a | s | S] -f filename [-f filename...] [zonename]
The ipf utility opens the filenames listed (treating a hyphen (-) as stdin) and parses the file for a set of rules which are to be added or removed from the packet filter rule set.
If there are no parsing problems, each rule processed by ipf is added to the kernel's internal lists. Rules are added to the end of the internal lists, matching the order in which they appear when given to ipf.
ipf's use is restricted through access to /dev/ipauth, /dev/ipl, and /dev/ipstate. The default permissions of these files require ipf to be run as root for all operations.
1. Assume a role that includes the IP Filter Management rights profile (see rbac(7)) or become superuser.
2. Configure system and services' firewall policies. See svc.ipfd(8) and ipf(5).
3. (Optional) Create a network address translation (NAT) configuration file. See ipnat(5).
4. (Optional) Create an address pool configuration file. See ippool(5). Create an ippool.conf file if you want to refer to a group of addresses as a single address pool. If you want the address pool configuration file to be loaded at boot time, create a file called /etc/ipf/ippool.conf in which to put the address pool. If you do not want the address pool configuration file to be loaded at boot time, put the ippool.conf file in a location other than /etc/ipf and manually activate the rules.
To re-enable packet filtering after it has been temporarily disabled either reboot the machine or enter the following command:
# svcadm enable network/ipfilter
...which essentially executes the following ipf commands:
1. Enable Solaris IP Filter:
# ipf -E
2. Load ippools:
# ippool -f <ippool configuration file>See ippool(8).
3. (Optional) Activate packet filtering:
ipf -f <ipf configuration file>
4. (Optional) Activate NAT:
ipnat -f <IPNAT configuration file>See ipnat(8).
Note -
If you reboot your system, the IPfilter configuration is automatically activated.
This option is required to parse IPv6 rules and to have them loaded. Loading of IPv6 rules is subject to change in the future.
Set the list to make changes to the active list (default).
Turn debug mode on. Causes a hex dump of filter rules to be generated as it processes each one.
Disable the filter (if enabled). Not effective for loadable kernel versions.
Enable the filter (if disabled). Not effective for loadable kernel versions.
Specifies which filter list to flush. The parameter should either be i (input), o (output) or a (remove all filter rules). Either a single letter or an entire word starting with the appropriate letter can be used. This option can be before or after any other, with the order on the command line determining that used to execute options.
To flush entries from the state table, use the -F option in conjunction with either s (removes state information about any non-fully established connections) or S (deletes the entire state table). You can specify only one of these two options. A fully established connection will show up in ipfstat -s output as 4/4, with deviations either way indicating the connection is not fully established.
Specifies which files ipf should use to get input from for modifying the packet filter rule lists.
Make changes to the Global Zone-controlled ipfilter for the zone given as an argument. See the ZONES section for more information.
Set the list to make changes to the inactive list.
Toggles default logging of packets. Valid arguments to this option are pass, block and nomatch. When an option is set, any packet which exits filtering and matches the set category is logged. This is most useful for causing all packets that do not match any of the loaded rules to be logged.
Prevents ipf from making any ioctl calls or doing anything which would alter the currently running kernel.
Force rules by default to be added/deleted to/from the output list, rather than the (default) input list.
Add rules as temporary entries in the authentication rule table.
Disable both IP address-to-hostname resolution and port number-to-service name resolution.
Remove matching filter rules rather than add them to the internal lists.
Swap the currently active filter list to be an alternative list.
Allows run-time changing of IPFilter kernel variables. To allow for changing, some variables require IPFilter to be in a disabled state (-D), others do not. The optionlist parameter is a comma-separated list of tuning commands. A tuning command is one of the following: list
Retrieve a list of all variables in the kernel, their maximum, minimum, and current value.
Retrieve its current value.
To set a new value.
# Print out all IPFilter kernel tunable parameters ipf -T list # Display the current TCP idle timeout and then set it to 3600 ipf -D -T fr_tcpidletimeout,fr_tcpidletimeout=3600 -E # Display current values for fr_pass and fr_chksrc, then set # fr_chksrc to 1. ipf -T fr_pass,fr_chksrc,fr_chksrc=1
Turn verbose mode on. Displays information relating to rule processing.
Show version information. This will display the version information compiled into the ipf binary and retrieve it from the kernel code (if running or present). If it is present in the kernel, information about its current state will be displayed; for example, whether logging is active, default filtering, and so forth).
Manually resync the in-kernel interface list maintained by IP Filter with the current interface status list.
For each rule in the input file, reset the statistics for it to zero and display the statistics prior to them being zeroed.
Zero global statistics held in the kernel for filtering only. This does not affect fragment or state statistics.
Links to IP Filter pseudo devices.
Location of ipf startup configuration file. See ipf(5).
Contains numerous IP Filter examples.
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Committed |