You can go about this several different ways. You could set up a Virtual Machine to use various content filtering solutions. Your computer need not be windows and need not be physically between the switch and the gateway. You change your DHCP settings to point at the VM, on the same network, and route the traffic through there.
I've used dansguardian extensively and it's what I would recommend. You can also try Smoothwall Express, which is an open source version of a commercial package that includes a filtering package (based on dansguardian) — confusing, I know :)
I also use pfSense, which has a package named squidguard available which will do filtering. I've never used the squidguard module but it exists.
An alternate way would be to set OpenDNS as your DNS servers on router and, at the router level, block DNS requests going anywhere except OpenDNS. They have extensive DNS filtering options. Not foolproof, but easiest to set up.