IPF(8) | Maintenance Commands and Procedures | IPF(8) |
ipf - alter packet filtering lists for IP packet input and output
ipf [-6AdDEGInoPRrsvVyzZ] [-l block | pass | nomatch]
[-T optionlist] [-F i | o | a | s | S] -f filename
[-f filename...] [zonename]
The ipf utility is part of a suite of commands associated with the Solaris IP Filter feature. See ipfilter(7).
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.
Solaris IP Filter is installed with the Solaris operating system. However, packet filtering is not enabled by default. Use the following procedure to activate the Solaris IP Filter feature.
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.
# svcadm enable network/ipfilter
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:
# ipf -E
# ippool -f <ippool configuration file>
See ippool(8).
ipf -f <ipf configuration file>
ipnat -f <IPNAT configuration file>
See ipnat(8).
Note -
The following options are supported:
-6
-A
-d
-D
-E
-F i | o | a
-F s | S
-f filename
-G
-I
-l pass | block | nomatch
-n
-o
-P
-R
-r
-s
-T optionlist
list
single variable name
variable name with a following assignment
Examples follow:
# 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
-v
-V
-y
-z
-Z
Each non-global zone has two ipfilter instances: the in-zone ipfilter, which can be controlled from both the zone itself and the global zone, and the Global Zone-controlled (GZ-controlled) instance, which can only be controlled from the Global Zone. The non-global zone is not able to observe or control the GZ-controlled ipfilter.
ipf optionally takes a zone name as an argument, which will change the ipfilter settings for that zone, rather than the current one. The zonename option is only available in the Global Zone. Using it in any other zone will return an error. If the -G option is specified with this argument, the Global Zone-controlled ipfilter is operated on. If -G is not specified, the in-zone ipfilter is operated on. Note that ipf differs from the other ipfilter tools in how the zone name is specified. It takes the zone name as the last argument, while all of the other tools take the zone name as an argument to the -G and -z options.
/dev/ipauth
/dev/ipl
/dev/ipstate
/etc/ipf/ipf.conf
/usr/share/ipfilter/examples/
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Committed |
ipf(5), ipnat(5), ippool(5), attributes(7), ipfilter(7), zones(7), ipfstat(8), ipmon(8), ipnat(8), ippool(8), svc.ipfd(8), svcadm(8)
Needs to be run as root for the packet filtering lists to actually be affected inside the kernel.
May 17, 2020 | OmniOS |