Edit custom network access rules in macOS Server
You can add custom network access rules that function like traditional firewall rules.
These rules apply to all users, but you can define the connection port, packet type, and originating IP address group.
Enter the name for the access rule.
Enter the port number.
You can enter a port range. For example, you could enter “20343-20345” (without quotation marks).
You can enter a list of individual port numbers separated by commas. For example, you could enter “3283,5900” (without quotation marks).
Choose a packet type: TCP, UDP, or Any
Click the pop-up menu, then choose an originating IP address group.
If the IP address group you want isn’t listed as a choice, you need to create it first by choosing “Create a new network.” Then see Create custom network access definitions in macOS Server.