<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: port mapping in squid in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/port-mapping-in-squid/m-p/4504487#M38375</link>
    <description>This type of configuration is known as "HTTP reverse proxy" or "web accelerator".&lt;BR /&gt;&lt;BR /&gt;Here's an example of setting up one forwarding:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://wiki.squid-cache.org/ConfigExamples/Reverse/BasicAccelerator" target="_blank"&gt;http://wiki.squid-cache.org/ConfigExamples/Reverse/BasicAccelerator&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The dest_port would be specified with the cache_peer directive. Look up the syntax of the cache_peer directive from here:&lt;BR /&gt;&lt;A href="http://www.squid-cache.org/Doc/config/cache_peer/" target="_blank"&gt;http://www.squid-cache.org/Doc/config/cache_peer/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Repeat the example as many times as needed.&lt;BR /&gt;&lt;BR /&gt;... but if you are not specifically required to use Squid, I would suggest iptables forwarding instead, because it's easier to set up. Just two commands are needed:&lt;BR /&gt;&lt;BR /&gt;iptables -t nat -A PREROUTING -p tcp -d 59.90.72.76 --dport 111 -j DNAT --to-destination 151.3.1.170:80&lt;BR /&gt;&lt;BR /&gt;iptables -t nat -A PREROUTING -p tcp -d 59.90.72.76 --dport 222 -j DNAT --to-destination 151.3.100.250:80&lt;BR /&gt;&lt;BR /&gt;i.e. "TCP packets incoming to 59.90.72.76 with a destination port X shall be redirected to destination Y".&lt;BR /&gt;&lt;BR /&gt;The iptables settings will go away when the system is rebooted, so you will need to write a startup script or otherwise store the iptables configuration in a persistent way. &lt;BR /&gt;&lt;BR /&gt;In RHEL 4 or 5, "iptables-save &amp;gt;/etc/sysconfig/iptables" should do the trick. &lt;BR /&gt;&lt;BR /&gt;MK</description>
    <pubDate>Tue, 29 Sep 2009 11:36:18 GMT</pubDate>
    <dc:creator>Matti_Kurkela</dc:creator>
    <dc:date>2009-09-29T11:36:18Z</dc:date>
    <item>
      <title>port mapping in squid</title>
      <link>https://community.hpe.com/t5/operating-system-linux/port-mapping-in-squid/m-p/4504486#M38374</link>
      <description>how to do port mapping in squid proxy?&lt;BR /&gt;&lt;BR /&gt;squid proxy configured with a public ip address 59.90.72.76&lt;BR /&gt;&lt;BR /&gt;type  dest_host     dest_port local_port &lt;BR /&gt;tcp  151.3.1.170      80         111&lt;BR /&gt;tcp  151.3.100.250    80         222&lt;BR /&gt;&lt;BR /&gt;please give me an idea to do port mapping to the local servers so that it can be accessed through http from outside.</description>
      <pubDate>Tue, 29 Sep 2009 05:03:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/port-mapping-in-squid/m-p/4504486#M38374</guid>
      <dc:creator>System Engineer</dc:creator>
      <dc:date>2009-09-29T05:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: port mapping in squid</title>
      <link>https://community.hpe.com/t5/operating-system-linux/port-mapping-in-squid/m-p/4504487#M38375</link>
      <description>This type of configuration is known as "HTTP reverse proxy" or "web accelerator".&lt;BR /&gt;&lt;BR /&gt;Here's an example of setting up one forwarding:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://wiki.squid-cache.org/ConfigExamples/Reverse/BasicAccelerator" target="_blank"&gt;http://wiki.squid-cache.org/ConfigExamples/Reverse/BasicAccelerator&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The dest_port would be specified with the cache_peer directive. Look up the syntax of the cache_peer directive from here:&lt;BR /&gt;&lt;A href="http://www.squid-cache.org/Doc/config/cache_peer/" target="_blank"&gt;http://www.squid-cache.org/Doc/config/cache_peer/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Repeat the example as many times as needed.&lt;BR /&gt;&lt;BR /&gt;... but if you are not specifically required to use Squid, I would suggest iptables forwarding instead, because it's easier to set up. Just two commands are needed:&lt;BR /&gt;&lt;BR /&gt;iptables -t nat -A PREROUTING -p tcp -d 59.90.72.76 --dport 111 -j DNAT --to-destination 151.3.1.170:80&lt;BR /&gt;&lt;BR /&gt;iptables -t nat -A PREROUTING -p tcp -d 59.90.72.76 --dport 222 -j DNAT --to-destination 151.3.100.250:80&lt;BR /&gt;&lt;BR /&gt;i.e. "TCP packets incoming to 59.90.72.76 with a destination port X shall be redirected to destination Y".&lt;BR /&gt;&lt;BR /&gt;The iptables settings will go away when the system is rebooted, so you will need to write a startup script or otherwise store the iptables configuration in a persistent way. &lt;BR /&gt;&lt;BR /&gt;In RHEL 4 or 5, "iptables-save &amp;gt;/etc/sysconfig/iptables" should do the trick. &lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Tue, 29 Sep 2009 11:36:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/port-mapping-in-squid/m-p/4504487#M38375</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2009-09-29T11:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: port mapping in squid</title>
      <link>https://community.hpe.com/t5/operating-system-linux/port-mapping-in-squid/m-p/4504488#M38376</link>
      <description>hi Matti Kurkela,&lt;BR /&gt;&lt;BR /&gt;thanks for the quick responce &lt;BR /&gt;&lt;BR /&gt;please guide me to configure http reverse proxy&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Before the web url was http:\\59.90.72.76:111\ias\deafult.asp and http:\\59.90.72.76:222\hcl  to access the package server.&lt;BR /&gt;&lt;BR /&gt;after adding iptables also it is not working what else need to be checked&lt;BR /&gt;&lt;BR /&gt;please guide me how to do http reverse proxy configuration for the same.&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Sep 2009 06:17:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/port-mapping-in-squid/m-p/4504488#M38376</guid>
      <dc:creator>System Engineer</dc:creator>
      <dc:date>2009-09-30T06:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: port mapping in squid</title>
      <link>https://community.hpe.com/t5/operating-system-linux/port-mapping-in-squid/m-p/4504489#M38377</link>
      <description>after adding the iptables also it is not working.please suggest&lt;BR /&gt;&lt;BR /&gt;pp</description>
      <pubDate>Wed, 30 Sep 2009 13:11:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/port-mapping-in-squid/m-p/4504489#M38377</guid>
      <dc:creator>System Engineer</dc:creator>
      <dc:date>2009-09-30T13:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: port mapping in squid</title>
      <link>https://community.hpe.com/t5/operating-system-linux/port-mapping-in-squid/m-p/4504490#M38378</link>
      <description>Oops... if you use iptables, you will also have to enable IP forwarding. &lt;BR /&gt;&lt;BR /&gt;Edit /etc/sysctl.conf, set net.ipv4.ip_forward to 1. Add this line if it does not exist:&lt;BR /&gt;&lt;BR /&gt;net.ipv4.ip_forward=1&lt;BR /&gt;&lt;BR /&gt;After editing the file, run "sysctl -p".&lt;BR /&gt;&lt;BR /&gt;If you have other firewall rules configured, you must allow forwarding traffic to those local servers.&lt;BR /&gt;&lt;BR /&gt;Did you read the Squid configuration example I linked? If you can't do it with that example, you should not be using Squid at all: if you don't know what you're doing, you're all too likely to accidentally create an "open proxy".&lt;BR /&gt;&lt;BR /&gt;Open proxies can be used to send spam, to scam other Internet users for money, to make it look like you're the one downloading child porn, and many other nasty things. &lt;BR /&gt;&lt;BR /&gt;There are people on the internet with automated tools for searching open proxies. Many modern computer worms and other malware will also automatically run network scans and report their findings to their creator.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Wed, 30 Sep 2009 19:04:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/port-mapping-in-squid/m-p/4504490#M38378</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2009-09-30T19:04:54Z</dc:date>
    </item>
  </channel>
</rss>

