When it comes to "opening" and forwarding udp or tcp trafic into servers on the lan, this is very easy. You just use the standard function on the server-manager panel, go into the function for port forwarding, and all "actions" are done automatic. (Port opening, port forwarding etc.) There is absolutely no need for any shell commands for that.
If it is also a question of opening for certain ports or trafic to the internal local processes on the gateway machine itself, that's an other story.
Linux (with 2.4.x or 2.6.x kernel) has two completely different set of built inn firewalls. One set is for filtering and forwarding trafick to lan. The other is for filtering the trafic into the local processes on the gateway. Technically the one firewall that controll the inncomming trafic to lan can be completely open, when the firewall that controll access to local gateway processes can be completely locked or vise versa. You dont have to lock up "the gateway firewall" to be able to have free access via "the lan access firewall".
(In earlier revisions of Linux kernel it worked the other way, there were only one firewall that opened for access to local processes and lan.)
SME 7.4 B4 has a fully automated controll function, via the server-manager panel, for controlling the trafic to servers located on the lan. (Enables controll of one of the two firewalls.)
(Actually the Linux revisions of two day has more than two firewall sets, it's also possible to filter the outgoing trafic, so the set of independent firewalls is at least 3, depending a bit how you like to see the situation.)