I'm learning about UFW with a Raspberry Pi and I don't a couple of things when it comes to UFW rules. Can anyone help me suss a couple things out?
My first question is about the destination
any. If I want to let something connect to my Pi, why use
anyinstead of a static IP address?
Is it in case the Pi's IP address changes? For example:
sudo ufw allow from 18.104.22.168 to any port 22
My second question is about the following rule, which I just can't understand. When I wanted to let everything on my network access my Pi I added the rule to the Pi's UFW and it worked, but I have no idea what it means or how to read it.
It sounds like I'm letting everything on my local network connect to my Pi, regardless of its IP address:
sudo ufw allow in to 192.168.1.0/24
How does that work?