Find the answer to your Linux question:
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 ...
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    41

    Thumbs up 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...

  2. #2
    Linux 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?

  3. #3
    Just Joined!
    Join Date
    Jun 2009
    Posts
    41

    Thumbs up

    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...

  4. #4
    Linux 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...