yes, linux is easily set up as a router and/or "firewall"
I really dislike the term "firewall", its not what people think it is..........thanks to windows bullsheot, windows networking tcp/ip stack is weak, always has been, it doesnt have many options nor can it handle much traffic........one of the disadvantages of a single user system
One of my machines has 2 ethernet cards, one is connected to my broadband connection, other NIC goes to a hub/switch, and it acts as a router and a "firewall" so all my machines can share the net connection and work together on my LAN