Ubuntu – UFW on Ubuntu to Allow All Traffic on LAN

Ubuntuufw

I want to allow all LAN traffic to my Ubuntu server. I have read the documentation and see the command, but when I try to edit the command for my IP range I get an error. How can I allow all traffic starting at 192.168.15.0 – 192.168.15.255?

sudo ufw allow from 192.168.15.0/255
ERROR: Bad source address

It seems like the 15 (third octal) is causing the error. Almost like UFW does not expect a LAN to have a unique IP set.

Thank you

Best Answer

sudo ufw allow from 192.168.15.0/24