Hello, all.
I have a /24 block of IPs with a few servers currently running on it. What I'd like to do is setup a firewall and put these servers behind it.
Here's where I got yesterday:
1) eth0 is connected to the switch, given the IP .2 and default gateway of .1 (.1 being my /24's gateway)
2) eth1 is connected to a laptop (eventually a server) with the IP .3
3) laptop given a random IP, but the gateway is .3 instead of .1
(subnet gw .1) <--- | [eth0/.2] <---> [eth1/.3] | ---> [laptop/gw .3]
Is this possible, or is there something obvious that I'm overlooking? I tried this out yesterday and couldn't get it working... packets from the servers were being sent out to the internet through eth0 on the firewall, but upon returning, the firewall was not forwarding them back to their originating IP through eth1. Can there even be two gateways on a subnet in a manner similar to this? Can this be done entirely with route, or is iptables necessary?
The only two routes on the firewall were the /24 itself, and the default gw. (Edit: just for clarification, even though I'm calling it a firewall, it's not actually filtering anything at the moment.)
Right now I'm only concerned with the routing aspect and trying to figure out what I did wrong, or even if what I want is possible without having to do further subnetting. The actual firewall implementation comes later.
Thanks, any advice is greatly appreciated.