Hi Sam and welcome to Digi Forum.
You can do what you need by using firewall rules, please see here: https://www.digi.com/resources/documentation/digidocs/90001019/default.htm#references/r_firewall_scripts.htm?TocPath=Configuring%2520security%2520%257CFirewall%2520%257CUse%2520firewall%2520scripts%2520%257C_____0
You can also check the default fw rules already configured on the WR to have an idea on what you can do.
Please also note that you will also need to enable the firewall on the WAN interface (is not enabled by default).
If you need further help on this, please check our support options: https://www.digi.com/support
Digi Tech Support team