Results 1 to 7 of 7
Hi folks,
Ubuntu 1010 server 64bit
Oracle VirtualBox
Squirrelmail is running on a VM (guest). It can be contacted on the host by running;
http://ip/webmail
But unable to contact it ...
- 01-27-2012 #1Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,546
Re. SquirrelMail
Hi folks,
Ubuntu 1010 server 64bit
Oracle VirtualBox
Squirrelmail is running on a VM (guest). It can be contacted on the host by running;
http://ip/webmail
But unable to contact it running:
http://server1.domain.com/webmail
Please help. TIA
B.R.
satimis
- 01-27-2012 #2
Does the 'server1.domain.com' hostname resolve to the same IP address as in the first one you listed? You can find out by opening a terminal window on the machine you're connecting from and using this call:
(or, if that fails, just try to ping the machine, and it'll do the nameserver lookup for you).Code:# nslookup server1.domain.com
If that doesn't give you the IP address of the server, then you have a DNS issue. If that succeeds then it could, perhaps, be down to the virtual host settings in the apache server on the SquirrelMail server.Linux user #126863 - see http://linuxcounter.net/
- 01-27-2012 #3Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,546
Hi,
On host terminal:
# nslookup server1.domain.com# ping server1.domain.comCode:;; connection timed out; no servers could be reached
# ping 192.168.0.xxx (server IP)Code:ping: unknown host server1.domain.com
On server (VM) terminal:Code:PING 192.168.0.xxx (192.168.0.xxx) 56(84) bytes of data. 64 bytes from 192.168.0.xxx: icmp_req=1 ttl=64 time=3.65 ms 64 bytes from 192.168.0.xxx: icmp_req=2 ttl=64 time=0.161 ms ....
# cat /etc/resolv.confCode:nameserver xxx.xxx.xxx.xxx (ISP nameserver IP) nameserver 192.168.0.1
B.R.
satimis
- 01-27-2012 #4
Nameserver issues are the worst of scenarios here - and what I'd expected following your description of the problem.
How you fix it depends on your network layout (not just your local machine), and the way DNS (and, potentially, DHCP) is configured.
I'm hoping that you've got the simplest of configurations, you have one machine connected to the internet through a modem/router, and your SquirrelMail machine is running on a VM on that box. If this is the case, you'll get around this simply by just adding an entry pointing at the VM in the host machine's 'hosts' file (if it's Linux it'll be /etc/hosts, the file is in different places on different OS's though)
If you're running on a network that isn't using DHCP to assign IP addresses, then you need to make sure that the nameserver machine (from your resolv.conf, this appears to be 192.168.0.1) DNS configuration contains an entry for the VM, and that you put the 192.168... address above the ISP address in your resolv.conf. In this case, you probably want to ensure your DNS server is configured to forward other address requests to your ISP's DNS service.
If you're running on a network that IS running DHCP, then you probably want to update the DHCP information so that it provides the correct DNS address (this ends up being written to resolve.conf when your DHCP client requests an address). Then you'd need to make sure your DNS system contained an entry for the VM's details.
In all cases, you can probably get away with just adding an entry to the /etc/hosts file on the main computer. This solution will not work for other machines on the network, though.Linux user #126863 - see http://linuxcounter.net/
- 01-27-2012 #5Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,546
This advice works for me here.
On host
$ sudo nano /etc/hosts
add following lineedit /etc/resolv.conf asCode:192.168.0.xxx server1.domain.com server1
$ sudo /etc/init.d/hostname restartCode:nameserver 192.168.0.1 nameserver xxx.xxx.xxx.xxx (ISP nameserver IP)
Then it works.
$ ping server1.domain.comThanks.Code:PING server1.domain.com (192.168.0.xxx) 56(84) bytes of data. 64 bytes from server1.domain.com (192.168.0.xxx): icmp_req=1 ttl=64 time=0.196 ms...
I recall that several years ago I encountered the same problem. I used this method to solve it. I also added all VMs domain and their IP on host /etc/hosts. It worked seamlessly.
Thanks again.
B.R.
satimis
- 01-27-2012 #6
If you're not running your own DNS server on 192.168.0.1, then you want these the other way up - or possibly just the ISP entry on its own. If 192.168.0.1 doesn't respond to DNS requests, you'll find that DNS requests you make will wait for that to time out before going to the second entry.
I only suggested changing it if you are running a DNS server.Linux user #126863 - see http://linuxcounter.net/
- 01-28-2012 #7Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,546


Reply With Quote
