Directing sites to different IP's

DrJohnZoidberg

Honorary Master
Joined
Jul 24, 2006
Messages
28,026
Reaction score
7,492
Location
Table View
I have a quick question.

I have two sites which I need to access from the outside, let's call them:

site1.company.com
site2.company.com

These sites are being hosted off the two different machines (same machine actually but the one is VM), one of them is running Windows IIS and the other is a Linux box running Apache.

I want to be able to direct site1.company.com to 192.168.1.1 and site2.company.com to 192.168.1.2. I have one port forward on the firewall which is currently directing the traffic to 192.168.1.2.

What would be the best approach to achieve this?
 
Way I would do it (if understanding correctly) is create 2 x A records. One for site1 to the one IP and site2 to the other.
 
Way I would do it (if understanding correctly) is create 2 x A records. One for site1 to the one IP and site2 to the other.

EDIT: Ignore me. I never noticed the 2 internal IP's.

You could however try using CNAME records and map the 2 sites to different ports (if you have access to DNS records), then forward those ports when they arrive at your router.
If using DynDNS then this won't apply.
 
I have a quick question.

I have two sites which I need to access from the outside, let's call them:

site1.company.com
site2.company.com

These sites are being hosted off the two different machines (same machine actually but the one is VM), one of them is running Windows IIS and the other is a Linux box running Apache.

I want to be able to direct site1.company.com to 192.168.1.1 and site2.company.com to 192.168.1.2. I have one port forward on the firewall which is currently directing the traffic to 192.168.1.2.

What would be the best approach to achieve this?
If you host them on internal ips, the only way to do this, is by having a reverse squid proxy also behind the firewall.

1. External DNS should point both sites your single public IP
2. Internal DNS should point the sites to their respective internal IPs
3. Squid proxy installed, should use internal dns
4. Port forward port 80 on the router to the squid proxy
5. Ensure squid proxy is set up to only allow proxing to the 2x internal ips for security reasons, and so that hackers dont abuse your proxy.

Tada and test.
 
If you host them on internal ips, the only way to do this, is by having a reverse squid proxy also behind the firewall.

1. External DNS should point both sites your single public IP
2. Internal DNS should point the sites to their respective internal IPs
3. Squid proxy installed, should use internal dns
4. Port forward port 80 on the router to the squid proxy
5. Ensure squid proxy is set up to only allow proxing to the 2x internal ips for security reasons, and so that hackers dont abuse your proxy.

Tada and test.

Thanks, this is the answer I was looking for. Sorry other guys but I didn't explain it all that well.

Sounds like too much extra PT, think I'll just use a different port number on the Apache site, not ideal but easier than the squid solution.

At least I know how to do this now, it was killing me not knowing how to get this right :D
 
Top
Sign up to the MyBroadband newsletter
X