Rewriting and Portforwarding

Rewriting and Portforwarding

am 23.11.2004 15:16:16 von David Obando

Hi,

I'm using a webserver (port 80) in a LAN and want to set up access from
outside. I defined portforwarding in the firewall (abc.xyz.com:8080 -->
www:80) and I work with internal hostnames that do not resolve externally.
The firewall has a FQDN and I can see the startpage, but when following
an internal links on that page it doesn't work anymore.

I think I need to define a rewrite rule, that
-distinguishes internal and external requests and
-in case of external requests translates internal names to the FQDN

Do I also need to consider the portforwarding in the rewrite rule?

I'm not very much into the syntax of rewrite rules and would be very
pleased if s.o. could give me a hint...


Regards,
David

Re: Rewriting and Portforwarding

am 23.11.2004 15:23:00 von Davide Bianchi

On 2004-11-23, David Obando wrote:
> outside. I defined portforwarding in the firewall (abc.xyz.com:8080 -->
> www:80) and I work with internal hostnames that do not resolve externally.
> The firewall has a FQDN and I can see the startpage, but when following
> an internal links on that page it doesn't work anymore.

Probably because your server uses absolute URL or it does rewrite the
servername. You can easily fix this by "fixing" your server to always use
the fqdn (ServerName abc.xyz.com - UseCanonicalName Off) and having
the server listening on both port 80 and 8080, this way it doesn't
matter which way you arrive. If you want to be extra-cool, configure
your internal DNS (if you have on) to resolve abc.xyz.com directly to
your apache server. This way the connection doesn't have to go trought
the firewall/router anymore.

Davide

--
Q: Why did Bill Gates cross the road?
A: To avoid the Department of Justice.