LinuxQuestions.org
Visit Jeremy's Blog.
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 08-13-2015, 01:28 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 484

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 : 192.168.1.85

eth1 : 10.134.11.46

iptables -I INPUT -s 10.134.11.0/24 -p tcp --dport 3128 -j ACCEPT

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

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
auge
Member
 
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 192.168.1.70 <=> Router AND squid 192.168.1.85 dual-homing 10.134.11.46 <=> upstream-router 10.134.11.1

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


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
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


All times are GMT -5. The time now is 12:06 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