Why do I have to have NAT entry enabled?

Topics: Developer Forum
May 30, 2011 at 7:10 PM

I have successfully implemented a very simply proxypass rule on one of my web sites. The iirf.ini file is as follows:

RewriteLog F:\smsapplogs\iirf-support-acme.gr
RewriteLogLevel 1
IterationLimit 10
MaxMatchCount 10
RewriteEngine ON
StatusInquiry ON


# act as a proxy the localhost 82 site
ProxyPass          ^/(.*)$   http://support.acme.gr:82/$1
ProxyPassReverse   /         http://support.acme.gr:82/

 

It works fine as long as I have a NAT/Virtual Server entry in my ADSL router setting, in which Public port 82 is mapped to the local 192.168.250.200:82 port where the service is running.

Why do I need this entry there?

Another question is the following: Why the setting of the rules using the internal IP do not work? In other words, why the following iirf.ini fails?

RewriteLog F:\smsapplogs\iirf-support-rayo.gr
RewriteLogLevel 1
IterationLimit 10
MaxMatchCount 10
RewriteEngine ON
StatusInquiry ON


# act as a proxy the localhost 82 site
ProxyPass          ^/(.*)$   http://192.168.250.200:82/$1
ProxyPassReverse   /         http://192.168.250.200:82/

Thanks in advance

 

 

Coordinator
May 31, 2011 at 6:55 PM

> It works fine as long as I have a NAT/Virtual Server entry in my ADSL router setting, in which Public port 82 is mapped to the local 192.168.250.200:82 port where the service is running.

> Why do I need this entry there?

I don't understand exactly the configuration you're using; I don't understand which service you refer to when you say "where the service is running".  In short, I don't know why you need that NAT entry.

It could be that the page that is being proxied, embeds in its content, an explicit address or DNS name, which is not normally publicly accessible. This happens sometimes with proxy scenarios; but from the little description you have provided, it doesn't seem likely.  Something similar, perhaps.

As for why proxying to an IP-address does not work, I don't know.  You said it "fails" but you didn't say how.  To disgnose this I would turn on IIRF logging, set the level to 4 or 5, and then view the log after one proxied transaction.  That will give you insight into whether the IP is responding, what status codes are received, and so on.

good luck.