Jarod Pauchet 97c5a05efa nouveau fichier : siotp/sisr1/TP7/scriptsnft/current_ruleset.nft
nouveau fichier : siotp/sisr1/TP7/scriptsnft/fw_part1.nft
	nouveau fichier : siotp/sisr1/TP7/scriptsnft/fw_part2.nft
	nouveau fichier : siotp/sisr1/TP7/scriptsnft/fw_part3.nft
	nouveau fichier : siotp/sisr1/TP7/scriptsnft/refresh_firewall.sh
2024-04-04 14:25:22 +02:00

42 lines
1.3 KiB
Plaintext

define netif = enp0s3
define dmzif = enp0s8
define lanif = enp0s9
define netip = 192.168.0.140
define dmzip = 172.16.0.254
define lanip = 10.0.0.254
table ip ipfilter{
chain prerouting {
type filter hook prerouting priority filter; policy drop;
icmp type echo-request iif $lanif ip daddr 172.16.0.1-172.16.0.254 accept
icmp type echo-request iif $lanif ip daddr $lanip accept
icmp type echo-reply accept
tcp dport 22 accept
}
chain system_in {
type filter hook input priority filter; policy drop;
icmp type echo-request iif $lanif accept
icmp type echo-reply accept
tcp dport 22 accept
}
chain routing {
type filter hook forward priority filter; policy drop;
icmp type echo-request iif $lanif oif $dmzif accept
icmp type echo-reply iif $dmzif oif $lanif accept
}
chain system_out {
type filter hook output priority filter; policy drop;
icmp type echo-request accept
icmp type echo-reply oif $lanif accept
tcp sport 22 accept
}
chain postrouting {
type filter hook postrouting priority filter; policy drop;
icmp type echo-request ip saddr {$lanip , $dmzip , $netip } accept
icmp type echo-request iif $lanif oif $dmzif accept
icmp type echo-reply iif $dmzif oif $lanif accept
icmp type echo-reply ip saddr $lanip oif $lanif accept
tcp sport 22 accept
}
}