LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-30-2009, 12:00 AM   #1
viveksnv
Member
 
Registered: Feb 2008
Posts: 38

Rep: Reputation: 15
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
 
Old 03-30-2009, 06:40 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
How is looping occurring? if you redirect packets from 80 to 3128 on eth0 then nothign would loop unless you're doing something odd.
 
Old 03-30-2009, 07:30 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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?
 
Old 03-31-2009, 06:05 AM   #4
viveksnv
Member
 
Registered: Feb 2008
Posts: 38

Original Poster
Rep: Reputation: 15
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.
 
Old 03-31-2009, 06:10 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
yes, but it sends the traffic to port 80 on OTHER servers... not your own squid server, that's clearly nuts.
 
Old 03-31-2009, 06:21 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
  


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
DynDNS and port redirection desibeli Linux - Networking 4 10-24-2007 08:24 PM
Ftp redirection to another machine in my LAN rgkx Linux - Networking 3 10-17-2007 03:10 AM
Port 80 redirection omlex Linux - Security 1 02-20-2005 04:22 PM
Port Redirection JonChristmas Linux - Networking 1 09-04-2004 04:19 AM
port redirection for squid htm Linux - Software 0 03-20-2004 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:22 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration