sagarh
asked on
Setting up Linux and Squid
Hi
I am hoping someone could help me or point me in the right direction with this issue.
I basically have set up a Linux Server with 2 network cards (eth0 and eth1) both working - I also have installed Squid version 3 administered from Webmin.
I would like to know how I can set the system up so that I can route from 1 network card to the other so that my internet traffic uses NAT. My eth1 card is linked to my broadband modem.
I also need to know (if any) how to setup Squid to forward requests to eth1 once it is approved.
Thanks for the help!
Sagar
I am hoping someone could help me or point me in the right direction with this issue.
I basically have set up a Linux Server with 2 network cards (eth0 and eth1) both working - I also have installed Squid version 3 administered from Webmin.
I would like to know how I can set the system up so that I can route from 1 network card to the other so that my internet traffic uses NAT. My eth1 card is linked to my broadband modem.
I also need to know (if any) how to setup Squid to forward requests to eth1 once it is approved.
Thanks for the help!
Sagar
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can use;
echo 1 > /proc/sys/net/ipv4/ip_forw ard
to temporarily enable routing
But basically it depends what distribution you are using
You need to use either iptables or ipchains which will allow you to enable Masquarading (NAT) on anything entering the server on a specific NIC
see http://tldp.org/HOWTO/IP-Masquerade-HOWTO/firewall-examples.html#RC.FIREWALL-IPTABLES
Once this is setup squid will block or allow traffic through the server based on your squid ACLs
echo 1 > /proc/sys/net/ipv4/ip_forw
to temporarily enable routing
But basically it depends what distribution you are using
You need to use either iptables or ipchains which will allow you to enable Masquarading (NAT) on anything entering the server on a specific NIC
see http://tldp.org/HOWTO/IP-Masquerade-HOWTO/firewall-examples.html#RC.FIREWALL-IPTABLES
Once this is setup squid will block or allow traffic through the server based on your squid ACLs
Use pfSense - http://www.pfsense.org
It is a router and firewall with bundled squid3.
The configuration is also web based.
You can try it without installing it, just boot up with the CD.
Download The live CD version - pfSense-1.2.3-RELEASE-Live
Write it to a CD, and boot with it.
There is plenty help available online, and you can even buy the book on amazon.com