Firewall - Port forwarding

add rule to traffic rule to log new connection or any packet to port wireward

I more or less followed this tuto:

In French but it is uci command. I just adapt with my port, name, etc..

correct

duplicate to:

OK I will check tomorrow how to do it. Time to sleep for me.
Thx.

This firewall make me crazy.

ok

have a nice rest

cat 10-custom-filter-chains.nft 
## The firewall4 input, forward and output chains are registered with
## priority `filter` (0).


## Uncomment the chains below if you want to stage rules *before* the
## default firewall input, forward and output chains.

chain user_pre_input {
 type filter hook input priority -1; policy accept;
 udp dport 51820 ct state new log prefix "Wireguard connection attempt: "
}
#
# chain user_pre_forward {
#     type filter hook forward priority -1; policy accept;
# }
#
# chain user_pre_output {
#     type filter hook output priority -1; policy accept;
# }


## Uncomment the chains below if you want to stage rules *after* the
## default firewall input, forward and output chains.

# chain user_post_input {
#     type filter hook input priority 1; policy accept;
#     ct state new log prefix "Firewall4 accepted ingress: "
# }
#
# chain user_post_forward {
#     type filter hook forward priority 1; policy accept;
#     ct state new log prefix "Firewall4 accepted forward: "
# }
#
# chain user_post_output {
#     type filter hook output priority 1; policy accept;
#     ct state new log prefix "Firewall4 accepted egress: "
# }