You can probably use iproute2 to handle this. After installing it:
add a routing table entry to /etc/iproute2/rt_tables, something like
then add a default route for that table, you'll probably want to put this in some network script so it happens after a reboot
Code:
ip route add default via 192.168.3.1 table squid
and a rule to direct traffic to that table
Code:
ip rule add from 192.168.3.15 table squid
personally I'm a bit lazy and instead of looking up the appropriate script to put them in, since I'm on debian I just throw them in my interfaces file (but I'm using static interfaces as well)
excerpt from /etc/network/interfaces
Code:
auto eth1
iface eth1 inet static
address 192.168.3.15
netmask 255.255.255.0
up ip route add default via 192.168.3.1 table squid
up ip rule add from 192.168.3.15 table squid