XOA restrict access through UFW

So first you will need to allow the 3 IP to access the web interface:
sudo -s
ufw allow from 31.3.2.225 to any port 80
ufw allow from 31.3.2.225 to any port 443
Do the same for the two other IP After that you need to remove all other access with:
ufw deny 80/tcp
ufw deny 443/tcp
You can list the rules with:
ufw status numbered
You can delete them with:
ufw delete <rule number>
For the change to take place use:
ufw reload