Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,814

    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

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,931
    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:

    Code:
    # nslookup server1.domain.com
    (or, if that fails, just try to ping the machine, and it'll do the nameserver lookup for you).

    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/

  3. #3
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,814
    Quote Originally Posted by Roxoff View Post
    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:

    Code:
    # nslookup server1.domain.com
    (or, if that fails, just try to ping the machine, and it'll do the nameserver lookup for you).

    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.
    Hi,

    On host terminal:

    # nslookup server1.domain.com
    Code:
    ;; connection timed out; no servers could be reached
    # ping server1.domain.com
    Code:
    ping: unknown host server1.domain.com
    # ping 192.168.0.xxx (server IP)
    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
    ....
    On server (VM) terminal:
    # cat /etc/resolv.conf
    Code:
    nameserver xxx.xxx.xxx.xxx (ISP nameserver IP)
    nameserver 192.168.0.1

    B.R.
    satimis

  4. $spacer_open
    $spacer_close
  5. #4
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,931
    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/

  6. #5
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,814
    Quote Originally Posted by Roxoff View Post
    - snip -
    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)
    ...
    This advice works for me here.

    On host
    $ sudo nano /etc/hosts
    add following line
    Code:
    192.168.0.xxx server1.domain.com server1
    edit /etc/resolv.conf as
    Code:
    nameserver 192.168.0.1
    nameserver xxx.xxx.xxx.xxx (ISP nameserver IP)
    $ sudo /etc/init.d/hostname restart

    Then it works.

    $ ping server1.domain.com
    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...
    Thanks.

    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

  7. #6
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,931
    Quote Originally Posted by satimis View Post
    edit /etc/resolv.conf as
    Code:
    nameserver 192.168.0.1
    nameserver xxx.xxx.xxx.xxx (ISP nameserver IP)
    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/

  8. #7
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,814
    Quote Originally Posted by Roxoff View Post
    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.
    I have bind9 installed on this VM. I have'nt installed a DNS server on a separate VM yet. I'm now using ISP DNS server instead. I'll install a DNS server later.

    Thanks

    B.R.
    satimis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •