iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth1 -j ACCEPT
and how does it get security patches more often than Debian or FreeBSD or OpenBSD?
As an answer to the second, I checked the site and the last release was 51 weeks ago and the last beta was 3 weeks ago. Compare that to Debian archive runs a couple times a day, has a couple hundred devs, and a couple mirrors, and full security teams.
Here's a list to security related bugs that Debian has patched since the last beta of smallwall.
https://www.debian.org/security/
There's 27 debian security patches since the most recent smallwall beta, not all related to a firewall installation of course.
One has large formal teams and procedures and FAST updates.
The other ... doesn't.
If there's a problem found and released today, the first will have a patch in hours. The second will have a new beta every couple weeks, or maybe a stable release every couple years. That's a long time to wait.
One aims to do one thing and do it well (in this case, to provide a means to use an embedded PC as a secure firewall), while the other aims to provide a complete solution to make use of a vast repository of free software for many platforms.
The developer of SmallWall follows the same philosophy put in place by the developer of m0n0wall that preceeded it:
> SmallWall is a firewall, and the purpose of a firewall is to provide security. The more functionality is added, the greater the chance that a vulnerability in that additional functionality will compromise the security of the firewall.
SmallWall is barebones FreeBSD with about 10 utilities strung together to provide the functionality one would expect of a commercial-grade firewall. That's not to say that SmallWall is impenetrable, of course, but it does mean that its attack surface is a few orders of magnitude smaller than Debian's, which attempts to make possible virtually anything that can be done today with free software, on multiple architectures.
You don't have to rush to patch the latest vulnerability in a piece of software if you've made a conscious decision to avoid using that software in the first place. For instance, while people on Debian's security team scrambled to patch Shellshock, m0n0wall was unaffected because it doesn't provide shell access.