Most firewall/routers have the ability to share an Internet connection with the devices in your home or office. This is called Network Address Translation (NAT). A Linux computer with two Network Interface Cards (NIC) can act as a router, providing firewall protection and connection sharing.
Firewalling and NAT support are provided by the support for iptables built into the kernel. This recipe introduces iptables with a recipe that shares a computer's Ethernet link to the Internet through the wireless interface to give other wireless devices access to the Internet via the host's Ethernet NIC.