Tag Archives: virtualbox

Make CentOS virtual machine in VirtualBox use the host’s VPN Connection

If your host PC (in my case Windows 10) is connected to a VPN but your CentOS 6.x VM is not using the VPN, then do the following:

1: Power off your CentOS VM.

2: Right click your centos machine in virtualbox and then click “Settings“.

right click your centos virtual machine and click settings (Screenshot)

3: Click “Network” and change the Adapter Settings to “NAT“.

change virtualbox network settings to NAT (Screenshot)

4: Now power on your centos virtual machine.

5: Once your VM boots up, login and then restart the network service. You can use the following CLI command “service network restart“.

Your CentOS virtual machine should now to able to use the VPN connection and use it accordingly. Do verify the same in your virtual machine. Hope this helps!

Do like and subscribe if this guide helped you. Cheers!

Install Kali Linux in virtualbox (using ova file)

This is how I installed Kali Linux in virtualbox using the ova file method in my windows 10 PC along with its screenshots.

Requirements:

  1. Kali Linux 2019.1 Preinstalled ImageDownload Link (Torrent)  (~3.2 GB) [Updated link o latest Kali Version]
  2. VirtualBox: Download Link (~200 MB)
  3. CPU that supports Virtualization.
  4. Atleast 8GB of free disk space
  5. 7-zip: Download Link (~1.4 MB) [ Note: Winrar is another alternative you could use instead of 7-zip.]
  6. Virtual Box Extension Pack: Download Link (~22 MB) [Optional]

Installation Procedure:

The first thing you need to do is go ahead download and install Virtualbox in your system. Then download the Kali Linux ova file mentioned above and extract it using 7-zip or Winrar. The extracted file would be a .ova file format which is a pre-installed Kali Linux machine. Using a pre-installed file saves us a lot of time as we don’t have to go through the whole installation process.

Now, open VirtualBox:

open virtualbox

Then click on “File” and then click on “Import Appliance“.

click file import appliance

Click on the folder icon as shown below.

import ova file window

Now, browse to and select the extract .ova Kali Linux image file and click on “Open“.

select kali linux ova file

You would now see a window called “Appliance settings” where you can configure stuff like the name of your VM, the amount of RAM to be allocated to your Kali Linux VM etc.

kali linux appliance settings

If you want to change the name of the VM, simply click on the text and you can change it according to your will.

changing vm name

Finally, click on “Import” and wait for a few moments to import the Kali Linux Appliance.

click import to load kali linux appliance

importing kali linux appliance progress bar

Now, right click on your Kali Linux Virtual machine as shown below and click on “Settings“.

open kali linux virtual machine Settings

If you need to adjust the amount of RAM, click on “System” and you can move the slider accordingly. I would suggest atleast a minimum of 2048 MB (2GB) of RAM.

select ram for your Kali Linux VM

Now, click on “Network” as shown below and select “Bridged Adapter” and then click on “OK“.

Select Kali Linux network mode to Bridged Adapter

Click on your Kali Linux VM and then click on Start as shown below.

start kali linux in virtualbox

You should now be able to see the grub menu. Hit “Enter” in your keyboard.

kali linux grub menu

Now, login to your Kali Linux machine with the default username as root and password toor.

Note: If you are using newer Kali versions (from year 2020 ), the username and password is “kali”.

Ref: https://www.kali.org/docs/introduction/default-credentials/

kali username

kali password

You should now be booted into your Kali Linux desktop.

kali linux logged in

Customize Kali (Optional): 

I would like to make some minor changes to make sure the VM is not interrupted during pen testing. This section is purely optional, you can skip to the next section if you don’t want to customize it.

Click on the triangle pointing downwards in the upper right corner and then click on the “Settings” icon.

Kali Linux drop down menu

This will bring you the “All Settings” window as shown below. Click on “Date & Time“.

all settings menu

You can change the time zone to your time zone.

change time zone

Now, go back to the “All Settings” window and then click on “Privacy“.

select privacy in all setting menu

You would see a screen similar to the one below:

default privacy settings

Now, disable “Automatic Screen Lock” by moving the slider.

disable auto screen lock

Go back to “All Settings“, then click on “Power“.

click on power in all settings

Now, select Blank Screen option as “Never” and turn off  “Automatic Suspend” as shown below.

disable blank screen and automatic suspend

Update Kali Linux:

Open the terminal window by clicking on the icon as shown below:

open terminal

This is what the terminal window would look like in a Kali Linux system.

Kali Linux Terminal

Enter the following commands in the terminal to update your Kali Linux system.

apt-get clean && apt-get update -y
apt-get upgrade -y && apt-get dist-upgrade -y

This may take a while depending on your internet connection for the update to complete.

And that is it for setting up Kali Linux in virtualbox to get started with pentesting (only for ethical hacking and for purely educational purposes).

If you have any sort of queries regarding this installation, just leave a comment and will get back to you. I will be posting some ethical hacking tutorials in the future, so stay tuned.

Double quotes not working in Linux terminal – [Solution]

I encountered an issue in my CentOS VM where whenever I type the  (single quote) or the  (double quotes) in the terminal, they don’t get displayed. I did the following to fix the issue:

