[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 175
  • Last Modified:

Debian - Inside local network

I just installed debian and apache and everything is up and running on 192.168.1.102...  However, when i type my domain name inside my local network, for some reason, it keeps trying to hit 192.168.1.103, instead of 102...   Even when i try to ping my domain name inside my local network, it tries to hit .103.  I have no computers on my network assigned with an IP of .103.   When i am outside my network, such as work or some other place, i can get to my website just fine...  When i do type in .102 inside my local network in IE, it does take me to my website/server...   Anyone got any clue?
0
ivirdi
Asked:
ivirdi
  • 2
1 Solution
 
jlevieCommented:
What's in the hosts file on your debian box?

When one hasn't made hosts file records for an externally visble domain and tries to got to that site via name from inside of a NAT'ing firewall one finds that they "can't get there from here". And that's because the FQDN, using DNS, resolves to the outside IP. Most firewalls won't allow an inside machine to "go out and come back in" so the attempt times out.  I've never heard of a firewall changing the ouside IP to some other, so I suspect that you might have a hosts file record that equates the FQDN for the site to the wrong IP.

The final solution here, once we figure out what's happening, is to create a hosts file record on the Debian box that equates the FQDN to the correct inside IP.
0
 
ivirdiAuthor Commented:
Here's how my etc/hosts file looks:
127.0.0.1       localhost
192.168.1.102   www.website.com  doom

# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


This is how my resolv.conf files looks:
search www.website.com
nameserver 192.168.1.1
0
 
jlevieCommented:
In your hosts file "192.168.1.102   www.website.com  doom" should really be "192.168.1.102   www.website.com  www doom". And in resolv.conf you should have "search website.com".

If you do 'host www.website.com' or 'nslookup www.website.com' what is the result?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now