78 lines
910 B
Markdown
78 lines
910 B
Markdown
---
|
||
categories: openbsd network firewall
|
||
title: HowToOpenBSD/PacketFilter
|
||
---
|
||
|
||
## Tips & Astuces
|
||
|
||
Vérifier la fichier de config :
|
||
|
||
~~~
|
||
# pfctl -nf /etc/pf.conf
|
||
~~~
|
||
|
||
Recharger la configuration :
|
||
|
||
~~~
|
||
# pfctl -f /etc/pf.conf
|
||
~~~
|
||
|
||
Voir la QoS en temps réel :
|
||
|
||
~~~
|
||
# systat queue
|
||
# pfctl -s queue -vv
|
||
~~~
|
||
|
||
Voir les logs :
|
||
|
||
~~~
|
||
# tcpdump -n -e -ttt -r /var/log/pflog
|
||
~~~
|
||
|
||
Voir les vieux logs :
|
||
|
||
~~~
|
||
# zcat /var/log/pflog.0.gz |tcpdump -ne -ttt -r -
|
||
~~~
|
||
|
||
Voir les logs en temps réel :
|
||
|
||
~~~
|
||
# tcpdump -n -e -ttt -i pflog0
|
||
~~~
|
||
|
||
Liste des états :
|
||
|
||
~~~
|
||
# pfctl -s states | less
|
||
~~~
|
||
|
||
Flush des états :
|
||
|
||
~~~
|
||
# pfctl -F states
|
||
~~~
|
||
|
||
Toutes les infos sur PF :
|
||
|
||
~~~
|
||
# pfctl -sa | less
|
||
~~~
|
||
|
||
Gestion des tables :
|
||
|
||
~~~
|
||
# pfctl -t <table> -T flush/kill/add/delete
|
||
~~~
|
||
|
||
## FAQ
|
||
|
||
### pfctl: warning: namespace collision with \<table\> global table.
|
||
|
||
Il faut a priori effacer la table avec
|
||
|
||
~~~
|
||
# pfctl -t <table> -T kill
|
||
~~~
|