Ip's not being properly distingushed

Heres the thing I have URL’s and Ip’s

The URL’s are fine once made but IP’s aren’t working properly to what I want.

The ip stuff is like this:

server.revnet (My local lan and general stuff top level main dns for home stuff)

  • 110.175.205.112 (External IP, Set as default)
  • 192.168.1.1 (Internal IP )
    URL Server 1
    URL Server 2
    URL Server 3

This works fine except 1 thing the 192.168.1.1 internal IP is showing the external 110.175.205.112 IP site and not its own site.

If I set 192.168.1.1 as default everything works fine except all newly created hostnames before domains in virtualmin are setup will show the 192.168.1.1 IP site when I had hoped to use the external 110.175.205.112 IP as a kinda masking site untill a virtualmin domain is setup or when enyone tries to the IP dirtect.

As mentioned everything seems to work properly when I set 192.168.1.1 as default but not on 110.175.205.112 I presume its because all my hosts share that IP as default.

From my knowledge of apache etc I should be able to share 2 sites on different IP’s one internal one external but setting the external as default seems to make the internal use that instead of its own vhost.

Any ideas on this?

Everything else seems to be is working great.

Howdy,

Is your server behind a NAT router? And is 192.168.1.1 the primary IP of your server, while 110.175.205.x is an IP address that exists on your router?

-Eric

Yea is from what I learned during networking class and stuff I may be slightly wrong here is everything from a PC is sent via the internal IP and Nat forwards the requests as an bridge based on packet information with the headers.

So ultimately I was just curious, as for why it worked properly with both IP’s in a way, when internal was set as default and not other way round as internalIP got disabled I’m not too sure on.

With a DNS server here I know I can make as many hosts on my lan as I want even if I wanted to make a host or DNS entry that uses a domain name as a real site if I wanted to create a fake internal only spoof page for example.

Howdy,

Well, I believe the issue you’re seeing is that, from Apache’s point of view, there is only one IP address… and that’s the one on your server, 192.168.1.1.

Apache doesn’t know anything about 110.175.205.x, since that’s hosted on your router.

Your router is forwarding requests from 110.175.205.x to 192.168.1.1.

Now, you know something about both IP’s, and you understand how that layout/architecture works.

But from Apache’s point of view, the only thing it knows is that it’s running on 192.168.1.1.

Does that make sense?

-Eric

Sorry for the delayed reply, haven’t been too well etc like usual and doing other things.

Kinda makes sense I’m going to do some tests someday soonish and see what they do just as a test as it did work only when internal ip was set as default from an internal system.

Yea I do know its related to all internal ip addressing in some way.

I know bits of pieces from my courses etc and running my own home network etc even setup a small single room network once with smoothwall at one time for a uni student refurb place to grab windows updates from the main system where only the main system had net access due to configuration on smoothwall.

So basically I like to learn why and how things are done like this as its interesting.

Sometimes though even if the answer is soo simple I cant get my head round it.