2 Websites on an IIS behind a Linux Firewall and a router

Posted on 2000-02-21
Last Modified: 2010-03-18
I've an Internet Information Server 4.0 which is connected to a linux firewall, using the proxy squid and the rinetd package. This Firewll is connected to a Cisco router.
The problem is, that i have to use the IIS as a server for two webpages.
The adresses of this two webpages are route to the same ip-Adress. To the Adress of the firewall, which guides them to the IIS.
How can I divide the connections of these  two adresse either on the firewall or on the IIS 4.0?

Thanks to all.

Question by:WhiteFalcon022100

Expert Comment

ID: 2546029
My guess is that at least one web page will require a non-standard port number. Then you need to run IPCHAINS on the linux firewall to forward the packets.


Accepted Solution

monas earned 100 total points
ID: 2547377
I suppose you don't have to use non standard ports.

First, let me ask 2 questions:

1) is squid used to transfer request from firewall to IIS?

2) how much (1 or 2) computers with IIS you are going to run/ are running/ willing to run?

The simplest case ("A") is when answer to second question is 1. In this case you have to configure IIS to support virtual servers (sorry, I never did that on IIS). They will listen on the same port and and depending on what document user will ask ( or - will act like connection would come to different web servers. This could be done 'cos all modern web browsers DO SEND name of the host from where they wish to get a document.

In this case you should achieve that computers behid firewall be able to access documents two different pages from this server - and you are done. No changes on firewall will be needed.

The more difficult situation is if answer to second questions is 2. You have 2 options:
- ask your ISP for second address on internet card of your firewall (case "B");
- run HTTP protocol aware proxy on firewall (case "C")

For case "B" you use "alias" feature and assign second address to the same network card which is connected to your cisco. And then using ipchains you could configure that if connection is made to the main address - you forward it to first server running IIS, if to aliased - forward to the second IIS server.

For case "C" - if you have to live with just one IP address - you don't have to configure forwarding of incoming web requests at IP (read ipchains) level. Instead all this trafic should be accepted by proxy. This proxy will look into requests, find the which server is needed, contact it, get information, and returns to the requestor.

For this case I doubt rinetd is suffitient. If you run squid just as proxy for internal computers you may consider giving it more work. Using ACL's you can configure it to allow internal clients to use it for accessing all the documents in the world,and clients comming from "internet" - just your firewalled IIS servers.

You may need to make little trique - if your firewall is allso used as DNS server, serving web addreses of those IIS servers, then you will need to include internal(firewalled) addresses to /etc/hosts table. This way any outsider's browser will get that it should contact your firewall to get info from your ISSs, but squid will know internal addresses where information is really stored.

And final notice. In case you will plan to use SSL sometime in the future - be warned that only case "B" (besides non-standard ports) will work - even domain name in such transactions are encrypted and nobody could find to what host request are comming...

Good Look!
LVL 15

Expert Comment

ID: 2550462
   monas option (and explanations) surely looks good to me.  Quite complex though.
   Another option that you might want to consider is to work on the squid.  Perhaps you can do some rule rewriting on the squid, and let squid do the fetching for web pages from either the two internal web servers.  I would recommend this since on squid, you can actually work on the URL string that the user passed in and rewrite the header and passed it to the internal web server.  The worst part is, I can't give you a detail step-by-step on how you could do this.  I've came across this idea from  Give them a visit.

   The other option is to make use of rinetd. (I would like to apologize if monas already touch this -- reading thru his/her explanation give me a woo woo).  You need to set up your IIS to run on a different port number for each virtual domain you want to serve.  Assuming that you have: listen on port 80  ( I'm not sure IIS can do this or not) listen on port 81  ( )

and your internal ip is which points to the box where domaina and domainb pages are hosted.

and on the firewall , alias you network interface to have two IP, look at you rinetd.conf

first-ip-address 80 80  <-- for domain
second-ip-address 80 81 <-- for domain

Hope this helps


Author Comment

ID: 2557005
There is one problem. I do not know whether the Cisco Router routes the Host header names to the firewall or not.
Can somebody tell me how I can find this out??

Expert Comment

ID: 2557283

      I sure routes. Cisco works at TCP/IP level, and "host header" is at HTTP level, which is above TCP/IP. And therefore it could route all or nothing... Unless it works as a firewall also and has web proxy built in...

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question