nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

How to Squid 2.6 transparent proxy?

This is a discussion on How to Squid 2.6 transparent proxy? within the Networking, Firewalls and Security forums, part of the Mastering Servers category; How to configure squid 2.6 and how to make it transparent? Thanks, in advance....


Go Back   nixCraft Linux Forum > Mastering Servers > Networking, Firewalls and Security

Linux answers from nixCraft.


Networking, Firewalls and Security No it's not a secret. Talk about firewalls and security issues.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 29-06-2007, 08:16 AM
Junior Member
User
 
Join Date: Jun 2007
OS: Kubuntu
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
alex.inoa is on a distinguished road
Default How to Squid 2.6 transparent proxy?

How to configure squid 2.6 and how to make it transparent?

Thanks, in advance.
Reply With Quote
  #2 (permalink)  
Old 04-09-2007, 02:49 AM
Junior Member
User
 
Join Date: Aug 2007
OS: fedora
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
dancave is on a distinguished road
Default

--ignore --

Last edited by dancave; 04-09-2007 at 02:52 AM. Reason: incomplete
Reply With Quote
  #3 (permalink)  
Old 04-09-2007, 02:51 AM
Junior Member
User
 
Join Date: Aug 2007
OS: fedora
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
dancave is on a distinguished road
Default

This can be done via the following rule.

1. install squid running on your host/gateway

2. setup iptables and ipforwarding

3. use the following rule in your /etc/sysconfig/iptables file.

-A PREROUTING -i <your lan interface> -s ! <the IP of your squid host> -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128

This will route all web traffic on port 80 to the squid port on your gateway/router host.

4. run service squid restart
5. run service iptables restart

should be working nicely,

tail -f /var/log/squid.access.log in an xterm

run your favourite browser on one of your clients on your lan

go to www.google.com, watch the squid log..

Rgds
dan
Reply With Quote
  #4 (permalink)  
Old 06-09-2007, 02:59 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,706
Thanks: 11
Thanked 243 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Linux: Setup a transparent proxy with Squid in three easy steps

Install Squid Proxy Server on CentOS / Redhat enterprise Linux 5
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #5 (permalink)  
Old 13-10-2007, 05:21 AM
Junior Member
User
 
Join Date: Oct 2007
OS: Centos5
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
anoop is on a distinguished road
Default

i configure the the proxy on centos5, after i give the command service squid start, it is giving a error message ,
init_cache_dir /var/spool/squid .... starting squid: [FAILED]
Reply With Quote
  #6 (permalink)  
Old 30-10-2007, 03:41 AM
Junior Member
User
 
Join Date: Oct 2007
OS: RedHat
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kumardineshwar is on a distinguished road
Default squid service failed while starting it first time.

Hi,

when you are starting the squid service it may failed because it is looking for the cache dir. to create it run the squid -z command. than restart the squid service by service squid restart or /etc/init.d/squid restart.

Thanks.
Dinesh
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Outlook with Squid transparent Proxy bubloob_13 Networking, Firewalls and Security 0 16-09-2007 02:37 PM
Restrict number of simultaneous proxy connections in SQUID proxy pkvmreddy Getting started tutorials 1 15-06-2007 03:52 PM
transparent squid proxy authentication chiku Linux software 1 27-04-2007 04:58 PM
Squid proxy authentication in transparent mode howto charvi Linux software 1 14-01-2007 12:55 AM
Squid Proxy bubloob_13 Linux software 4 03-12-2006 11:26 PM


All times are GMT +5.5. The time now is 07:31 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38