How to install GNS3 on Kali Linux Rolling
You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose
The GNS3 team is getting smarter and harder every day GNS3 Tools must be used when learning and testing network implementations. GNS3 is a graphical network simulator, which can simulate complex networks. It is an indispensable tool when preparing for CCNA, JNCIA, CCNP and CCIE level network certification. Each new release adds new features and improves existing features.
In this article, we will discuss installing GNS3 on Kali Linux 2020.x and the latest rolling version. The GNS3 project has evolved to support many devices from multiple network vendors, including Cisco virtual switches, Cisco ASA, Brocade vRouters, Cumulus Linux switches, Docker instances, HPE VSR, multiple Linux devices, and many other devices.
Some of the core functions of GNS3 are:
- Completely free and open source-no monthly or annual license fees
- There is no limit to the number of devices supported-CPU and RAM hardware are your only limits
- GNS3 supports all VIRL images (IOSv, IOSvL2, IOS-XRv, CSR1000v, NX-OSv, ASAv)
- GNS3 can operate in a multi-vendor environment with or without a management program
- It supports multiple switching options (ESW16 Etherswitch, IOU/IOL layer 2 image, VIRL IOSvL2)
- GNS3 supports free and paid hypervisors-Virtualbox, VMware Workstation, VMware Player, ESXi, Fusion
- GNS3 has native support for Linux without the need for other virtualization software
Step 1: Update the system
Start the installation by updating the system and all installed packages to the latest version.
sudo apt update
sudo apt upgrade
Since the upgrade may include updates to the kernel, let us reboot the system.
sudo reboot
Step 2: Install the required dependencies
Make sure your Kali Linux has the correct repository configured.
Add Kali Linux official repository to source.list
Update the APT index of the package:
$ sudo apt update
Get:1 http://kali.download/kali kali-rolling InRelease [30.5 kB]
Get:2 http://kali.download/kali kali-rolling/contrib Sources [63.7 kB]
Get:4 http://kali.download/kali kali-rolling/main Sources [13.8 MB]
Get:8 http://kali.download/kali kali-rolling/non-free Sources [127 kB]
Get:9 http://kali.download/kali kali-rolling/main amd64 Packages [17.5 MB]
Get:10 http://kali.download/kali kali-rolling/non-free amd64 Packages [202 kB]
Get:11 http://kali.download/kali kali-rolling/contrib amd64 Packages [106 kB]
Fetched 28.2 MB in 16s (1,769 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Install the following software dependencies
sudo apt install -y python3-pip python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebsockets qemu qemu-kvm qemu-utils libvirt-clients libvirt-daemon-system virtinst wireshark xtightvncviewer apt-transport-https ca-certificates curl gnupg2 software-properties-common
Step 3: Install GNS3 on Kali Linux Rolling
Finally, perform the installation of GNS3 on the Kali Linux Rolling version.
Install GNS3 server components
$ sudo pip3 install gns3-server
Collecting gns3-server
Downloading gns3-server-2.2.17.tar.gz (8.7 MB)
|████████████████████████████████| 8.7 MB 4.2 MB/s
Requirement already satisfied: Jinja2>=2.7.3 in /usr/lib/python3/dist-packages (from gns3-server) (2.11.2)
Collecting aiofiles==0.5.0
Downloading aiofiles-0.5.0-py3-none-any.whl (11 kB)
Collecting aiohttp-cors==0.7.0
Downloading aiohttp_cors-0.7.0-py3-none-any.whl (27 kB)
Requirement already satisfied: aiohttp==3.6.2 in /usr/lib/python3/dist-packages (from gns3-server) (3.6.2)
Requirement already satisfied: async-timeout==3.0.1 in /usr/lib/python3/dist-packages (from gns3-server) (3.0.1)
Requirement already satisfied: distro>=1.3.0 in /usr/lib/python3/dist-packages (from gns3-server) (1.5.0)
Requirement already satisfied: jsonschema==3.2.0 in /usr/lib/python3/dist-packages (from gns3-server) (3.2.0)
Collecting psutil==5.6.7
Downloading psutil-5.6.7.tar.gz (448 kB)
|████████████████████████████████| 448 kB 4.9 MB/s
Collecting py-cpuinfo==7.0.0
Downloading py-cpuinfo-7.0.0.tar.gz (95 kB)
|████████████████████████████████| 95 kB 3.0 MB/s
Collecting sentry-sdk>=0.14.4
Downloading sentry_sdk-0.19.5-py2.py3-none-any.whl (128 kB)
|████████████████████████████████| 128 kB 4.7 MB/s
Requirement already satisfied: urllib3>=1.10.0 in /usr/lib/python3/dist-packages (from sentry-sdk>=0.14.4->gns3-server) (1.26.2)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from sentry-sdk>=0.14.4->gns3-server) (2020.6.20)
Building wheels for collected packages: gns3-server, psutil, py-cpuinfo
Building wheel for gns3-server (setup.py) ... done
Created wheel for gns3-server: filename=gns3_server-2.2.17-py3-none-any.whl size=9362887 sha256=d41b291e64f3296c747f99ccfd7a85080572274b270a173070d84abe03fa3e32
Stored in directory: /root/.cache/pip/wheels/7c/93/bf/6988e561eb06b210a54928f884483e35ce48ca7fad4c8bffc0
Building wheel for psutil (setup.py) ... done
Created wheel for psutil: filename=psutil-5.6.7-cp39-cp39-linux_x86_64.whl size=265842 sha256=02c84201fd411405155645990d6c833588c130ffb8dc4978c652e7561344e424
Stored in directory: /root/.cache/pip/wheels/67/e7/5d/b8eb44db682bf1a1859a6e6d2540045869edaee3731552adc0
Building wheel for py-cpuinfo (setup.py) ... done
Created wheel for py-cpuinfo: filename=py_cpuinfo-7.0.0-py3-none-any.whl size=20068 sha256=15426c9fbf5132b19bc648bc50137d21413486439ea1a25786f738ec3fa138f3
Stored in directory: /root/.cache/pip/wheels/7f/2c/24/85d73581e5927be15689598ed1f02fe2a40cc66314232507c4
Successfully built gns3-server psutil py-cpuinfo
Installing collected packages: aiofiles, aiohttp-cors, psutil, py-cpuinfo, sentry-sdk, gns3-server
Attempting uninstall: psutil
Found existing installation: psutil 5.7.3
Not uninstalling psutil at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'psutil'. No files were found to uninstall.
Successfully installed aiofiles-0.5.0 aiohttp-cors-0.7.0 gns3-server-2.2.17 psutil-5.6.7 py-cpuinfo-7.0.0 sentry-sdk-0.19.5
Wait for the installation to complete, and then install the GUI components.
$ sudo pip3 install gns3-gui
Collecting gns3-gui
Downloading gns3-gui-2.2.17.tar.gz (4.9 MB)
|████████████████████████████████| 4.9 MB 1.2 MB/s
Requirement already satisfied: distro>=1.3.0 in /usr/lib/python3/dist-packages (from gns3-gui) (1.5.0)
Requirement already satisfied: jsonschema==3.2.0 in /usr/lib/python3/dist-packages (from gns3-gui) (3.2.0)
Requirement already satisfied: psutil==5.6.7 in /usr/local/lib/python3.9/dist-packages (from gns3-gui) (5.6.7)
Requirement already satisfied: sentry-sdk>=0.14.4 in /usr/local/lib/python3.9/dist-packages (from gns3-gui) (0.19.5)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from sentry-sdk>=0.14.4->gns3-gui) (2020.6.20)
Requirement already satisfied: urllib3>=1.10.0 in /usr/lib/python3/dist-packages (from sentry-sdk>=0.14.4->gns3-gui) (1.26.2)
Building wheels for collected packages: gns3-gui
Building wheel for gns3-gui (setup.py) ... done
Created wheel for gns3-gui: filename=gns3_gui-2.2.17-py3-none-any.whl size=3815821 sha256=700245f3b2668c0c3cc4e6e4e015ea2ebef4f7a2703f44a8809869a8d9c38ba1
Stored in directory: /root/.cache/pip/wheels/a0/8c/61/bcfd1f0c4324732bb6a051a80a71c0bfa6bdce5e248b064cdb
Successfully built gns3-gui
Installing collected packages: gns3-gui
Successfully installed gns3-gui-2.2.17
You can start GNS3 from CLI
$ gns3
Or by searching for the GNS3 application from the desktop and launching it.
The next step will be GNS3 installation wizard for your local server Then continue Create your first GNS3 topology.
Step 4: Set up Docker support
If you want to support Docker in GNS3, you need to install Docker CE following the steps in the following guide.
Install Docker and Docker Compose on Kali Linux
Then add the GNS3 repository
sudo tee /etc/apt/sources.list.d/gns3.list<<EOF
deb http://ppa.launchpad.net/gns3/ppa/ubuntu bionic main
deb-src http://ppa.launchpad.net/gns3/ppa/ubuntu bionic main
EOF
Import the GPG repository key:
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F88F6D313016330404F710FC9A2FD067A2E3EF7B
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.WQqu0nldXm/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys F88F6D313016330404F710FC9A2FD067A2E3EF7B
gpg: key 9A2FD067A2E3EF7B: public key "Launchpad PPA for GNS3" imported
gpg: Total number processed: 1
gpg: imported: 1
Update APT package index:
sudo apt update
Then install dynamips ubridge:
$ sudo apt install dynamips ubridge
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
gns3
The following NEW packages will be installed:
dynamips ubridge
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 391 kB of archives.
After this operation, 1,190 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/gns3/ppa/ubuntu bionic/main amd64 dynamips amd64 0.2.21-1~bionic1 [358 kB]
Get:2 http://ppa.launchpad.net/gns3/ppa/ubuntu bionic/main amd64 ubridge amd64 0.9.18-1~bionic1 [32.8 kB]
Fetched 391 kB in 9s (44.6 kB/s)
Preconfiguring packages ...
Selecting previously unselected package dynamips.
(Reading database ... 275469 files and directories currently installed.)
Preparing to unpack .../dynamips_0.2.21-1~bionic1_amd64.deb ...
Unpacking dynamips (0.2.21-1~bionic1) ...
Selecting previously unselected package ubridge.
Preparing to unpack .../ubridge_0.9.18-1~bionic1_amd64.deb ...
Unpacking ubridge (0.9.18-1~bionic1) ...
Setting up dynamips (0.2.21-1~bionic1) ...
Setting up ubridge (0.9.18-1~bionic1) ...
Processing triggers for man-db (2.9.3-2) ...
Processing triggers for kali-menu (2021.1.2) ...
Add your users to the following groups:
sudo usermod -aG kvm,libvirt,docker,ubridge,wireshark $USER
To prevent accidentally installing any other files from this repository (temporarily), delete the comment lines in the file.
sudo tee /etc/apt/sources.list.d/gns3.list<<EOF
#deb http://ppa.launchpad.net/gns3/ppa/ubuntu bionic main
#deb-src http://ppa.launchpad.net/gns3/ppa/ubuntu bionic main
EOF
Refresh metadata
sudo apt update
Recommended online books:
Best CCNA R&S (200-125) certification preparation
Best CCNA Security (210-260) Certification Study Books
Best CCNP R&S certification preparation
You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose