I've been looking for an answer for my problem but I've found some things that I couldn't understand.
I have a network with some machines running Windows and Ubuntu Desktop. I also have one server running Ubuntu Server. Everything works fine.
That I want is make this Server a firewall. I supose that I must have two network cards (I actually have them) and connect ISP modem to eth0 and eth1 goes to the switch where are the other machines connected.
I read about Shorewall but I don't know how to configure it and I can't connect to Internet with the others. My current configuration (LAN works OK, but WAN doesn't) is the following:
iface eth0 inet static
address 192.168.1.250 gateway 192.168.1.4 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255
iface eth2 inet static
address 192.168.1.2 gateway 127.0.0.1 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.26.255
The client has as a gateway the IP of eth2
With this configuration, I can't connect to the Internet. If I do a ping to 192.168.1.2 or 250, it replies successfully.