How can I block all ports except 443 on MacOS Catalina

For test reasons I want to temporarily block all ports on MacOS Catalina except 443. How can I do / undo this?