3a) Remote Access Quickstart: Bridged Networking

Last updated on
30 April 2025

Out of the box, Virtualbox has the host computer (Windows/Mac) to act as a NAT for the guest (Quickstart). This means Quickstart can see the rest of the network, but the network can't see Quickstart. If you want to access the sites on Quickstart from the host computer (or any other computer on the network) in a web browser or to edit the files, you'll need to use one of the options below to make Quickstart visible.

Before making changes to networking please be sure to read & understand how to secure Quickstart. When you're ready to proceed, multiple options have been documented here by users. However, please note:

  • The following options are user-suggested. Use at your own risk.
  • Different network configurations and computer setups greatly affect the success of these networks. You might have to fiddle with these.
  • Consequently, please don't file support requests for this setup.
  • There may be security issues -- proceed with caution!

Options for accessing Quickstart files remotely:

  1. Use bridged networking
  2. Set up an OpenSSH server
  3. Add a listening port to Apache
  4. Use two network adapters

Bridged networking option

Quickstart can become visible to the rest of the network through "Bridged Networking".
Virtualbox adds a MAC address to the host NIC, which Quickstart uses to get it's own IP address.

WARNING! This is a security risk!

Quickstart was designed to work protected by a NAT Firewall. It has known passwords for both the Quickstart and root user. If you follow this, please change the passwords for these two users. See http://drupal.org/node/1080160

If you enable bridged networking, anyone who sees your Quickstart on a network (wifi), THEY WILL BE ABLE TO LOGIN TO YOUR DEV ENV AS ROOT. Please perform your own security assessment, and report any opportunities for improvement in the project issue queue.

This is a bit advanced, so it doesn't have to make sense, but know it may not work on all computers. Please don't file support requests on bridged networking.

Configure bridged networking

1) Shut down Quickstart
2) Start Virtualbox

  • right-click the Quickstart entry (don't start it) -> settings
  • Choose "Network" from the left list
  • Change the "Attached to" field from "NAT" to "Bridged adapter". If you have more than one network adapter, choose an appropriate one in the "Name" field.
  • Ok

3) Start Quickstart

If necessary, tell Ubuntu to restart the network to get a new IP:

  • In the top left, click the radar with red ! and select Auto eth0.
  • The radar will turn to an up/down arrow icon.

4) Find the new IP address:

  • Right-click over that "up/down" arrow icon and select "Connection information".
  • Or alternatively, use this command: (run in the terminal, which can be started using the icon: black box with a > in it):
