Skip to content

Instantly share code, notes, and snippets.

@tiffany-taylor
Last active July 17, 2020 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiffany-taylor/53df6b35af3b8e972b47be679732d36d to your computer and use it in GitHub Desktop.
Save tiffany-taylor/53df6b35af3b8e972b47be679732d36d to your computer and use it in GitHub Desktop.

Setting up Bridged Mode in Ubuntu Server in Virtualbox

(Note: these are primarily notes for myself, so a lot of assumptions are made based on things I already know. I may add additional relevant information in the future, I may not.)

Things that will need setting up prior to setting up bridged mode

  • Set up the server like normal, sudo apt update and what not.
  • Install vim as well.
  • Settings for VM will need Network set up to Bridged Adapter to be able to SSH into the machine after configuration is complete.

And then setting up bridged mode in the VM...

  1. test pinging google.com, it should "just work"
  2. get LAN IP of host machine
    • at time of writing: 10.0.37.210
  3. ls /etc/netplan/*.yaml, look for a file like eth0.yaml or 50-cloud-init.yaml
    • in this case: /etc/netplan/50-cloud-init.yaml
  4. cat the file to verify it's the correct one, should be something like
network:
   ethernets:
      enp0s3:
         addresses: []
  1. edit the file - sudo vim /etc/netplan/50-cloud-init.yaml -- DO NOT FORGET SUDO
ethernets:
        enp0s3:
            addresses: [ 10.11.0.1/8 ]
            gateway4: 10.0.37.1
            nameservers:
              addresses: [ 10.0.37.1, 8.8.8.8, 8.8.4.4 ]
            dhcp4: no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment