13.2 Firewall

De UnixWiki
Aller à : navigation, rechercher

Lister les règles actives

 # lsfilt
 Beginning of IPv4 filter rules.
 Rule 1:
 Rule action         : permit
 Source Address      : 0.0.0.0
 Source Mask         : 0.0.0.0
 Destination Address : 0.0.0.0
 Destination Mask    : 0.0.0.0
 Source Routing      : no
 Protocol            : udp
 Source Port         : eq  4001
 Destination Port    : eq  4001
 Scope               : both
 Direction           : both
 Logging control     : no
 Fragment control    : all packets
 Tunnel ID number    : 0
 Interface           : all
 Auto-Generated      : yes
 Expiration Time     : 0
 Description         : Default Rule

Vérifier si le firewall est actif

 # lsfilt -v4 -O -a

Activer les règles

 # mkfilt -v 4 -u

Créer une règle firewall

 # genfilt -v 4 -a P -n 3 -g n -s 0.0.0.0 -m 0.0.0.0 -d 0.0.0.0 -M 0.0.0.0 -c all -o any -p 0 -O any -P 0 -w O -l N -f Y -i all -r L