WHAT TO EXPECT
In this article, users will learn how to download and install the required packages and their dependencies, necessary to deploy an xNIC to agents in an air-gapped environment. Without the dependencies already on the air-gapped client, the xNIC installation will fail.
Please follow the instructions based on your operating system:
Installing Dependencies for RHEL-based Distros
The easiest way to install dependencies on RHEL-based distros is using the built-in tool called repotrack. By using this tool, users can download the necessary packages with their dependencies using a single command on an ancillary VM. Then, they can copy the RPM files to the target agents (the air-gapped VMs) and install them there.
List of dependencies
Based on the version of the operating system, a user will have different package requirements.
Major Version | Packages list |
|---|---|
RHEL 8 or 9 | libpcap libatomic libarchive iproute-tc bpftool jq |
Amazon Linux | libpcap libatomic libarchive iproute-tc bpftool jq wget |
Prerequisites: Install yum-utils to get repotrack
If the user wants to use repotrack, he will need to install yum-utils. To do this, enter the following command and respond yes when asked:
$ sudo yum install yum-utilsHere is an example output:
Example
$ sudo yum install yum-utils
Last metadata expiration check: 0:04:24 ago on Fri 26 Jul 2024 03:35:50 PM UTC.
Dependencies resolved.
=================================================================================================================
Package Architecture Version Repository Size
=================================================================================================================
Installing:
yum-utils noarch 4.0.21-25.el8 rhui-rhel-8-for-x86_64-baseos-rhui-rpms 76 k
Transaction Summary
=================================================================================================================
Install 1 Package
Total download size: 76 k
Installed size: 23 k
Is this ok [y/N]: y
Downloading Packages:
yum-utils-4.0.21-25.el8.noarch.rpm 1.5 MB/s | 76 kB 00:00
-----------------------------------------------------------------------------------------------------------------
Total 987 kB/s | 76 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : yum-utils-4.0.21-25.el8.noarch 1/1
Running scriptlet: yum-utils-4.0.21-25.el8.noarch 1/1
Verifying : yum-utils-4.0.21-25.el8.noarch 1/1
Installed:
yum-utils-4.0.21-25.el8.noarch
Complete!STEP ONE: Download All Packages and Dependencies onto the Ancillary VM
The ancillary VM should have an identical OS version to the VM that is in the air-gap environment. It should also have the ability to connect to both the internet and the agent.
NOTE
It is not necessary to have both access simultaneously. For security reasons the procedure can be done in two steps, first the download from internet (without connection to the agents), and then copying to the agents (without internet connectivity).
Log in to the ancillary VM.
Create a folder and change to that folder.
Execute the following command, replacing <packages-list> with the list associated with the correct version.
sudo repotrack <packages-list>This will download the packages and ALL their dependencies onto the newly created folder in the ancillary VM.
STEP TWO: Copy the RPM files to the Target VM
Copy the files from the ancillary VM to the agents. For example, using secure-copy (SCP) by issuing the following command.
scp -i <private-key-path&file> *.rpm <target-username>@<target-hostname-or-IP>:<target-path>Example with replaced values:
scp -i ~/.ssh/key.priv *.rpm swxtchadmin@172.41.130.20:/home/swxtchadmin/rpms
STEP THREE: Install the packages and dependencies on the Target VM
In the folder containing all the RPM files sent from the ancillary VM, issue the following command on the Target VM:
sudo dnf install *.rpm --disablerepo=* --allowerasing --skip-brokenThis will analyze the system, skip what's already installed, give a report, and ask for confirmation.
You are now ready to install the xNIC.
Installing Dependencies for Ubuntu distros
List of dependencies
The following packages must be installed on the target VM in order to successfully deploy an xNIC in an air-gapped environment using Type 1 or Type 2:
libpcap-dev binutils iproute2 linux-tools-generic libatomic1 libnl-route-3-200 libarchive-dev jqInstalling Type 3 needs:
libpcap-dev binutils iproute2 linux-tools-generic libatomic1 libnl-route-3-200 libarchive-dev jq libnuma-dev libmnl-dev python-is-python3Instructions
Log in to the ancillary VM.
Run the following command in the ancillary VM to acquire the updated repositories:
sudo apt updateHere is an example output:
Example
$ sudo apt update Hit:1 http://us-central1.gce.archive.ubuntu.com/ubuntu focal InRelease Get:2 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates InRelease [128 kB] Get:3 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-backports InRelease [128 kB] Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [128 kB] Get:5 http://us-central1.gce.archive.ubuntu.com/ubuntu focal/universe amd64 Packages [8628 kB] Get:6 http://us-central1.gce.archive.ubuntu.com/ubuntu focal/universe Translation-en [5124 kB] Get:7 http://us-central1.gce.archive.ubuntu.com/ubuntu focal/universe amd64 c-n-f Metadata [265 kB] Get:8 http://us-central1.gce.archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [144 kB] Get:9 http://us-central1.gce.archive.ubuntu.com/ubuntu focal/multiverse Translation-en [104 kB] Get:10 http://us-central1.gce.archive.ubuntu.com/ubuntu focal/multiverse amd64 c-n-f Metadata [9136 B] Get:11 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [3456 kB] Get:12 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [538 kB] Get:13 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [17.7 kB] Get:14 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [3104 kB] Get:15 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [434 kB] Get:16 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata [540 B] Get:17 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1215 kB] Get:18 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [293 kB] Get:19 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [27.5 kB] Get:20 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [27.1 kB] Get:21 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates/multiverse Translation-en [7936 B] Get:22 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata [616 B] Get:23 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [45.7 kB] Get:24 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-backports/main Translation-en [16.3 kB] Get:25 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-backports/main amd64 c-n-f Metadata [1420 B] Get:26 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-backports/restricted amd64 c-n-f Metadata [116 B] Get:27 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [25.0 kB] Get:28 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-backports/universe Translation-en [16.3 kB] Get:29 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [880 B] Get:30 http://us-central1.gce.archive.ubuntu.com/ubuntu focal-backports/multiverse amd64 c-n-f Metadata [116 B] Get:31 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [3086 kB] Get:32 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [459 kB] Get:33 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [14.0 kB] Get:34 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [2985 kB] Get:35 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [417 kB] Get:36 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata [544 B] Get:37 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [996 kB] Get:38 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [211 kB] Get:39 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [20.9 kB] Get:40 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [24.8 kB] Get:41 http://security.ubuntu.com/ubuntu focal-security/multiverse Translation-en [5968 B] Get:42 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata [540 B] Fetched 32.1 MB in 5s (6704 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 22 packages can be upgraded. Run 'apt list --upgradable' to see them.
Create an empty folder change to that folder. This will house the dependencies.
Use the following command to get the list of URLs that will be downloaded:
apt-get -y install --print-uris <packages-list> | cut -d\' -f2 | grep http:// > apturlsThis will not generate a visible output but a file.
Download all the files with the following command:
wget -i apturlsHere is an example output:
Example
$ wget -i apturls --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/n/numactl/libnuma1_2.0.12-1_amd64.deb Resolving us-central1.gce.archive.ubuntu.com (us-central1.gce.archive.ubuntu.com)... 35.224.11.34, 35.193.225.125, 35.184.25.42, ... Connecting to us-central1.gce.archive.ubuntu.com (us-central1.gce.archive.ubuntu.com)|35.224.11.34|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 20828 (20K) [application/vnd.debian.binary-package] Saving to: ‘libnuma1_2.0.12-1_amd64.deb’ libnuma1_2.0.12-1_amd64.deb 100%[===========================================================================================>] 20.34K --.-KB/s in 0.001s 2024-07-26 15:07:14 (20.2 MB/s) - ‘libnuma1_2.0.12-1_amd64.deb’ saved [20828/20828] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-common_2.34-6ubuntu1.9_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 207936 (203K) [application/vnd.debian.binary-package] Saving to: ‘binutils-common_2.34-6ubuntu1.9_amd64.deb’ binutils-common_2.34-6ubuntu1.9_amd64.deb 100%[===========================================================================================>] 203.06K --.-KB/s in 0.009s 2024-07-26 15:07:14 (22.5 MB/s) - ‘binutils-common_2.34-6ubuntu1.9_amd64.deb’ saved [207936/207936] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/b/binutils/libbinutils_2.34-6ubuntu1.9_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 474932 (464K) [application/vnd.debian.binary-package] Saving to: ‘libbinutils_2.34-6ubuntu1.9_amd64.deb’ libbinutils_2.34-6ubuntu1.9_amd64.deb 100%[===========================================================================================>] 463.80K --.-KB/s in 0.01s 2024-07-26 15:07:14 (32.8 MB/s) - ‘libbinutils_2.34-6ubuntu1.9_amd64.deb’ saved [474932/474932] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/b/binutils/libctf-nobfd0_2.34-6ubuntu1.9_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 48248 (47K) [application/vnd.debian.binary-package] Saving to: ‘libctf-nobfd0_2.34-6ubuntu1.9_amd64.deb’ libctf-nobfd0_2.34-6ubuntu1.9_amd64.deb 100%[===========================================================================================>] 47.12K --.-KB/s in 0s 2024-07-26 15:07:14 (145 MB/s) - ‘libctf-nobfd0_2.34-6ubuntu1.9_amd64.deb’ saved [48248/48248] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/b/binutils/libctf0_2.34-6ubuntu1.9_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 46620 (46K) [application/vnd.debian.binary-package] Saving to: ‘libctf0_2.34-6ubuntu1.9_amd64.deb’ libctf0_2.34-6ubuntu1.9_amd64.deb 100%[===========================================================================================>] 45.53K --.-KB/s in 0.001s 2024-07-26 15:07:14 (41.1 MB/s) - ‘libctf0_2.34-6ubuntu1.9_amd64.deb’ saved [46620/46620] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-x86-64-linux-gnu_2.34-6ubuntu1.9_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 1613596 (1.5M) [application/vnd.debian.binary-package] Saving to: ‘binutils-x86-64-linux-gnu_2.34-6ubuntu1.9_amd64.deb’ binutils-x86-64-linux-gnu_2.34-6ubuntu1.9_a 100%[===========================================================================================>] 1.54M --.-KB/s in 0.03s 2024-07-26 15:07:14 (59.6 MB/s) - ‘binutils-x86-64-linux-gnu_2.34-6ubuntu1.9_amd64.deb’ saved [1613596/1613596] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/b/binutils/binutils_2.34-6ubuntu1.9_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 3380 (3.3K) [application/vnd.debian.binary-package] Saving to: ‘binutils_2.34-6ubuntu1.9_amd64.deb’ binutils_2.34-6ubuntu1.9_amd64.deb 100%[===========================================================================================>] 3.30K --.-KB/s in 0s 2024-07-26 15:07:14 (532 MB/s) - ‘binutils_2.34-6ubuntu1.9_amd64.deb’ saved [3380/3380] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/universe/libo/libonig/libonig5_6.9.4-1_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 141948 (139K) [application/vnd.debian.binary-package] Saving to: ‘libonig5_6.9.4-1_amd64.deb’ libonig5_6.9.4-1_amd64.deb 100%[===========================================================================================>] 138.62K --.-KB/s in 0.005s 2024-07-26 15:07:14 (25.1 MB/s) - ‘libonig5_6.9.4-1_amd64.deb’ saved [141948/141948] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/universe/j/jq/libjq1_1.6-1ubuntu0.20.04.1_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 120892 (118K) [application/vnd.debian.binary-package] Saving to: ‘libjq1_1.6-1ubuntu0.20.04.1_amd64.deb’ libjq1_1.6-1ubuntu0.20.04.1_amd64.deb 100%[===========================================================================================>] 118.06K --.-KB/s in 0.04s 2024-07-26 15:07:14 (2.64 MB/s) - ‘libjq1_1.6-1ubuntu0.20.04.1_amd64.deb’ saved [120892/120892] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/universe/j/jq/jq_1.6-1ubuntu0.20.04.1_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 50196 (49K) [application/vnd.debian.binary-package] Saving to: ‘jq_1.6-1ubuntu0.20.04.1_amd64.deb’ jq_1.6-1ubuntu0.20.04.1_amd64.deb 100%[===========================================================================================>] 49.02K --.-KB/s in 0.002s 2024-07-26 15:07:14 (21.7 MB/s) - ‘jq_1.6-1ubuntu0.20.04.1_amd64.deb’ saved [50196/50196] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc-dev-bin_2.31-0ubuntu9.16_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 71612 (70K) [application/vnd.debian.binary-package] Saving to: ‘libc-dev-bin_2.31-0ubuntu9.16_amd64.deb’ libc-dev-bin_2.31-0ubuntu9.16_amd64.deb 100%[===========================================================================================>] 69.93K --.-KB/s in 0.001s 2024-07-26 15:07:14 (70.3 MB/s) - ‘libc-dev-bin_2.31-0ubuntu9.16_amd64.deb’ saved [71612/71612] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_5.4.0-190.210_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 1138252 (1.1M) [application/vnd.debian.binary-package] Saving to: ‘linux-libc-dev_5.4.0-190.210_amd64.deb’ linux-libc-dev_5.4.0-190.210_amd64.deb 100%[===========================================================================================>] 1.08M --.-KB/s in 0.01s 2024-07-26 15:07:14 (94.7 MB/s) - ‘linux-libc-dev_5.4.0-190.210_amd64.deb’ saved [1138252/1138252] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/libx/libxcrypt/libcrypt-dev_4.4.10-10ubuntu4_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 104104 (102K) [application/vnd.debian.binary-package] Saving to: ‘libcrypt-dev_4.4.10-10ubuntu4_amd64.deb’ libcrypt-dev_4.4.10-10ubuntu4_amd64.deb 100%[===========================================================================================>] 101.66K --.-KB/s in 0.001s 2024-07-26 15:07:14 (111 MB/s) - ‘libcrypt-dev_4.4.10-10ubuntu4_amd64.deb’ saved [104104/104104] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-dev_2.31-0ubuntu9.16_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 2520144 (2.4M) [application/vnd.debian.binary-package] Saving to: ‘libc6-dev_2.31-0ubuntu9.16_amd64.deb’ libc6-dev_2.31-0ubuntu9.16_amd64.deb 100%[===========================================================================================>] 2.40M --.-KB/s in 0.04s 2024-07-26 15:07:14 (56.0 MB/s) - ‘libc6-dev_2.31-0ubuntu9.16_amd64.deb’ saved [2520144/2520144] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/e/elfutils/libdw1_0.176-1.1ubuntu0.1_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 225528 (220K) [application/vnd.debian.binary-package] Saving to: ‘libdw1_0.176-1.1ubuntu0.1_amd64.deb’ libdw1_0.176-1.1ubuntu0.1_amd64.deb 100%[===========================================================================================>] 220.24K --.-KB/s in 0.005s 2024-07-26 15:07:14 (42.4 MB/s) - ‘libdw1_0.176-1.1ubuntu0.1_amd64.deb’ saved [225528/225528] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/libp/libpcap/libpcap0.8-dev_1.9.1-3_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 244140 (238K) [application/vnd.debian.binary-package] Saving to: ‘libpcap0.8-dev_1.9.1-3_amd64.deb’ libpcap0.8-dev_1.9.1-3_amd64.deb 100%[===========================================================================================>] 238.42K --.-KB/s in 0.009s 2024-07-26 15:07:14 (27.1 MB/s) - ‘libpcap0.8-dev_1.9.1-3_amd64.deb’ saved [244140/244140] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/libp/libpcap/libpcap-dev_1.9.1-3_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 3484 (3.4K) [application/vnd.debian.binary-package] Saving to: ‘libpcap-dev_1.9.1-3_amd64.deb’ libpcap-dev_1.9.1-3_amd64.deb 100%[===========================================================================================>] 3.40K --.-KB/s in 0s 2024-07-26 15:07:14 (568 MB/s) - ‘libpcap-dev_1.9.1-3_amd64.deb’ saved [3484/3484] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-tools-common_5.4.0-190.210_all.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 225144 (220K) [application/vnd.debian.binary-package] Saving to: ‘linux-tools-common_5.4.0-190.210_all.deb’ linux-tools-common_5.4.0-190.210_all.deb 100%[===========================================================================================>] 219.87K --.-KB/s in 0.007s 2024-07-26 15:07:14 (29.4 MB/s) - ‘linux-tools-common_5.4.0-190.210_all.deb’ saved [225144/225144] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-tools-5.4.0-190_5.4.0-190.210_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 5633692 (5.4M) [application/vnd.debian.binary-package] Saving to: ‘linux-tools-5.4.0-190_5.4.0-190.210_amd64.deb’ linux-tools-5.4.0-190_5.4.0-190.210_amd64.d 100%[===========================================================================================>] 5.37M --.-KB/s in 0.1s 2024-07-26 15:07:14 (39.3 MB/s) - ‘linux-tools-5.4.0-190_5.4.0-190.210_amd64.deb’ saved [5633692/5633692] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-tools-5.4.0-190-generic_5.4.0-190.210_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 1996 (1.9K) [application/vnd.debian.binary-package] Saving to: ‘linux-tools-5.4.0-190-generic_5.4.0-190.210_amd64.deb’ linux-tools-5.4.0-190-generic_5.4.0-190.210 100%[===========================================================================================>] 1.95K --.-KB/s in 0s 2024-07-26 15:07:14 (354 MB/s) - ‘linux-tools-5.4.0-190-generic_5.4.0-190.210_amd64.deb’ saved [1996/1996] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/l/linux-meta/linux-tools-generic_5.4.0.190.188_amd64.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 2480 (2.4K) [application/vnd.debian.binary-package] Saving to: ‘linux-tools-generic_5.4.0.190.188_amd64.deb’ linux-tools-generic_5.4.0.190.188_amd64.deb 100%[===========================================================================================>] 2.42K --.-KB/s in 0s 2024-07-26 15:07:14 (410 MB/s) - ‘linux-tools-generic_5.4.0.190.188_amd64.deb’ saved [2480/2480] --2024-07-26 15:07:14-- http://us-central1.gce.archive.ubuntu.com/ubuntu/pool/main/m/manpages/manpages-dev_5.05-1_all.deb Reusing existing connection to us-central1.gce.archive.ubuntu.com:80. HTTP request sent, awaiting response... 200 OK Length: 2265524 (2.2M) [application/vnd.debian.binary-package] Saving to: ‘manpages-dev_5.05-1_all.deb’ manpages-dev_5.05-1_all.deb 100%[===========================================================================================>] 2.16M --.-KB/s in 0.05s 2024-07-26 15:07:14 (47.2 MB/s) - ‘manpages-dev_5.05-1_all.deb’ saved [2265524/2265524] FINISHED --2024-07-26 15:07:14-- Total wall clock time: 0.5s Downloaded: 22 files, 14M in 0.4s (40.0 MB/s)
Compress all .deb file into a .tar.gz file:
tar -czvf debs.tar.gz *.debHere is an example output:
Example
$ tar -czvf debs.tar.gz *.deb binutils-common_2.34-6ubuntu1.9_amd64.deb binutils-x86-64-linux-gnu_2.34-6ubuntu1.9_amd64.deb binutils_2.34-6ubuntu1.9_amd64.deb jq_1.6-1ubuntu0.20.04.1_amd64.deb libbinutils_2.34-6ubuntu1.9_amd64.deb libc-dev-bin_2.31-0ubuntu9.16_amd64.deb libc6-dev_2.31-0ubuntu9.16_amd64.deb libcrypt-dev_4.4.10-10ubuntu4_amd64.deb libctf-nobfd0_2.34-6ubuntu1.9_amd64.deb libctf0_2.34-6ubuntu1.9_amd64.deb libdw1_0.176-1.1ubuntu0.1_amd64.deb libjq1_1.6-1ubuntu0.20.04.1_amd64.deb libnuma1_2.0.12-1_amd64.deb libonig5_6.9.4-1_amd64.deb libpcap-dev_1.9.1-3_amd64.deb libpcap0.8-dev_1.9.1-3_amd64.deb linux-libc-dev_5.4.0-190.210_amd64.deb linux-tools-5.4.0-190-generic_5.4.0-190.210_amd64.deb linux-tools-5.4.0-190_5.4.0-190.210_amd64.deb linux-tools-common_5.4.0-190.210_all.deb linux-tools-generic_5.4.0.190.188_amd64.deb manpages-dev_5.05-1_all.deb
Copy that debs.tar.gz to the target VM in the air-gapped environment. For example, use the SCP command if both VMs are connected over the network and there’s no firewall blocking traffic.
scp -i <private-key-path&file> debs.tar.gz <target-username>@<target-hostname-or-IP>:<target-path>Check the file details with the following command and verify that the filesize is non-zero:
ls -l debs.tar.gzHere is an example output:
Example
$ ls -l debs.tar.gz -rw-rw-r-- 1 swxtchadmin swxtchadmin 15165956 Jul 26 15:09 debs.tar.gzUncompress the .tar.gz in the air-gapped VM:
tar -xvzf debs.tar.gzHere is an example output:
Example
$ tar -xvzf debs.tar.gz binutils-common_2.34-6ubuntu1.9_amd64.deb binutils-x86-64-linux-gnu_2.34-6ubuntu1.9_amd64.deb binutils_2.34-6ubuntu1.9_amd64.deb jq_1.6-1ubuntu0.20.04.1_amd64.deb libbinutils_2.34-6ubuntu1.9_amd64.deb libc-dev-bin_2.31-0ubuntu9.16_amd64.deb libc6-dev_2.31-0ubuntu9.16_amd64.deb libcrypt-dev_4.4.10-10ubuntu4_amd64.deb libctf-nobfd0_2.34-6ubuntu1.9_amd64.deb libctf0_2.34-6ubuntu1.9_amd64.deb libdw1_0.176-1.1ubuntu0.1_amd64.deb libjq1_1.6-1ubuntu0.20.04.1_amd64.deb libnuma1_2.0.12-1_amd64.deb libonig5_6.9.4-1_amd64.deb libpcap-dev_1.9.1-3_amd64.deb libpcap0.8-dev_1.9.1-3_amd64.deb linux-libc-dev_5.4.0-190.210_amd64.deb linux-tools-5.4.0-190-generic_5.4.0-190.210_amd64.deb linux-tools-5.4.0-190_5.4.0-190.210_amd64.deb linux-tools-common_5.4.0-190.210_all.deb linux-tools-generic_5.4.0.190.188_amd64.deb manpages-dev_5.05-1_all.deb
Install all the .deb files with the following command:
sudo dpkg -i *.debHere is an example output:
Example
$ sudo dpkg -i *.deb Selecting previously unselected package binutils-common:amd64. (Reading database ... 62143 files and directories currently installed.) Preparing to unpack binutils-common_2.34-6ubuntu1.9_amd64.deb ... Unpacking binutils-common:amd64 (2.34-6ubuntu1.9) ... Selecting previously unselected package binutils-x86-64-linux-gnu. Preparing to unpack binutils-x86-64-linux-gnu_2.34-6ubuntu1.9_amd64.deb ... Unpacking binutils-x86-64-linux-gnu (2.34-6ubuntu1.9) ... Selecting previously unselected package binutils. Preparing to unpack binutils_2.34-6ubuntu1.9_amd64.deb ... Unpacking binutils (2.34-6ubuntu1.9) ... Selecting previously unselected package jq. Preparing to unpack jq_1.6-1ubuntu0.20.04.1_amd64.deb ... Unpacking jq (1.6-1ubuntu0.20.04.1) ... Selecting previously unselected package libbinutils:amd64. Preparing to unpack libbinutils_2.34-6ubuntu1.9_amd64.deb ... Unpacking libbinutils:amd64 (2.34-6ubuntu1.9) ... Selecting previously unselected package libc-dev-bin. Preparing to unpack libc-dev-bin_2.31-0ubuntu9.16_amd64.deb ... Unpacking libc-dev-bin (2.31-0ubuntu9.16) ... Selecting previously unselected package libc6-dev:amd64. Preparing to unpack libc6-dev_2.31-0ubuntu9.16_amd64.deb ... Unpacking libc6-dev:amd64 (2.31-0ubuntu9.16) ... Selecting previously unselected package libcrypt-dev:amd64. Preparing to unpack libcrypt-dev_4.4.10-10ubuntu4_amd64.deb ... Unpacking libcrypt-dev:amd64 (1:4.4.10-10ubuntu4) ... Selecting previously unselected package libctf-nobfd0:amd64. Preparing to unpack libctf-nobfd0_2.34-6ubuntu1.9_amd64.deb ... Unpacking libctf-nobfd0:amd64 (2.34-6ubuntu1.9) ... Selecting previously unselected package libctf0:amd64. Preparing to unpack libctf0_2.34-6ubuntu1.9_amd64.deb ... Unpacking libctf0:amd64 (2.34-6ubuntu1.9) ... Selecting previously unselected package libdw1:amd64. Preparing to unpack libdw1_0.176-1.1ubuntu0.1_amd64.deb ... Unpacking libdw1:amd64 (0.176-1.1ubuntu0.1) ... Selecting previously unselected package libjq1:amd64. Preparing to unpack libjq1_1.6-1ubuntu0.20.04.1_amd64.deb ... Unpacking libjq1:amd64 (1.6-1ubuntu0.20.04.1) ... Selecting previously unselected package libnuma1:amd64. Preparing to unpack libnuma1_2.0.12-1_amd64.deb ... Unpacking libnuma1:amd64 (2.0.12-1) ... Selecting previously unselected package libonig5:amd64. Preparing to unpack libonig5_6.9.4-1_amd64.deb ... Unpacking libonig5:amd64 (6.9.4-1) ... Selecting previously unselected package libpcap-dev:amd64. Preparing to unpack libpcap-dev_1.9.1-3_amd64.deb ... Unpacking libpcap-dev:amd64 (1.9.1-3) ... Selecting previously unselected package libpcap0.8-dev:amd64. Preparing to unpack libpcap0.8-dev_1.9.1-3_amd64.deb ... Unpacking libpcap0.8-dev:amd64 (1.9.1-3) ... Selecting previously unselected package linux-libc-dev:amd64. Preparing to unpack linux-libc-dev_5.4.0-190.210_amd64.deb ... Unpacking linux-libc-dev:amd64 (5.4.0-190.210) ... Selecting previously unselected package linux-tools-5.4.0-190-generic. Preparing to unpack linux-tools-5.4.0-190-generic_5.4.0-190.210_amd64.deb ... Unpacking linux-tools-5.4.0-190-generic (5.4.0-190.210) ... Selecting previously unselected package linux-tools-5.4.0-190. Preparing to unpack linux-tools-5.4.0-190_5.4.0-190.210_amd64.deb ... Unpacking linux-tools-5.4.0-190 (5.4.0-190.210) ... Selecting previously unselected package linux-tools-common. Preparing to unpack linux-tools-common_5.4.0-190.210_all.deb ... Unpacking linux-tools-common (5.4.0-190.210) ... Selecting previously unselected package linux-tools-generic. Preparing to unpack linux-tools-generic_5.4.0.190.188_amd64.deb ... Unpacking linux-tools-generic (5.4.0.190.188) ... Selecting previously unselected package manpages-dev. Preparing to unpack manpages-dev_5.05-1_all.deb ... Unpacking manpages-dev (5.05-1) ... Setting up binutils-common:amd64 (2.34-6ubuntu1.9) ... Setting up libbinutils:amd64 (2.34-6ubuntu1.9) ... Setting up libc-dev-bin (2.31-0ubuntu9.16) ... Setting up libcrypt-dev:amd64 (1:4.4.10-10ubuntu4) ... Setting up libctf-nobfd0:amd64 (2.34-6ubuntu1.9) ... Setting up libctf0:amd64 (2.34-6ubuntu1.9) ... Setting up libdw1:amd64 (0.176-1.1ubuntu0.1) ... Setting up libnuma1:amd64 (2.0.12-1) ... Setting up libonig5:amd64 (6.9.4-1) ... Setting up linux-libc-dev:amd64 (5.4.0-190.210) ... Setting up linux-tools-common (5.4.0-190.210) ... Setting up manpages-dev (5.05-1) ... Setting up binutils-x86-64-linux-gnu (2.34-6ubuntu1.9) ... Setting up binutils (2.34-6ubuntu1.9) ... Setting up libc6-dev:amd64 (2.31-0ubuntu9.16) ... Setting up libjq1:amd64 (1.6-1ubuntu0.20.04.1) ... Setting up libpcap0.8-dev:amd64 (1.9.1-3) ... Setting up linux-tools-5.4.0-190 (5.4.0-190.210) ... Setting up jq (1.6-1ubuntu0.20.04.1) ... Setting up libpcap-dev:amd64 (1.9.1-3) ... Setting up linux-tools-5.4.0-190-generic (5.4.0-190.210) ... Setting up linux-tools-generic (5.4.0.190.188) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for libc-bin (2.31-0ubuntu9.16) ...
Users should now be able to follow the page Install xNIC on Linux without an internet connection.