Networking with VirtualBox
The VBoxTuntl tool is included with VirtualBox; basically, this is the well-known tunctl tool.
Make the start script executable and enter it as the Enabling Program in the VirtualBox configuration GUI using a sudo combination such as gtksudo startscript (Figure 5).
If you do not have a graphical interface, you can do this instead:
VBoxManage modifyvm "VMName" -tapsetup1 "gtksudo startscript"
Listing 2 shows the script for disabling the TAP interface. Again, you must enter the path to the executable script in the VirtualBox input field, preferably in combination with a sudo command in Disabling Program.
In this case, an alternative command-line approach uses VBoxManage with the -tapterminate1 option.
After the virtual machine has booted, it calls the enabling script to create a TAP interface and prompts you for the root password because of the call to gtksudo. When the guest is shut down, the second script removes the TAP interface.
Disabling a TAP Interface
01 #!/bin/bash 02 # disconnect the interface (the name is in $2) from the bridge: 03 brctl delif br0 $2 04 # and remove the interface 05 VBoxTunctl -d $2
The commercial variant of VirtualBox can redirect screen output to another computer via the Remote Desktop Protocol (RDP), letting users on the machine access the virtual machine's desktop directly over the network, no matter what network configuration you set up for the virtual machine. This makes VirtualBox suitable for servers without a GUI.
To enable what the manufacturer refers to as the Remote Display, you first need to specify the port number VirtualBox will use to offer the service on the host. To avoid the virtual machine's desktop being open to public viewing, it also makes sense to specify an authentication method.
External means that users must log on to the host using the host's standard method; Guest means logging on to the guest system. Null completely disables authentication.
After saving the new settings, restart the virtual machine at the command line by typing VBoxVRDP -startvm. Users can then launch rdesktop or any other RDP client to view the virtual machine's desktop at their workplaces.
Difficult, Stable, and Fast
All three connection types that VirtualBox offers for networking the virtual machine have advantages and disadvantages, and the optimum solution really depends on circumstances.
If you just need to access the Internet from the virtual machine, NAT mode is a useful option, but one that makes remote access impossible. For a server in a sandbox, your only option is the complex host interface configuration with bridging tools.
Buy this article as PDF
Kernel king admits his tone has alienated volunteers, but says the demands of the process require directness.
New flaw in an old encryption scheme leaves the experts scrambling to disable SSL 3
Lennart Poettering wants to change the way Linux developers talk to each other.
Enterprise giant frees itself from ink and home PCs (and visa versa).
Mozilla’s product think tank sinks silently into history.
TODO group will focus on open source tools in large-scale environments.
New tool will look like GParted but support a wider range of storage technologies.
New public key pinning feature will help prevent man-in-the-middle attacks.
Carnegie Mellon researchers say 3 million pages could fall down the phishing hole in the next year.
The US government rolls new best-practice rules for protecting SSH.