1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-25 01:38:08 +00:00
GNS3 server
Go to file
2022-03-13 15:46:38 +10:30
.github/workflows Merge branch 'master' into 3.0 2021-10-09 12:16:50 +10:30
conf Change default config settings 2021-12-17 12:26:02 +10:30
docs Make Swagger Ui the default for API documentation 2020-11-02 12:47:59 +10:30
gns3server Merge branch '2.2' into 3.0 2022-03-13 14:50:02 +10:30
init Simpler Systemd service file. Ref #1996 2021-11-20 16:18:09 +10:30
scripts Update Docker image for tests 2021-12-17 12:20:46 +10:30
tests Drop Windows support 2022-01-19 22:28:36 +10:30
.coveragerc Fix coveralls configuration 2015-06-18 16:33:24 +02:00
.gitattributes Keep the version.py untouched when merging 2016-05-11 10:06:21 +02:00
.gitignore Rename ssl and auth configuration file settings. 2021-04-12 23:26:42 +09:30
.whitesource Add .whitesource configuration file 2020-06-26 01:01:48 +00:00
AUTHORS Adjust AUTHORS. 2015-07-12 17:25:03 -06:00
CHANGELOG Release v2.2.31 2022-02-26 18:22:29 +10:30
CONTRIBUTING.md Merge branch 'master' into 1.5 2016-06-15 19:11:26 +02:00
dev-requirements.txt Merge branch '2.2' into 3.0 2022-03-13 14:50:02 +10:30
docker-compose.yml Refactor tests and start work on database integration. 2020-12-02 18:39:08 +10:30
Dockerfile Update Docker image for tests 2021-12-17 12:20:46 +10:30
gns3server.bat Made the gns3server.bat successfully start the server independent of the CWD at the time of running. It's now relative to the location of the .bat file itself. 2015-12-24 16:45:02 +02:00
LICENSE Project structure & tools (pytest, tox etc.) 2013-10-08 11:33:51 -06:00
mac-requirements.txt Upgrade packages to latest versions 2020-11-08 21:35:54 +10:30
MANIFEST.in Remove tox and update dependencies 2020-06-26 19:08:21 +09:30
README.md Convert README to markdown 2022-03-13 15:44:26 +10:30
readthedocs.yml Use Python3.6 to build the API documentation. 2018-11-20 15:35:46 +07:00
requirements.txt Uvicorn version 0.17.6 does not support Python 3.6 2022-03-13 15:46:38 +10:30
setup.py Drop Windows support 2022-01-19 22:28:36 +10:30
win-requirements.txt Merge branch '2.2' into 3.0 2022-03-13 14:50:02 +10:30

GNS3-server

Style GitHub Actions tests Latest PyPi version Snyk scanning

This is the GNS3 server repository.

The GNS3 server manages emulators such as Dynamips, VirtualBox or Qemu/KVM. Clients like the GNS3 GUI and the GNS3 Web UI control the server using a HTTP REST API.

Software dependencies

In addition to Python dependencies listed in a section below, other software may be required, recommended or optional.

  • uBridge is required, it interconnects the nodes.
  • Dynamips is required for running IOS routers (using real IOS images) as well as the internal switches and hubs.
  • VPCS is recommended, it is a builtin node simulating a very simple computer to perform connectivity tests using ping, traceroute etc.
  • Qemu is strongly recommended on Linux, as most node types are based on Qemu, for example Cisco IOSv and Arista vEOS.
  • libvirt is recommended (Linux only), as it's needed for the NAT cloud.
  • Docker is optional (Linux only), some nodes are based on Docker.
  • mtools is recommended to support data transfer to/from QEMU VMs using virtual disks.
  • i386-libraries of libc and libcrypto are optional (Linux only), they are only needed to run IOU based nodes.

Docker support

Docker support needs the script program (bsdutils or util-linux package), when running a docker VM and a static busybox during installation (python3 setup.py install / pip3 install / package creation).

Branches

master

master is the next stable release, you can test it in your day-to -day activities. Bug fixes or small improvements pull requests go here.

3.x Development brand for the next major release

Never use this branch for production. Pull requests for major new features go here.

Linux

GNS3 is perhaps packaged for your distribution:

Linux (Debian based)

The following instructions have been tested with Ubuntu and Mint. You must be connected to the Internet in order to install the dependencies.

Dependencies:

The following commands will install some of these dependencies:

sudo apt-get install python3-setuptools

Finally, these commands will install the server as well as the rest of the dependencies:

cd gns3-server-master
python3 -m venv venv-gns3server
source venv-gns3server/bin/activate
sudo python3 setup.py install
python3 -m gns3server --local

To run tests use:

python3 -m pytest tests

Docker container

For development, you can run the GNS3 server in a container

bash scripts/docker_dev_server.sh

Run as daemon (Unix only)

You will find init sample scripts for various systems inside the init directory.

Useful options:

  • --daemon: start process as a daemon
  • --log logfile: store output in a logfile
  • --pid pidfile: store the pid of the running process in a file and prevent double execution

All init scripts require the creation of a GNS3 user. You can change it to another user.

sudo adduser gns3

systemd

You need to copy init/gns3.service.systemd to /lib/systemd/system/gns3.service

sudo chown root /lib/systemd/system/gns3.service
sudo systemctl start gns3

Windows

Please use our Windows installer to install the stable build along with the GNS3 VM

Mac OS X

Please use our DMG package for a simple installation along with the GNS3 VM (VMware Fusion is recommended)

SSL

If you want enable SSL support on GNS3 you can generate a self-signed certificate:

bash gns3server/cert_utils/create_cert.sh

This command will put the files in ~/.config/GNS3/ssl

After you can start the server in SSL mode with:

python gns3server/main.py --certfile ~/.config/GNS3/ssl/server.cert --certkey ~/.config/GNS3/ssl/server.key --ssl

Or in your gns3_server.conf by adding in the Server section:

[Server]
certfile=/Users/noplay/.config/GNS3/ssl/server.cert
certkey=/Users/noplay/.config/GNS3/ssl/server.key
ssl=True

Running tests

First, install the development dependencies

python3 -m pip install -r dev-requirements.txt

Then run the tests using pytest

python3 -m pytest -vv tests/

Security issues

Please contact us at security@gns3.net