Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all, Host - Ubuntu 12.04 VM - Ubuntu 12.04 Virtualizer - Oracle VirtualBox I'm prepared installing router and DHCP server. Can I install them on a VM instead on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,763

    Install router and DHCP server on VM


    Hi all,

    Host - Ubuntu 12.04
    VM - Ubuntu 12.04
    Virtualizer - Oracle VirtualBox

    I'm prepared installing router and DHCP server. Can I install them on a VM instead on the Host? I expect keeping the Host clean only for running Oracle VirtualBox.

    Tutorial:-

    Router
    https://help.ubuntu.com/community/Router


    DHCP server:
    Dynamic Host Configuration Protocol (DHCP)
    https://help.ubuntu.com/12.04/serverguide/dhcp.html

    Setting up a DHCP server on Ubuntu 12.04 (Precise Pangolin) server
    Setting up a DHCP server on Ubuntu 12.04 (Precise Pangolin) server | Lani's Weblog

    Please advise. Thanks

    Rgds
    satimis

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,158
    How do you have the network configured in VirtualBox for this virtual machine? That is the key here. You need to configure it as a bridged adapter, not a NAT'd one.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,763
    Quote Originally Posted by Rubberman View Post
    How do you have the network configured in VirtualBox for this virtual machine? That is the key here. You need to configure it as a bridged adapter, not a NAT'd one.
    Hi,


    This is my real headache. I'm now searching for advice how to config;

    1)
    /etc/network/interfaces - host
    so that it won't connect ISP but using the routing on VM router to access Internet

    2)
    /etc/network/interaces - VM
    so that the virtual NIC would connect ISP directly to access Internet


    Connection
    eth1 - direct to ADSL cable modem (not physcal router)
    eth2 - for internal network

    VM
    Network
    Adapter 1 - NAT
    Adapter 2 - Bridged Adapter
    (Here it shows eth0 and eth1. But on VM it shows eth1 and eth2. I don't understand WHY?)

    Document followed:
    Router Guide
    Setting up an Ubuntu Wired/Wireless Router
    https://help.ubuntu.com/community/Router


    Host
    ====
    $ cat /etc/network/interfaces
    Code:
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    VM
    ==
    $ cat /etc/network/interfaces
    Code:
    auto lo
    iface lo inet loopback
    
    auto eth1
    iface eth1 inet static
        address 2xx.2xx.2xx.1xx
        netmask 255.255.255.0
        gateway 2xx.2xx.2xx.1xx
    
    auto eth2
    iface eth2 inet static
        address 192.168.0.1
        network 192.168.0.0
        netmask 255.255.255.0
        broadcast 192.168.0.255
    
    auto br0
    iface br0 inet static
        address 192.168.0.1
        network 192.168.0.0
        netmask 255.255.255.0
        broadcast 192.168.0.255
    But this config didn't work!

    Rgds
    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
  •