Doesn't debian use NetworkManager? I set this up for home office equipment during the pandemic using nmcli.
I created a connection called office and share the wi-fi to it. For me the commands were:
Code:
nmcli connection add type ethernet ifname eno2 ipv4.method shared con-name office
nmcli connection up office
nmcli connection modify office ipv4.addresses 192.168.42.1/24
nmcli connection up office
I had to modify the IP because the one NM chose conflicted with my remote work. Maybe they used NM also. I used dnsmasq to provide DHCP and DNS to my office subnet 192.168.42.x but you can use a static IP and 8.8.8.8 or whatever if you prefer.
NM takes care of adjusting firewall rules correctly.