Introduction
This article explains how to connect two Ethernet adapters on a Windows host machine with an Ubuntu guest operating system and a Fortinet VPN client in VirtualBox. This setup can be useful for various purposes, such as creating a secure connection between two networks or testing network configurations.
Prerequisites
To follow this guide, you will need:
- A Windows host machine
- VirtualBox installed on the Windows host machine
- An Ubuntu guest operating system installed in VirtualBox
- A Fortinet VPN client (e.g., FortiClient)
Setting up the VirtualBox Network Adapters
First, you need to configure the VirtualBox network adapters for the Windows host and Ubuntu guest:
-
Windows Host
Go to the VirtualBox Manager, select the Windows host machine, and click on "Settings". In the "Network" tab, add a new adapter with the type "Host-only Adapter". Assign it a name, such as "Host-Only Adapter 1". Save the settings.
-
Ubuntu Guest
In the VirtualBox Manager, select the Ubuntu guest machine, and click on "Settings". In the "Network" tab, add a new adapter with the type "NAT". Save the settings.
Configuring the Ubuntu Guest to Use the Host-Only Adapter
Next, you need to configure the Ubuntu guest to use the host-only adapter:
-
Edit the network interfaces file
Open a terminal window in the Ubuntu guest and type:
sudo nano /etc/network/interfaces -
Add the host-only adapter configuration
Add the following lines at the end of the file:
auto eth1 iface eth1 inet static address 192.168.56.2 netmask 255.255.255.0 gateway 192.168.56.1
Replace "192.168.56.2" with the desired IP address for the Ubuntu guest on the host-only network.
-
Restart the networking service
Type:
sudo service networking restart
Connecting the Fortinet VPN Client
Now, you can connect the Fortinet VPN client on the Ubuntu guest:
-
Install the Fortinet VPN client
Follow the instructions in the Fortinet VPN client documentation to install the client on the Ubuntu guest.
-
Configure the VPN connection
Open the Fortinet VPN client and configure the connection to your VPN server. Make sure to use the IP address of the Windows host as the "Local IP Address" or "Local Address" in the VPN client settings.
-
Connect to the VPN server
Click "Connect" in the Fortinet VPN client to establish the VPN connection.
Testing the Connection
To test the connection, you can ping the Windows host from the Ubuntu guest:
ping 192.168.56.1
If the ping is successful, you have successfully connected two Ethernet adapters on a Windows host machine with an Ubuntu guest and a Fortinet VPN client in VirtualBox.
References
For more information, refer to: