Results 1 to 4 of 4
I have installed squid in a single machine and i have configured my browser to port no 3128 and ip address 127.0.0.1,now i want to redirect port 80 to 3128...Can ...
- 07-25-2009 #1Just Joined!
- Join Date
- Jun 2009
- Posts
- 41
Help Redirecting Port...
I have installed squid in a single machine and i have configured my browser to port no 3128 and ip address 127.0.0.1,now i want to redirect port 80 to 3128...Can someone guide me to do this...
- 07-26-2009 #2Linux Guru
- Join Date
- Jan 2009
- Location
- Dover, NH
- Posts
- 1,633
Question: Is this computer a gateway for other computers on your LAN to access the Internet?
- 07-26-2009 #3Just Joined!
- Join Date
- Jun 2009
- Posts
- 41
NO this computer does not act as a gateway for other computers...I have configured squid for my home PC(ie single PC)...And So now i have to forward all the http request to port 3128...
- 07-26-2009 #4Linux Guru
- Join Date
- Jan 2009
- Location
- Dover, NH
- Posts
- 1,633
As a localhost proxy, you only need to tell your web applications to go through port 3128. Any requests going out through squid will automatically be routed back in through squid. Outgoing and return ports are typically generated at random at the start of a request anyway, just the destination port is defined from the get go so the receiving server knows where to direct the traffic.
The only reason you'd need to set up automatic port forwarding for squid is if you were using it as an automatic web gateway, and even then it would only be on the LAN interface, not the WAN. It's both unnecessary and overcomplicated for a single PC setup.
That being said, I don't want to leave you without the answer. This will have no effect on your machine unless you are running a web server (in which case it'll take it off line).
IP routing is taken care of in the kernel and is managed by iptables. A complete list of commands can be obtained by typing man iptables at a terminal prompt. An example relevant to your request can be found here: redirect to port 3128 using iptables


Reply With Quote