VMWare guest cannot connect to the net

Discussion in 'Server Operation' started by mbogh, Aug 24, 2009.

  1. mbogh

    mbogh New Member

    Hello,

    I have recently bought a new server at Hetzner, a EQ4 with 4 IPs
    Main ip: 188.40.X.12
    Additional ip1: 188.40.X.44
    Additional ip2: 188.40.X.45
    Additional ip3: 188.40.X.46

    On the server i have installed Debian Lenny minimal and installed VMWare Server 2.0.1.

    I want to be to have the additional ips routed to the VMs, so each VM has a "real" ip instead of a local ip.
    So on the Host I have uncommented net.ipv4.ip_forward=1 in /etc/sysctl.conf and /etc/network/interfaces looks like this:
    Code:
    ### Hetzner Online AG - installimage
    # Loopback device:
    auto lo
    iface lo inet loopback
    
    # device: eth0
    auto  eth0
    iface eth0 inet static
      address   188.40.X.12
      broadcast 188.40.X.63
      netmask   255.255.255.192
      gateway   188.40.X.1
    
    # default route to access subnet
    #up route add -net 188.40.X.0 netmask 255.255.255.192 gw 188.40.X.1 eth0
    up route add -host 188.40.X.44 gw 188.40.X.44
    up route add -host 188.40.X.45 gw 188.40.X.45
    up route add -host 188.40.X.46 gw 188.40.X.46
    
    The VM network is set to Bridge mode and /etc/network/interfaces looks like this:
    Code:
    auto lo
    iface lo inet loopback
    
    allow-hotplug eth0
    iface eth0 inet static
            address 188.40.X.44
            netmask 255.255.255.192
            gateway 188.40.X.12
    
    But the VM cannot connect to the internet, the VM can ping the host on ip 188.40.X.12 and the host can ping the VM on ip 188.40.X.44.

    Can you guys help me?
    I have used the following howto http://blog.damn1337.de/2009/07/hetzner-eq-serie-mit-zusatzlichen-ip-adressen-howto but as you can see, it is pretty short on the client setup.

    Thanks in advance
    mbogh

    *more info*
    I have found another site describing the exact same approach http://wiki.impressive-media.de/doc...e-vmware-server-für-zusätzliche-clients-4-ips
    But as I said earlier, the guest cannot access the internet.
     
    Last edited: Aug 24, 2009
  2. falko

    falko Super Moderator ISPConfig Developer

    I'd add this line to /etc/network/interfaces on the guest:

    Code:
    up route add -host 188.40.X.44 gw 188.40.X.12
     

Share This Page