Setting up a simple firewall/gateway using Linux couldn't be easier. This article on Linux Journal describes how to set up a Linux-based NAT system using only one NIC. Recently, Verizon decided to enforce their "one IP per connection" policy. While this is certainly understandable from a business perspective, it is extremely annoying from this customer's perspective. Since there are currently TWO computers connected to "my" DSL connection, I needed a way to NAT them back onto the Internet again.
Well, this is a major pain in the ass, as anyone who has done it can attest. I tried this before, using the old IP Chains method, with little success. (Mind you, I tried to do this using 10Base2 and some dodgy terminators, so it wasn't all software related.) Anyway, the trick to this set-up is using the new IP Tables routing system (nice) and Linux's ability to "alias" extra IP addresses onto existing interfaces.
I don't have PPPoE here (Verizon West, still running DHCP… a blessing), so my script is a little different. All I had to do was change the reference to
to reflect the change in my connection method, and… Viola! Now packets are routed from one Windsong, through Golubo, and onto the wider Internet, using the same network interface. Very nice, very nice indeed.