LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 07: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, 12:10 PM   #2
lazydog
Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 829
Blog Entries: 1

Rep: Reputation: 137Reputation: 137
So what is not working?
 
Old 07-01-2015, 12:41 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,122

Rep: Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788
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, 04: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 04:59 AM.
 
Old 07-02-2015, 09:07 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,122

Rep: Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788Reputation: 3788
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, 03:17 PM   #6
lazydog
Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 829
Blog Entries: 1

Rep: Reputation: 137Reputation: 137
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09: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 02:20 PM
Help Setup Squid Transparent Proxy ncage Linux - Networking 3 06-19-2014 06:28 PM
help with transparent squid proxy setup keevill Linux - Networking 7 09-23-2011 06:33 PM


All times are GMT -5. The time now is 03: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration