LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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-29-2009, 11:00 PM   #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, 05:40 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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, 06:30 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

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, 05: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, 05:10 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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, 05:21 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

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



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

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

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