View Full Version : Portforwarding depending on HTTP header

2006-06-23, 03:32
I have the following problem to solve.
In the internal network is a webserver that offers to web processes. One on port 80 and one on port 81.
The external address is a single address.
In DNS there are two entries for the services like;
web1.my.com A-host
web2 CNAME web1

Now comes the problem.
When a client goes to http://web1.my.com it will be NATed to the internal webserver on port 80
But how can I make a rule that when a client connects to http://web2.my.com it will be NATed to the same internal webserver only to port 81

I knwo a webserver like Apache has all capabilities to have these virtual server processes that are redirected internally based on the HTTP header. But unfortunatly this webserver doesnt allow me to do that.

Any help is appreciated
Maurice Hoeneveld

2006-07-11, 04:47

I feel till now your two links are are pointing to the same destination IP with two different ports 80, 81. If this is the case then have you tried Static NAT.
Creat one object with IP = Web server's IP and one static rule, I feel it should work

2006-07-11, 08:09
Create a http uri resource redirecting to internal server on port 81 depending on the "host" field you define in the object.

2006-07-14, 03:55
What URL go the users use to connect to the web2 from outside?

http://web2.my.com:80 OR http://web2.my.com:81 ?