static home-network IPs and Ubuntu Server

Discussion in 'Linux Virtual Machine' started by ZachPruckowski, Jul 16, 2008.

  1. ZachPruckowski

    ZachPruckowski Bit poster

    Messages:
    5
    OK, so I installed Ubuntu Server 8.04 LTS in Parallels (latest build) on Tiger (getting Leopard shortly). I want it as a development web server, but I'm still learning Unix (this is very much for educational purposes). My goal is to have it have a static IP address on my local network such that the host computer (a Mac Pro) and my laptop (a MBP when the new ones come out) can have a simple hostfile entry for it. I'm trying to set up the same on my Mac Pro. I have two complications:

    1) I'm stuck in rural Virginia without Internet until mid-August.
    2) I don't have an X-server (being a headless server), so I can't install Parallels tools.

    I can set an IP alias on the Mac and on Linux, but how do I convince them that they're networked together? They both check my Ethernet port, realize there's nothing plugged in, and drop a "no route to host". And once I get that working, how do I bridge it such that anyone connected to my Mac Pro over Airport or Ethernet can reach the VM?

    Thanks in advance for any help.
     
  2. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
    Did you try shared networking?
    Also please let me know output from Mac OS and Ubuntu

    ifconfig -a

    Please note, that for now Ubuntu 8.04 doesn't support Parallels Tools
     
  3. ZachPruckowski

    ZachPruckowski Bit poster

    Messages:
    5
    OK. Do I need to get a network driver from elsewhere then?

    Unfortunately, I'm at work (no internet access from my computer at home), so I can't copy-paste the ifconfig results.

    I can successfully set up eth0 and en0 with an IP alias (so I have an inet: entry in ifconfig), but they still won't find a path to each other, even though they're on the same subnet.
     
  4. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
    Ok, post here when you are at home.
    Check also is it Shared Networking or Bridged Ethernet
     
  5. ZachPruckowski

    ZachPruckowski Bit poster

    Messages:
    5
    I've tried both Shared Networking and Bridged.

    I can get the OS X and Linux sides to get the right IP addresses, so the issue isn't an ifconfig one.

    Linux: eth0 inet: 172.16.12.102
    OS X: en0 inet: 172.16.12.101

    The issue is that even though they're on the same subnet, they don't have a route to each other for some reason. Why would I even need routing on the same subnet?

    I've tried switching adapters and even plugging a cable between my two Ethernet ports, to no avail. I will probably have to pony up for a router...
     
  6. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
    1. Disable firewall in Ubuntu and Mac OS
    2. Set Network adapter in Ubuntu to manual by DHCp
    3. Try Shared Networking

    Another way
    if bridged Ethernet
    Set default adapter
    and if you are using Ethernet from Mac to access Internet use that IP range if Airport in that range (if by DHCp using Airport use manual DHCP)
     
  7. ZachPruckowski

    ZachPruckowski Bit poster

    Messages:
    5
    What's the /etc/network/interfaces code to do that? I switched back to DHCP on the Linux side, but I don't know how to do DHCP with a manually configured address.

    I tried using Bonjour/avahi-daemon, and I can ping the Mac from Linux, but not vice-versa
     
  8. John@Parallels

    John@Parallels Forum Maven

    Messages:
    6,333
    Try this

    save content between lines in file /root/empty

    =====
    # Generated by iptables-save v1.2.8 on Thu Jul 17 19:49:55 2008
    *mangle
    :pREROUTING ACCEPT [0:0]
    :INPUT ACCEPT [0:0]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    :pOSTROUTING ACCEPT [0:0]
    COMMIT
    # Completed on Thu Jul 17 19:49:55 2008
    # Generated by iptables-save v1.2.8 on Thu Jul 17 19:49:55 2008
    *filter
    :INPUT ACCEPT [0:0]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    COMMIT
    # Completed on Thu Jul 1
    8:44 7 19:49:55 2008
    # Generated by iptables-save v1.2.8 on Thu Jul 17 19:49:55 2008
    *nat
    :pREROUTING ACCEPT [0:0]
    :pOSTROUTING ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    COMMIT
    # Completed on Thu Jul 17 19:49:55 2008
    =======
    then

    iptables-restore < /root/empty

    For current session there is no firewall in Ubuntu
     

Share This Page