April 26, 2024, 09:53:09 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: How to configur Transparent Proxy ?  (Read 5705 times)

Offline sothy

  • Linux Learner
  • ***
  • Posts: 84
How to configur Transparent Proxy ?
« on: July 01, 2005, 04:12:04 AM »
Dear all

 My name sothy i have some problem with Transparent Proxy ........The first time i want to tell you clearly about my problem , I use suse 9.1 for cofigure squid and my configure squid it woriking so fine but when i want to update that i want to configure transparent proxy it can't work . So Could you please kind tell me some information about trasparent proxy configure . And i have example for configure transparent proxy /////

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

.................Thank You For Your Reply Back .........................................

Offline ilias

  • Linux Learner
  • ***
  • Posts: 116
How to configur Transparent Proxy ?
« Reply #1 on: July 01, 2005, 09:41:00 AM »
pls see the tutorial on transparent proxy  and see the below post

http://www.linuxsolved.com/forums/ftopic1316.html

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
How to configur Transparent Proxy ?
« Reply #2 on: July 01, 2005, 05:14:26 PM »
I think you should first see this.. ---> Configuring squid proxy

Offline sothy

  • Linux Learner
  • ***
  • Posts: 84
Still have problem with transparent proxy
« Reply #3 on: July 03, 2005, 03:11:38 PM »
Thank you ilias and ricky for your reply back and show importan informaiton about transparent proxy . How ever it still the same that my client they sitll cant use internet without Proxy when they want to use internet they must add proxy for use inetenet ..........but when i type script that you show me :
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT  

iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
..........................and then i type script :#iptables -L -t nat and it show like this :
linux:/ # iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
REDIRECT   tcp  --  192.168.0.0/24       anywhere            tcp dpt:http redir ports 3128
REDIRECT   tcp  --  anywhere             anywhere            tcp dpt:http redir ports 3128
[/b][/b][/b]
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  linux.online         anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
 
so now could you tell me how can i do it for make all my client when they use internet it no need for add proxy on they machin ...........................

..........Thank you for your wast time that you read my message ..............

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
How to configur Transparent Proxy ?
« Reply #4 on: July 05, 2005, 07:23:43 AM »
You have asked it other place also. hmm..

Seems to be that NAT is not working..
First tell me what is your "internet link" and what is your "local link" ?

Offline sothy

  • Linux Learner
  • ***
  • Posts: 84
Glad To See You Again Ricky
« Reply #5 on: July 06, 2005, 01:57:32 AM »
I dont understant what your question that you ask me what my Internet Link & Local Link ? But i just want to tell you some information im from cambodia (Phnom Penh ) So in here i use Internet link from Online (Publc IP ) and Local Link (Privat IP ) ..................i dont know my answer it enough for you a not but how ever i still thank you for your time that you show me and tell me about my problem .........................................
.................Thank you for your reading .............................................

Offline ilias

  • Linux Learner
  • ***
  • Posts: 116
How to configur Transparent Proxy ?
« Reply #6 on: July 06, 2005, 01:37:20 PM »
I got ur problem. do the follwoing things
1. give the command service iptables status
- it should show the redirection  ports etc

2. u have u give the proxy server ip address at the client machine in Gateway ip address. (below ip address and subnet mask)
- so ur proxy server will act as a gateway.

I think u have missed the 2nd point.

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
How to configur Transparent Proxy ?
« Reply #7 on: July 06, 2005, 01:51:13 PM »
I was saying that in transparent proxy you need NAT. that is actually packet routing + proxy + redirecting routed packet to proxy.

So here your NAT not seems to be working.

About internet link .. i mean what is the device which is connected to internet.. like eth0 or eth1 or ppp0 ?

And also which nic is local link ? is it eth1, eth0  etc.

I have asked such to give you little solution. :)

Offline sothy

  • Linux Learner
  • ***
  • Posts: 84
Thank You Alias & Ricky for reply back
« Reply #8 on: July 07, 2005, 03:24:45 AM »
Dear Alias about solution that  you show me first time i want to follow you i saw like this about iptables status :

IT:~ # iptables -L -t status
iptables v1.2.9: can't initialize iptables table `status': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

...........................................Show did you know how to upgraded like this ?

##############################]

Dear Ricky and about your question that you ask me i know and i can answer :
(1) My internet link i use Ethernet 0 (eth0 ) for connect to Internet (ISP )
(2) My Local Link is Ethernet 1 (eth 1 ) for connect to local and client one more think i have some answer for tell you when i type script
iptables -t nat -A PREROUTING -i eth 1 -p tcp --dport 80 -j REDIRECT --to-port 3128
and then i created my ip address again mean i put ip local link in to gatway But how ever you know i can Ping to all ip like local link (eth 1 )  and internet link  ( eth 0 ) it fine but when i opened web pag it dosen't working so i still wonder again and again .........................................So now i hope you will understand my question and information about my problem ...................................
................Thank You Alias & Ricky  For Reading & Happy when you reply back ...................