For a headless setup, I would like to set up ufw so that
- ssh into the machine is possible
- no outgoing connections are allowed (not ssh, nor anything else; edit: particularly to the local network)
How do I configure ufw like this?
Explanation: I am trying to restrict all LAN traffic on a Raspberry Pi, except for incoming ssh (via port forward). The idea is to create a 'sandboxed' environment with no connectivity to machines on the same subnet. That is to say, unless the user knows the sudo password, and disable ufw, they cannot access the LAN.
Many thanks!
(Please note: As this is for a headless setup, I would like this to work while I ssh into the device. I.e., the ssh port has to stay open, or be opened immediately.)