Table of Contents

Firewall Profiles

Introduction

Design Philosophy

Creating A Firewall Profile

Blocking YouTube During Week Days

Creating The YouTube Firewall App

Rule for YouTube

Using The Firewall Profile

Technical Details

Using Available Meta Data

nft -e -a list table bridge adv_meshdesk
table bridge adv_meshdesk { # handle 2
        set YouTube { # handle 4
                type ipv4_addr
                flags interval
                elements = { 172.217.0.0/16 comment "Block YouTube" }
        }
 
        set md_lan { # handle 5
                type ipv4_addr
                flags interval
                elements = { 10.0.0.0/8, 172.16.0.0/12,
                             192.168.0.0/16 comment "Private IP Addr LAN" }
        }
 
        set md_internet_not { # handle 6
                type ipv4_addr
                flags interval
                elements = { 10.0.0.0/8, 172.16.0.0/12,
                             192.168.0.0/16 comment "Private IP Addr Excl For Internet" }
        }
 
        chain forward { # handle 1
                type filter hook forward priority 0; policy accept;
                meta day { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" } meta hour "07:00"-"17:00" iif "zero0" ip daddr @YouTube counter packets 0 bytes 0 drop comment "DROP ON zero0," # handle 8
        }
 
        chain input { # handle 2
                type filter hook input priority 0; policy accept;
                meta day { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" } meta hour "07:00"-"17:00" iif { "one0", "two1" } ip daddr @YouTube counter packets 0 bytes 0 drop comment "DROP ON two1,one0," # handle 11
        }
 
        chain output { # handle 3
                type filter hook output priority 0; policy accept;
        }
}