Static NAT mapping in TransPort routers, has a limit of 30 rules available. If there is the need to have more rules, the best choice is to switch to using the firewall for this feature. Using the firewall is more flexible and powerful, you won't run out of firewall rules and you can also specify different port forwarding rules basing on other parameters as, for example, the source address.
Basically, for each Port Forwarding instance with certain <external port> ,<internal IP address> and <internal port>, the following firewall rule needs to be configured:
pass in break end from any to addr-PPP 1 port=<external port> -> to <internal IP address> port=<internal port>
Regarding the position of Port Forwarding rules in the Firewall Ruleset, please note that:
1) If the firewall is already been used on the router and existing rules are configured, the port forwarding rules have to be added to the top of the existing rule set above all other rules.
2) If instead the firewall is not used the port forwarding rules have to be added to the top of the default rule set
3) If no traffic restrictions are needed at all, the port forwarding rules have to be added to the top of the default rule set with the very next rule after the port forwarding rules is 'pass out break end' and this will ensure that all other traffic will pass unaffected by the firewall configuration. Please note that this option is not the best recommended as it means like have NOT firewall protection.
For example, if the firewall is not currently used (2), the configuration will be like:
pass in break end on ppp 1 from any to addr-ppp 1 port=1020 -> to 192.168.2.71 port=80
pass in break end on ppp 1 from any to addr-ppp 1 port=1021 -> to 192.168.2.30 port=80
<Other port forwarding rules go below here>
<Factory default rules go below here>
When added all the rules, the firewall need to be enabled on the external interface, that can be done on the firewall section Configuration - Security > Firewall, under the rules table.
Then click on “SAVE” under the firewall rules and then on “APPLY”.
More details about Port Forwarding using FW are explained in the Quick Note in our Support Site at the following link:
QN04 - TCP-UDP port re-direction through NAT using Static NAT Mappings or a firewall script
Feb 13, 2019