Solved

Setting up Linux and Squid

Posted on 2010-08-23
3
550 Views
Last Modified: 2013-12-16
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

0
Comment
Question by:sagarh
3 Comments
 
LVL 10

Accepted Solution

by:
Casey Herman earned 500 total points
ID: 33501890
Do you need the current installation that you have. If not here is an easy way to accomplish all the above with this distro.                 http://www.clarkconnect.com/

I have used it for a few years. Has a lot of features and the community edition is free.
0
 
LVL 11

Expert Comment

by:Pieter Jordaan
ID: 33501977

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-LiveCD-Installer.iso.gz from http://www.pfsense.org/mirror.php?section=downloads 
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
0
 
LVL 3

Expert Comment

by:petelettin
ID: 33502358
You can use;
echo 1 > /proc/sys/net/ipv4/ip_forward

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


0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question