NAME

ipf - alters packet filtering lists for IP packet input and output

SYNOPSIS

ipf [ -6AcdDEInoPrsvVyzZ ] [ -l ] [ -T ] [ -F ] -f <_f_i_l_e_n_a_m_e> [ -f <_f_i_l_e_n_a_m_e> [...]]

DESCRIPTION

iippff opens the filenames listed (treating "-" as stdin) and parses the file for a set of rules which are to be added or removed from the packet filter rule set.

Each rule processed by iippff is added to the kernel's internal lists if there are no parsing problems. Rules are added to the end of the internal lists, matching the order in which they appear when given to iippff.

OPTIONS

-6
This option is required to parse IPv6 rules and to have them loaded.
-A
Set the list to make changes to the active list (default).
-c
This option causes iippff to generate output files for a compiler that supports llaanngguuaaggee_. _A_t _p_r_e_s_e_n_t_, _t_h_e _o_n_l_y _t_a_r_g_e_t _l_a_n_g_u_a_g_e _s_u_p_p_o_r_t_e_d _i_s CC ((--cccc)) ffoorr wwhhiicchh ttwwoo ffiilleess -- iipp__rruulleess..cc aanndd iipp__rruulleess..hh aarree ggeenneerraatteedd iinn tthhee CCUURRRREENNTT DDIIRREECCTTOORRYY wwhheenn iippff iiss bbeeiinngg rruunn.. TThheessee ffiilleess ccaann bbee uusseedd wwiitthh tthhee IIPPFFIILLTTEERR__CCOOMMPPIILLEEDD kkeerrnneell ooppttiioonn ttoo bbuuiilldd ffiilltteerr rruulleess ssttaattiiccllyy iinnttoo tthhee kkeerrnneell.. <> <>--dd<> <> TTuurrnn ddeebbuugg mmooddee oonn.. CCaauusseess aa hheexxdduummpp ooff ffiilltteerr rruulleess ttoo bbee ggeenneerraatteedd aass iitt pprroocceesssseess eeaacchh oonnee.. <> <>--DD<> <> DDiissaabbllee tthhee ffiilltteerr ((iiff eennaabblleedd)).. NNoott eeffffeeccttiivvee ffoorr llooaaddaabbllee kkeerrnneell vveerrssiioonnss.. <> <>--EE<> <> EEnnaabbllee tthhee ffiilltteerr ((iiff ddiissaabblleedd)).. NNoott eeffffeeccttiivvee ffoorr llooaaddaabbllee kkeerrnneell vveerrssiioonnss.. <> <>--FF<> <> <> TThhiiss ooppttiioonn ssppeecciiffiieess wwhhiicchh ffiilltteerr lliisstt ttoo fflluusshh.. TThhee ppaarraammeetteerr sshhoouulldd eeiitthheerr bbee ""ii"" ((iinnppuutt)),, ""oo"" ((oouuttppuutt)) oorr ""aa"" ((rreemmoovvee aallll ffiilltteerr rruulleess)).. EEiitthheerr aa ssiinnggllee lleetttteerr oorr aann eennttiirree wwoorrdd ssttaarrttiinngg wwiitthh tthhee aapppprroopprriiaattee lleetttteerr mmaayybbee uusseedd.. TThhiiss ooppttiioonn mmaayybbee bbeeffoorree,, oorr aafftteerr,, aannyy ootthheerr wwiitthh tthhee oorrddeerr oonn tthhee ccoommmmaanndd lliinnee bbeeiinngg tthhaatt uusseedd ttoo eexxeeccuuttee ooppttiioonnss.. <> <>--FF<> <> <> TToo fflluusshh eennttrriieess ffrroomm tthhee ssttaattee ttaabbllee,, tthhee --FF ooppttiioonn iiss uusseedd iinn ccoonnjjuunnccttiioonn wwiitthh eeiitthheerr ""ss"" ((rreemmoovveess ssttaattee iinnffoorrmmaattiioonn aabboouutt aannyy nnoonn--ffuullllyy eessttaabblliisshheedd ccoonnnneeccttiioonnss)) oorr ""SS"" ((ddeelleetteess tthhee eennttiirree ssttaattee ttaabbllee)).. OOnnllyy oonnee ooff tthhee ttwwoo ooppttiioonnss mmaayy bbee ggiivveenn.. AA ffuullllyy eessttaabblliisshheedd ccoonnnneeccttiioonn wwiillll sshhooww uupp iinn iippffssttaatt --ss oouuttppuutt aass 55//55,, wwiitthh ddeevviiaattiioonnss eeiitthheerr wwaayy iinnddiiccaattiinngg iitt iiss nnoott ffuullllyy eessttaabblliisshheedd aannyy mmoorree.. <> <>--FF<><<55||66||77||88||99||1100||1111>> <> FFoorr tthhee TTCCPP ssttaatteess tthhaatt rreepprreesseenntt tthhee cclloossiinngg ooff aa ccoonnnneeccttiioonn hhaass bbeegguunn,, bbee iitt oonnllyy oonnee ssiiddee oorr tthhee ccoommpplleettee ccoonnnneeccttiioonn,, iitt iiss ppoossssiibbllee ttoo fflluusshh tthhoossee ssttaatteess ddiirreeccttllyy uussiinngg tthhee nnuummbbeerr ccoorrrreessppoonnddiinngg ttoo tthhaatt ssttaattee.. TThhee nnuummbbeerrss rreellaattee ttoo tthhee ssttaatteess aass ffoolllloowwss:: 55 == cclloossee--wwaaiitt,, 66 == ffiinn--wwaaiitt--11,, 77 == cclloossiinngg,, 88 == llaasstt--aacckk,, 99 == ffiinn--wwaaiitt--22,, 1100 == ttiimmee--wwaaiitt,, 1111 == cclloosseedd.. <> <>--FF<><> <> IIff tthhee aarrgguummeenntt ssuupppplliieedd ttoo --FF iiss ggrreeaatteerr tthhaann 3300,, tthheenn ssttaattee ttaabbllee eennttrriieess tthhaatt hhaavvee bbeeeenn iiddllee ffoorr mmoorree tthhaann tthhiiss mmaannyy sseeccoonnddss wwiillll bbee fflluusshheedd.. <> <>--ff<> <> <> TThhiiss ooppttiioonn ssppeecciiffiieess wwhhiicchh ffiilleess iippff sshhoouulldd uussee ttoo ggeett iinnppuutt ffrroomm ffoorr mmooddiiffyyiinngg tthhee ppaacckkeett ffiilltteerr rruullee lliissttss.. <> <>--II<> <> SSeett tthhee lliisstt ttoo mmaakkee cchhaannggeess ttoo tthhee iinnaaccttiivvee lliisstt.. <> <>--ll <><> <> UUssee ooff tthhee --ll ffllaagg ttoogggglleess ddeeffaauulltt llooggggiinngg ooff ppaacckkeettss.. VVaalliidd aarrgguummeennttss ttoo tthhiiss ooppttiioonn aarree ppaassss,, bblloocckk aanndd nnoommaattcchh.. WWhheenn aann ooppttiioonn iiss sseett,, aannyy ppaacckkeett wwhhiicchh eexxiittss ffiilltteerriinngg aanndd mmaattcchheess tthhee sseett ccaatteeggoorryy iiss llooggggeedd.. TThhiiss iiss mmoosstt uusseeffuull ffoorr ccaauussiinngg aallll ppaacckkeettss wwhhiicchh ddoonn''tt mmaattcchh aannyy ooff tthhee llooaaddeedd rruulleess ttoo bbee llooggggeedd.. <> <>--nn<> <> TThhiiss ffllaagg ((nnoo--cchhaannggee)) pprreevveennttss iippff ffrroomm aaccttuuaallllyy mmaakkiinngg aannyy iiooccttll ccaallllss oorr ddooiinngg aannyytthhiinngg wwhhiicchh wwoouulldd aalltteerr tthhee ccuurrrreennttllyy rruunnnniinngg kkeerrnneell.. <> <>--oo<> <> FFoorrccee rruulleess bbyy ddeeffaauulltt ttoo bbee aaddddeedd//ddeelleetteedd ttoo//ffrroomm tthhee oouuttppuutt lliisstt,, rraatthheerr tthhaann tthhee ((ddeeffaauulltt)) iinnppuutt lliisstt.. <> <>--PP<> <> AAdddd rruulleess aass tteemmppoorraarryy eennttrriieess iinn tthhee aauutthheennttiiccaattiioonn rruullee ttaabbllee.. <> <>--rr<> <> RReemmoovvee mmaattcchhiinngg ffiilltteerr rruulleess rraatthheerr tthhaann aadddd tthheemm ttoo tthhee iinntteerrnnaall lliissttss <> <>--ss<> <> SSwwaapp tthhee aaccttiivvee ffiilltteerr lliisstt iinn uussee ttoo bbee tthhee ""ootthheerr"" oonnee.. <> <>--TT <><> <> TThhiiss ooppttiioonn aalllloowwss rruunn--ttiimmee cchhaannggiinngg ooff IIPPFFiilltteerr kkeerrnneell vvaarriiaabblleess.. SSoommee vvaarriiaabblleess rreeqquuiirree IIPPFFiilltteerr ttoo bbee iinn aa ddiissaabblleedd ssttaattee ((--DD)) ffoorr cchhaannggiinngg,, ootthheerrss ddoo nnoott.. TThhee ooppttiioonnlliisstt ppaarraammeetteerr iiss aa ccoommmmaa sseeppaarraatteedd lliisstt ooff ttuunniinngg ccoommmmaannddss.. AA ttuunniinngg ccoommmmaanndd iiss eeiitthheerr ""lliisstt"" ((rreettrriieevvee aa lliisstt ooff aallll vvaarriiaabblleess iinn tthhee kkeerrnneell,, tthheeiirr mmaaxxiimmuumm,, mmiinniimmuumm aanndd ccuurrrreenntt vvaalluuee)),, aa ssiinnggllee vvaarriiaabbllee nnaammee ((rreettrriieevvee iittss ccuurrrreenntt vvaalluuee)) aanndd aa vvaarriiaabbllee nnaammee wwiitthh aa ffoolllloowwiinngg aassssiiggnnmmeenntt ttoo sseett aa nneeww vvaalluuee.. SSoommee eexxaammpplleess ffoollllooww.. <> <> ## PPrriinntt oouutt aallll IIPPFFiilltteerr kkeerrnneell ttuunnaabbllee ppaarraammeetteerrss iippff --TT lliisstt ## DDiissppllaayy tthhee ccuurrrreenntt TTCCPP iiddllee ttiimmeeoouutt aanndd tthheenn sseett iitt ttoo 33660000 iippff --DD --TT ffrr__ttccppiiddlleettiimmeeoouutt,,ffrr__ttccppiiddlleettiimmeeoouutt==33660000 --EE ## DDiissppllaayy ccuurrrreenntt vvaalluueess ffoorr ffrr__ppaassss aanndd ffrr__cchhkkssrrcc,, tthheenn sseett ffrr__cchhkkssrrcc ttoo 11.. iippff --TT ffrr__ppaassss,,ffrr__cchhkkssrrcc,,ffrr__cchhkkssrrcc==11 <> <> <>--vv<> <> TTuurrnn vveerrbboossee mmooddee oonn.. DDiissppllaayyss iinnffoorrmmaattiioonn rreellaattiinngg ttoo rruullee pprroocceessssiinngg.. <> <>--VV<> <> SShhooww vveerrssiioonn iinnffoorrmmaattiioonn.. TThhiiss wwiillll ddiissppllaayy tthhee vveerrssiioonn iinnffoorrmmaattiioonn ccoommppiilleedd iinnttoo tthhee iippff bbiinnaarryy aanndd rreettrriieevvee iitt ffrroomm tthhee kkeerrnneell ccooddee ((iiff rruunnnniinngg//pprreesseenntt)).. IIff iitt iiss pprreesseenntt iinn tthhee kkeerrnneell,, iinnffoorrmmaattiioonn aabboouutt iittss ccuurrrreenntt ssttaattee wwiillll bbee ddiissppllaayyeedd ((wwhheetthheerr llooggggiinngg iiss aaccttiivvee,, ddeeffaauulltt ffiilltteerriinngg,, eettcc)).. <> <>--yy<> <> MMaannuuaallllyy rreessyynncc tthhee iinn--kkeerrnneell iinntteerrffaaccee lliisstt mmaaiinnttaaiinneedd bbyy IIPP FFiilltteerr wwiitthh tthhee ccuurrrreenntt iinntteerrffaaccee ssttaattuuss lliisstt.. <> <>--zz<> <> FFoorr eeaacchh rruullee iinn tthhee iinnppuutt ffiillee,, rreesseett tthhee ssttaattiissttiiccss ffoorr iitt ttoo zzeerroo aanndd ddiissppllaayy tthhee ssttaattiissttiiccss pprriioorr ttoo tthheemm bbeeiinngg zzeerrooeedd.. <> <>--ZZ<> <> ZZeerroo gglloobbaall ssttaattiissttiiccss hheelldd iinn tthhee kkeerrnneell ffoorr ffiilltteerriinngg oonnllyy ((tthhiiss ddooeessnn''tt aaffffeecctt ffrraaggmmeenntt oorr ssttaattee ssttaattiissttiiccss)).. <> <> FFIILLEESS <> //ddeevv//iippaauutthh <> //ddeevv//iippll <> //ddeevv//iippssttaattee <> SSEEEE AALLSSOO <> iippfftteesstt((11)),, mmkkffiilltteerrss((11)),, iippff((44)),, iippll((44)),, iippff((55)),, iippff..ccoonnff((55)),, iippff66..ccoonnff((55)),, iippffssttaatt((88)),, iippmmoonn((88)),, iippnnaatt((88)) <> DDIIAAGGNNOOSSTTIICCSS <> <> NNeeeeddss ttoo bbee rruunn aass rroooott ffoorr tthhee ppaacckkeett ffiilltteerriinngg lliissttss ttoo aaccttuuaallllyy bbee aaffffeecctteedd iinnssiiddee tthhee kkeerrnneell.. <> BBUUGGSS <> <> IIff yyoouu ffiinndd aannyy,, pplleeaassee sseenndd eemmaaiill ttoo mmee aatt ddaarrrreennrr@@ppoobbooxx..ccoomm <> <>