Sounds like we have similar configurations. My cable modem plugs into one network interface on my debian box, and my wireless router plugs into the second interface. I believe I could have plugged in the modem directly into the router and had it do all the network address translation, but I run a few servers on the debian box, and I wanted it to have a direct connection. In order to run the box as a full gateway (I think that's what its called), I need to configure iptables and run bind for address resolution.
Here's the shell script that I run to start iptables to forward all ip requests from eth1 (internal LAN) to eth0 (internet).
# Set up IP FORWARDing and Masquerading
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward # Enables packet forwarding by kernel
# list the current status (for debugging)
iptables --list -t nat
For BIND9, The default configuration should suffice for normal home use. I have no idea how to configure it to do anything else :). Just install the package, start the server, and you should be ready to go. This is needed (in my network setup) to allow all your LAN machines to resolve internet addresses.
apt-get install bind9
In order to directly connect to one of your machines on the internal network from the internet, you'll have to forward a port on the gateway machine. The easiest way to do this is with SSH. "man ssh" for the details. Here's what I used the other day to connect to my OS X laptop from the internet through my LAN:
# from the gateway machine:
ssh -Nn -vv -g -L 8000:osx.6thstreetradio.org:22 davek@localhost
This will open port 8000 on the gateway machine and will forward it to port 22 (ssh port) on the laptop. Flags: '-Nn' directs all inputs and outputs to/from /dev/null, '-vv' is very verbose output, '-g' allows external clients to connect, '-L 8000:osx.6thstreetradio.org:22' tells ssh to forward LOCAL port 8000 to remote port 22 (see the -R flag to tunnel the other way).
This is perhaps the most useful networking cruft that I know about linux.