There are three sets of IP addresses set aside for non-routing use. That means that no network interface visible to the Internet can use them. They are only used by machines on a local, internal network. The addresses are 10.x.x.x, 192.168.x.x, and 172.16.x.x-> 172.32.x.x. In this recipe, we use a portion of the 10.x.x.x address space for our internal network.
By default, Linux systems will accept or generate packets, but will not echo them. This is controlled by the value in/proc/sys/net/ipv4/ip_forward.
Echoing a 1 to that location tells the Linux kernel to forward any packet it doesn't recognize. This allows the wireless devices on the 10.99.66.x subnet to use 10.99.66.55 as their gateway. They will send a packet destined for an Internet site to 10.99.66.55, which will then forward it out its gateway on eth0 to the Internet to be routed to the destination.
The iptables command is how we interact with the Linux kernel's iptables subsystem. These commands add rules to forward all packets from the internal network to the outside world and to forward expected packets from the outside world to our internal network.
The next recipe will discuss more ways to use iptables.