Press the F5 key to open Advanced setup.
Click Network Protection → Firewall, expand Advanced and click Edit next to Rules.
Click Add to create a new rule.
Type a name for the rule in the Name field, select Both from the Direction drop-down menu and select Allow or Deny from the Action drop-down menu, depending on whether or not you want to block or allow this specific port.
Click the Local tab, type the number of the port or range of ports in the Port field and click OK. The new rule will appear in the Firewall rules window.
Select the check box next to Show built in (predefined) rules, scroll to the bottom of the list, select the new rule you added and then click the Top icon to move the rule to the top of the list. Click OK → OK to save your changes and exit Advanced setup.