LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-01-2015, 06:59 AM   #1
Meren
LQ Newbie
 
Registered: Jun 2015
Posts: 7

Rep: Reputation: Disabled
how to setup squid transparent proxy in centOS 6.4


i have search over the number of forums about transparent proxy in centOS but i cannot still solve my problem....
someone please explain me in brief about setting up a transparent proxy in my centOS proxy server.
ethernet_internet - 192.168.1.13
ethernet_LAN - 10.180.5.2(as proxy server)

Thank You
 
Old 07-01-2015, 11:10 AM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
So what is not working?
 
Old 07-01-2015, 11:41 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Meren View Post
i have search over the number of forums about transparent proxy in centOS but i cannot still solve my problem....
someone please explain me in brief about setting up a transparent proxy in my centOS proxy server.
ethernet_internet - 192.168.1.13
ethernet_LAN - 10.180.5.2(as proxy server)

Thank You
Since you haven't actually told us what problem(s) you're having, what do you think we'll be able to tell you???

And the very first hit in Google for "how to configure squid as a transparent proxy server on centos" is:
http://xmodulo.com/squid-transparent...ntos-rhel.html

Did you try looking this up?
 
Old 07-02-2015, 03:07 AM   #4
Meren
LQ Newbie
 
Registered: Jun 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
i configured the settings as given below, but when i access internet from client computer(removing the proxy settings from browser) i cannot access internet....but when i set the proxy settings(Address-10.180.5.2 port 3128) i can access the internet....
My aim is to make my proxy server(10.180.5.2) as transparent so that i don't have to configure proxy on client browser
iptables
*filter
:INPUT ACCEPT [86:39104]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [77:37515]
-A INPUT -s 10.180.5.2/32 -p tcp -m tcp --dport 3128 -j ACCEPT
-A INPUT -s 10.0.0.0/8 -p tcp -m tcp --dport 3128 -j ACCEPT
-A FORWARD -s 10.180.5.2/32 -i eth1 -j ACCEPT
COMMIT
*nat
:PREROUTING ACCEPT [76:6891]
:POSTROUTING ACCEPT [8:2751]
:OUTPUT ACCEPT [8:2751]
-A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.180.5.2:3128
-A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-port 3128
COMMIT

squid.conf
acl mylan src 10.180.5.2/32
http_access allow mylan
http_access deny all
http_port 3128 intercept

Last edited by Meren; 07-02-2015 at 03:59 AM.
 
Old 07-02-2015, 08:07 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Meren View Post
i configured the settings as given below, but when i access internet from client computer(removing the proxy settings from browser) i cannot access internet....but when i set the proxy settings(Address-10.180.5.2 port 3128) i can access the internet....My aim is to make my proxy server(10.180.5.2) as transparent so that i don't have to configure proxy on client browser
iptables
*filter
:INPUT ACCEPT [86:39104]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [77:37515]
-A INPUT -s 10.180.5.2/32 -p tcp -m tcp --dport 3128 -j ACCEPT
-A INPUT -s 10.0.0.0/8 -p tcp -m tcp --dport 3128 -j ACCEPT
-A FORWARD -s 10.180.5.2/32 -i eth1 -j ACCEPT
COMMIT
*nat
:PREROUTING ACCEPT [76:6891]
:POSTROUTING ACCEPT [8:2751]
:OUTPUT ACCEPT [8:2751]
-A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.180.5.2:3128
-A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-port 3128
COMMIT

squid.conf
acl mylan src 10.180.5.2/32
http_access allow mylan
http_access deny all
http_port 3128 intercept
Ok, so everything is working exactly like it should. What's the problem??? A transparent proxy is one that the user doesn't know is there, but you are going to have to tell your systems to USE IT somehow. Either push down a proxy PAC file, or do a redirection in your router somehow. Sitting the box on the network won't just make it work...you have to route the traffic through the server.
 
Old 07-02-2015, 02:17 PM   #6
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by Meren View Post
-A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.180.5.2:3128
-A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-port 3128
Why the second rule?
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem Deploying SQUID as Transparent Proxy Server on CentOS 6.4 s4starb4boy Linux - Networking 23 01-07-2015 08:39 AM
LXer: How to set up Squid as a transparent web proxy on CentOS or RHEL LXer Syndicated Linux News 0 06-25-2014 01:20 PM
Help Setup Squid Transparent Proxy ncage Linux - Networking 3 06-19-2014 05:28 PM
help with transparent squid proxy setup keevill Linux - Networking 7 09-23-2011 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration