LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-13-2015, 12:28 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 504

Rep: Reputation: 31
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 12:47 AM.
 
Old 08-13-2015, 03:52 AM   #2
auge
Member
 
Registered: May 2002
Location: Germany
Distribution: CentOS, Debian, LFS
Posts: 100
Blog Entries: 1

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



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

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

All times are GMT -5. The time now is 05:00 AM.

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