Pivoting - Installation guide of "target-1"

Get required files:
Alpine Linux 3.5.1 64-bit (alpine-standard-3.5.1-x86_64.iso):

Install Alpine Linux on VirtualBox
Start "Oracle VM VirtualBox" if not already started
- Click "New"
Name: "target-1-alpine"
Type: "Linux"
Version: "Linux 2.4 (64-bit)"
- Click "Next >"
MB: "128"
- Click "Next >"
Select "Create a virtual hard drive now" (Default)
- Click "Create"
- Select "VDI (VirtualBox Disk Image)" and Click "Next >"
- Select "Dynamically allocated" and Click "Next >"
- "F:\VIRTUALBOX_DISKS\target-1-alpine.vdi" (your location could differ)
- "4.00 GB" (Default)
- Click "Create"
Note: A new icon "target-1-alpine" was created in your "Oracle VM VirtualBox Manager"

Note: Leave settings at default unless otherwise stated below
Note: I'm showing some important settings even though they are defaults, in case the defaults change some day
- Right-click "target-1-alpine" in the left menu and click "Settings..."
Storage - Left-Click "Empty" to select it
On the far right, click on the blue tiny CD-Rom icon and click "Choose a virtual CD/DVD disk file..."
Select "D:\APPS\Linux - Alpine\alpine-standard-3.5.1-x86_64.iso" (choose your appropriate folder)
Network - Adapter 1 - Attached to: "Bridged Adapter"
- Click "OK" to close the "target-1-alpine - Settings" screen

- Right-click "target-1-alpine" in the left menu and click "Start" -> "Normal Start"
Note: A new screen "target-1-alpine [Running] - Oracle VM VirtualBox" opens and the Kali Linux installer will boot.
In the "target-1-alpine [Running] - Oracle VM VirtualBox" screen:
You will be presented with the "localhost login:" prompt
type "root" and press your enter key
Note: You will need access to the internet to set up Alpine - so we first configure the system to use dhcp - we'll change it later.

At the "localhost:~#" prompt, type:
[none]: press enter
[localhost]: target-1
[eth0]: press enter
[dhcp]: press enter
[no]: press enter
New password: target1pass
Retype password: target1pass
[UTC]: press enter
[none]: press enter
[f]: 2
[openssh]: press enter
[chrony]: none
[none]: sda
[?]: sys
[y/N]: y
Note: The installer will start copying files - this takes a while

After the installer finishes with the message "Installation is complete. Please reboot.":
Click "Devices" in the Virtualbox top menu bar -> "Optical Drives" -> "Remove disk from virtual drive" -> click "Force unmount"

At the "localhost:~#" prompt, type:

After reboot, login with user "root" and pass "target1pass"
At the "localhost:~#" prompt, type:
apk update
apk add ca-certificates wget
wget https://www.jollyfrogs.com/scripts/pivot-target-1.sh
chmod +x pivot-target-1.sh
Note: The script will automatically make necessary changes and reboot the server

Note: After rebooting, target-1 is ready for the pivot tutorial



Filed under: Exclude from front page Installation Guides: Lab setups, Kali, etc. Pivoting