Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a web server hosted out of our office, and it works fine when people access the site from outside the office.

The problem is that when people are inside the office and go to the website ( it's very slow, as it goes out over the internet and comes back in.

Or LAN is Windows with Active Directory and our web server is CentOS with its own internet connection.

How can I set when users in my office want see website opens it from local network instead of going out of one internet connection and back in through the other?

Thank you I test this sulotion but I think I did wrong… I explain my network I have centos 5.8 server with 2 interface Eth1 with ip : -> my modem range Eth0 with ip : -> my office range (is other router for my windows network) In dns setting I set for www and .. my wan ip address : form exam In my centos server I have 3 account (3website)

I want when I try from internal network with range , website open with and when users from external network want see website open from : form exam

right now external network with : form exam work fine and no problem

share|improve this question

There's two common ways of doing this:

Override the DNS entries in your local DNS

This is a fairly common approach. If you have a very simple website (just running on a single domain), on your Active Directory DNS, create a new zone for, and add an A record for www to point to the internal IP address of your web server. That way when your local computers attempt to access the website, they will get the internal IP address instead of the external one, but external users will still see your public IP address.

This works based on the assumption that your Active Directory DNS is not the NameServer for your public website, and that you have a different DNS provider for that (and if you don't... why..?)

Route internally

I'm going to also make the assumption that you have two routers - one for your office internet, and one for your web server. I don't know this for sure based on the info you've provided, but it's a common enough scenario.

What you need to do in this case is add a Static Route from your office router to your web server's router for the IP address in question.

Say for example your public IP address is and your web server's router is You would add a static route on your office router to route (or to

Normally your router will forward any request it doesn't know what to do with to the upstream ISP via their gateway. This effectively makes your router aware of a better, shorter route to your web server, and it will use that instead of the ISP.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.