LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-27-2011, 03:03 AM   #1
soumalya
Member
 
Registered: Nov 2006
Posts: 260

Rep: Reputation: 31
how to configure transparent proxy


Sir

In my centos 5 server
eth0 is connected to ppp for internet (adsl-setup)
eth1 is connected to lan 172.16.0.3
I have tried to configure transparent proxy using squid (squid is attached)

#iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 172.16.0.3:3128
#iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128

but when I use proxy setting in client browser I can access internet, but whn no proxy and gateway 172.16.0.3, I can not access.

please guide me if I made anything wrong.
Attached Files
File Type: txt squid.txt (145.9 KB, 21 views)
 
Old 08-27-2011, 01:26 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by soumalya View Post
Sir
In my centos 5 server
eth0 is connected to ppp for internet (adsl-setup)
eth1 is connected to lan 172.16.0.3
I have tried to configure transparent proxy using squid (squid is attached)

#iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 172.16.0.3:3128
#iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128

but when I use proxy setting in client browser I can access internet, but whn no proxy and gateway 172.16.0.3, I can not access.
please guide me if I made anything wrong.
Apparently, you keep missing the part where folks tell you there are NOT JUST SIRS on this site.

And you've asked this question before:
http://www.linuxquestions.org/questi...outing-886210/
http://www.linuxquestions.org/questi...-proxy-701710/
http://www.linuxquestions.org/questi...-proxy-701710/

You don't seem to be using the postrouting commands, and don't say whether or not you've enabled IP forwarding on your system. Have you followed the advice given in your other threads???? And again, your 'problem' doesn't sound like one...you say that you've got a proxy server in place, and that if you don't set your clients up to used it, Internet doesn't work. Yes, that sounds like what it SHOULD do...
 
  


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 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
how to configure transparent proxy in squid-3.0 staple 16 kashif2131971 Linux - Server 1 07-04-2009 01:20 PM
How do you configure squid as a transparent proxy in Fedora Core 9? kas2008 Linux - Networking 6 08-18-2008 09:12 AM
transparent proxy that automaticly configure a client gateway myheart Linux - Networking 2 01-19-2005 07:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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