In your terminal window, type the following:

# setxkbmap -layout us

You should now be able to use single, double quotes or tilde symbols in your terminal.

The above command simply changes the keyboard layout to English (US) and this is under the assumption that you are actually using a English (US) keyboard in your PC.

[Note: English (US) layout is different from English (US) International keyboard layout].

You can check the screenshot below for reference.

setxkbmap -layout us

Thanks and credits to this post that helped me resolve this issue.

Feel free to leave a comment in the comments section down below. Happy troubleshooting! Cheers!

how to import ova file into virtualbox + Screenshots

This is a guide on how to import an ova file into virtualbox with screenshots.

In Oracle virtualbox, click on “File” and then click on “Import Appliance“.

import ovi file into virtualbox

Then click on the “folder” icon as shown below:

select ovi file

Select the .ova file you need to import and then click on “Open“.

browse to ovi location

Click on “Next“:

ovi file selected, click next

importing

Now, you can configure the options, such as change the virtual machine’s name which is optional as show below:

change VM name if needed

You can also change the location of your virtual machine’s hard disk if needed by changing the location field.

change virtual machine's hard disk location if needed

Now, you can go ahead and start you VM.

VM created, select and then click start

Wohoo! You have successfully imported your ova file into virtualbox.

If this article helped you, do share this by clicking on the share buttons you see in this page. If you have any queries feel free to leave a comment below and I will get back to you! Happy Virtualization!

Source: Link

ifconfig does not show eth0 in centos 6 on virtualbox – Solution + Screenshots

After installing CentOS 6.x or importing a preinstalled VDI image (for example from osboxes.org) if your network is not working or if eth0 does not show up, then you can follow these steps to fix it:

Step 1Inspect ifconfig output

Run the following command:

ifconfig

ifconfig no eth0

As you can see it shows only the output for loopback interface lo.

To find all interface information and MAC for eth0, run the following command:

ifconfig -a

Now, take a note of the MAC Address that you see in your screen as you will need it soon.

eth0 mac address

Step 2: Manually configure eth0 and network settings:

Type the following in your terminal:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

Change/edit the ifcfg-eth0 as the following, and make sure the HWADDR value is the MAC address that you took a note earlier.

DEVICE=eth0
HWADDR=08:00:27:87:09:6A
NM_CONTROLLED=NO
ONBOOT=YES
BOOTPROTO=dhcp

So, it will finally look something like picture attached below.

ifcfg-eth0 configuration fileTo edit your network file, type the following command:

vi /etc/sysconfig/network

Now, add the following line if its not already present to the file:

NETWORKING=yes

/etc/sysconfig/network file

Save the file and exit.

Step 3. Restart network service

service network restart

This should fix the issue and your eth0 interface should popup in no time as shown below.

service network restart no output fixed

You can also check the IP address information using ifconfig to check the assigned IP address.

ifconfig

eth0 ifconfig output solved

Hope this helps! If you found this article helpful, do share this article by clicking on the sharing icons you see in your screen.

Feel free to leave a comment below if need any further help and will get back to you as soon as possible. Subscribe for future updates!

Source: Link

How To fix “This kernel requires an x86-64 CPU, but only detected an i686 CPU. This processor is unsupported in RHEL 7.” when booting from VirtualBox

Error: This kernel requires an x86-64 CPU, but only detected an i686 CPU.
This processor is unsupported in RHEL 7. 

centos-boot-error

[Note: This tutorial is under the assumption that your physical CPU is 64-bit and your installed host OS is 64-bit and will only work in these circumstances.]

Cause:

This mainly happens due two reasons:

  1. If you have a 64-bit OS installed but the VirtualBox OS type is accidentally changed/set to 32-bit after installation.
  2. If Vt-X (Virtualization) is disabled in the BIOS. (This can happen if you reset your BIOS to default settings which may have disabled Vt-X  bit).

Solution:

Step 1: Right Click on the Centos/RHEL OS which is giving you the error and then click on “Settings“.

virtualbox settings

Step 2: In General Tab, check the OS Type and see if you are able to change to “Redhat 64-bit” and follow step 4.

change os type

Step 3: If you are only able to see 32-bit entries in the OS type list and your physical CPU supports 64-bit, this means that Vt-X is disabled in your BIOS. So, restart your PC and boot into your BIOS, enable Vt-X.

For reference, I have a Asus Maximus VII Ranger Motherboard and here is how I enabled Vt-X in my BIOS.

enable vt-x

[Optional: If your CPU supports Vt-d, enable that too, it will improve functionality and performance of your Virtual Machine. Some CPUs will not have the Vt-d function, if you dont have it then you can ignore it]

optional step to enabled vt-d

Step 4: Restart your computer and boot back your CentOS/RHEL VM and it should come right up.

centos boot error fixed

Hope this fixed the issue. If this tutorial helped you,do  leave a thumbs up a comment below. Hope this helps! 🙂

If you have any sort of queries,  just leave a comment below and will get back to you. Don’t forget to follow my blog to get future updates! 😀

Regards,
ΞXΤЯ3МΞ