Tuer un état selon son ID

This commit is contained in:
jdubois 2018-06-19 10:06:41 +02:00
parent a7918037bc
commit f85e406bd5

View file

@ -169,6 +169,29 @@ pass in quick on $wan2 from … to self reply-to {($wan2 $wan2_gw)}
> Note : Attention, l'IP autorisée par cette règle aura un accès complet au routeur.
#### Tuer un état selon son ID
On peut voir l'ensemble des états d'un firewall et leur ID :
~~~
# pfctl -vvss
all udp 2001:db8:1::1[48110] -> 2001:db8:2::1[53] MULTIPLE:SINGLE
age 00:00:00, expires in 00:00:30, 1:1 pkts, 88:231 bytes, rule 15
id: 57dbc2163a63f98b creatorid: 3a22c108
~~~
Puis tuer l'état en spécifiant son ID :
~~~
# pfctl -k id -k 57dbc2163a63f98b
~~~
On peut ainsi tuer par exemple tous les états UDP :
~~~
for _ID in $(pfctl -vvss | grep -A2 'all udp' | grep id | awk '{print $2}') ; do echo "${_ID}" ; pfctl -k id -k "${_ID}" ; done
~~~
## FAQ
### pfctl: warning: namespace collision with \<table\> global table.