Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-13-2015, 01:28 AM   #1
Registered: Oct 2005
Location: Bangladesh
Posts: 490

Rep: Reputation: 30
Configure Transparent proxy on Centos 7

Hi Friends ,

I am using "CentOS Linux release 7.1.1503 (Core)" . I can successfully configured proxy server on it and can browsing using squid .

But Now I want to use it as transparent proxy . so I give the below rules :

eth0 :

eth1 :

iptables -I INPUT -s -p tcp --dport 3128 -j ACCEPT

iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j DNAT --to

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128


But its not wokring ... I am new on centos 7 , would anybody please help me ?

Last edited by shipon_97; 08-13-2015 at 01:47 AM.
Old 08-13-2015, 04:52 AM   #2
Registered: May 2002
Location: Germany
Distribution: CentOS, Fedora, LFS
Posts: 35

Rep: Reputation: Disabled
Why DNAT? Please explain. You better make the squid listen on the internal interface and let it do the rest. This configuration with another private IPv4 in 10/8 looks like there is some setup like:
Client <=> Router AND squid dual-homing <=> upstream-router

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-ports 3128
^^ correct
Now put this in squid.conf
http_port 3128 transparent


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
how to configure transparent proxy on fedora sherazqurban Linux - Networking 1 10-10-2012 07:43 AM
make a transparent proxy with centos 5.8 moxmock Linux - Networking 2 08-04-2012 08:26 PM
how to configure transparent proxy soumalya Linux - Server 1 08-27-2011 02:26 PM
how to configure transparent proxy on Radhat 6.0 youphak Linux - Newbie 1 04-21-2011 09:56 AM
how to configure transparent proxy bharatlalgupta Red Hat 1 11-23-2009 01:16 PM > Forums > Linux Forums > Linux - Newbie

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

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