5 Linux as a router/firewall?

With iptables, is it possible to configure a Linux box to replace a residential gateway/firewall?

Yes! In fact, some residential gateways/firewalls run Linux as its operating system!

This topic out of the scope of this module. You can use a search engine and look up more information regarding how to set up a Linux box as a firewall/router. It is usually not economical to do this, but this approach does give you more flexibility.