$ ifconfig eth0
  • ifconfig will output something like this:
  •         eth0      Link encap:Ethernet  HWaddr 08:00:27:16:f6:02  
                      inet addr:192.168.1.8  Bcast:192.168.1.255  Mask:255.255.255.0
                      inet6 addr: fe80::a00:27ff:fe16:f602/64 Scope:Link
                      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                      RX packets:115 errors:0 dropped:0 overruns:0 frame:0
                      TX packets:114 errors:0 dropped:0 overruns:0 carrier:0
                      collisions:0 txqueuelen:1000 
                      RX bytes:29606 (29.6 KB)  TX bytes:76916 (76.9 KB)
                      Interrupt:10 Base address:0xd020 
    
  • the "inet addr" field shows that Quickstart's new IP address is 192.168.1.8
  • 5) If you type "http://192.168.1.8" into another computer on the network, you would get the "Quickstart" page from the computer.

    Quickstart gives each website it's own "domain" by editing the /etc/hosts file. Run "drush quickstart" in the terminal for more information.

    Quickstart uses Apache's "Virtual Hosting" to run more than one website on the same IP.

    For this to work, Apache uses the URL address to figure out which "virtual host" website to use when it gets a request.
    When Apache gets requests with only an IP, it doesn't know how to respond, and shows the default site.

    To get to the website from another "web browser computer", that computer must make the request with the same URL used in Quickstart.
    This "web browser computer" can be Quickstart's host computer, or another computer on the network.
    To accomplish this, the "web browser computer" must translate the URL to Quickstarts new IP. This is usually done through a "hosts" file.

    6) In Quickstart:

    • go to the desktop
    • open the websites folder -> config folder -> open the hosts file
    • copy all the lines with #quickstart at the end. E.g.
    127.0.0.1  mysite #quickstart
    127.0.0.1  othersite #quickstart
    

    7) On the "web browser computer", paste these lines into the bottom of it's "hosts" file:

    192.168.1.8  mysite #quickstart
    192.168.1.8  othersite #quickstart
    

    This file can be found:

    • unix: /etc/hosts
    • windows: C:\WINDOWS\system32\drivers\etc\hosts
    • mac: /etc/hosts
    • For detailed instructions, Google "edit hosts ".

    8) Once this is complete (the computer may need to be restarted), you can access the website on the "web browser computer" using the url: http://mysite

    By default, Quickstart will use DHCP. You can change this to a static IP if you like. DHCP servers give a "IP lease" for a certain amount of time (this is configurable on the router/server). How the DHCP server gives out leases may vary, but generally if you keep using the IP, when the lease needs to be renewed, you'll get the same IP and won't need to re-edit the /etc/hosts file.

    Notes on this method

    • Yes, it's complicated and depends on your network config.
    • Yes, your mileage may vary.
    • You will get better results with bridged networking if you use Quickstart on the same network, every day. Switching wifi networks or from Ethernet to wifi might require changes to the host files each time.
    • The bridged network setting in Virtualbox has been known to cause kernel panics in some Macs.

    OpenSSH server option

    From user Danny_Joris:
    You can create an (s)FTP and SSH (using putty on winOS) connection by installing OpenSSH on the Guest OS (quickstart). Instructions are here: https://help.ubuntu.com/10.04/serverguide/C/openssh-server.html . Only need to install openssh-server on the Guest OS if you're using Putty (as far as I know).

    This can be useful if you want to use a code editor that is located on the Host OS. I still have to test this more in depth, but I assume it takes off some CPU load off the VM.

    Note: Bridged networking may need to be set up anyway in order to use this option. Bridged networking does not need to be set up. It works perfectly with NAT and Host-Only combined. This way you can enable quickstart and have it run in the background without actually needing to go in the GUI of Ubuntu. (This is a performance saver.)

    New listening port on Apache option

    From user pau1_m:

    This solution is not dependent on fixed IPs or making changes to the host OS.

    First, add a new listening port to Apache. In this example I'm going to use port 55555.
    In ports.conf located at /home/quickstart/websites/config/ports.conf

    Add this line to the end of the file:

    NameVirtualHost *:55555
    Listen 55555

    Now we tell apache to point this port to example.dev. Edit the file at /home/quickstart/websites/config/apache-sites-enabled/example.dev and change the first line <VirtualHost *:80> to <VirtualHost *:55555>

    In the terminal, restart Apache:

    sudo apache2ctl restart

    Ensure that networking mode is Bridged rather than NAT.

    You should now be able to access example.dev from a browser on the host (or any other machine on the network) by entering the guest's IP and site's port number. In my case this is:

    http://192.168.0.8:55555

    If you use NAT verify your IP - usually something like 10.0.2.2. In this case the address should be:

    http://10.0.2.2:55555

    Or on the guest at:

    http://localhost:55555

    This procedure can be followed for any number of sites -- just use different port numbers for each.

    Two network adapters option

    From user derhasi:
    This approach works with using two network adapters, one via NAT for the connection to the internet, and one via Host-Only to provide a static IP connection from Host to guest. This is advanced -- see the Virtualbox networking documentation)

    What's important is with this additional IP address, other computers on the network can access Quickstart as if it was a separate computer. This allows Quickstart to act as a web server to other OSes.

    Help improve this page

    Page status: Not set

    You can: