yes u can use squid!
i know two way to do that either setup the squid machine as a proxy in the client browsers, or throughh iptables to set your linux box as a gateway, which i think is more efficient if you use dhcp. put the CPE and your linux box into one snet and connect them. and the other ethernet card of the linux box should have an ip that your lan uses. default gw in your linux box should be the ip of the cpe router (the private one). default gw of your lan's clients should be the ip of linux box (the one on your lan). Of course you have to brdge the two interfaces of your linux box. if you want a quick and efficient solution i would recomend you shrewall, which is a very good firewall based on iptables (
www.shorewall.net). Through that you ll be able to forward the lan packets to the inet and vice versa. then the squid will act as a transoarent cache server, which can be good and bad depending on what you need.
The shorewall site has excellent documentation on how to set up shorewall and squid as gw.
good luck.