LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Port redirection in the same machine (https://www.linuxquestions.org/questions/linux-networking-3/port-redirection-in-the-same-machine-715382/)

viveksnv 03-29-2009 11:00 PM

Port redirection in the same machine
 
Hi All,

I am using squid proxy server in my Linux machine for caching. Now i want run my squid in transparent mode not set proxy settings in browsers.

Like squid is running port 3128. If we redirect the port 80 packets to port 3128, looping is occurred.

How to avoid looping?.

Give your suggestions..

Thanks,
Vivek

acid_kewpie 03-30-2009 05:40 AM

How is looping occurring? if you redirect packets from 80 to 3128 on eth0 then nothign would loop unless you're doing something odd.

linuxlover.chaitanya 03-30-2009 06:30 AM

What kind of looping? I have squid servers on some of my sites running very well without any looping seen. What have you tried that caused looping?

viveksnv 03-31-2009 05:05 AM

Problem solved.
 
Thanks to Acid kewpie and Chaitanya.

Looping:
Same traffic comes to 3128 when we redirect the 80 packets to 3128. Because squid sends the requests to web servers using port 80.

Squid has one option tcp_outgoing_tos. I am using this option and based on the marking we can differentiate the packets.

Thanks,
Vivek.

acid_kewpie 03-31-2009 05:10 AM

yes, but it sends the traffic to port 80 on OTHER servers... not your own squid server, that's clearly nuts. :confused:

linuxlover.chaitanya 03-31-2009 05:21 AM

You seem to have some problems with configurations. You run squid and redirect all the web traffic from port 80 to squid port 3128.
And the port 80 of destination, as suggested by acid_kewpie, is the port of the web server where you request the page.
My squid does not have the option tcp_outgoing_tos set and still its working fine.
Maybe there is something that you are missing.


All times are GMT -5. The time now is 04:07 AM.