Giter Site home page Giter Site logo

networksecuritytp01's Introduction

Vagrant script for Networking and Security TP01

Report Bug ยท Request Feature

Stack

With this configuration: you will need to change all X.X.X.1 to an other ip

๐Ÿšง Requirement

  • VirtualBox
  • Vagrant after the installation a restart is needed !
  • At least 20 gb free on your main disk

๐Ÿ”ง Tested on

  • VirtualBox 6.1.18
  • Vagrant 2.2.14
  • Windows 10 pro

When you see a command starting with $ it's my host machine on which is installed vagrant

And when you see vagrant@$VM_NAME:~$ it's a VM built with vagrant

๐Ÿ› ๏ธ Installation Steps

Clone the repo

$ git clone https://github.com/LacazeThomas/networksecurityTP01.git

Into networksecurityTP01 launch vagrant to build stack

$ vagrant up

If you want to setup a specific host

$ vagrant up $VM_NAME

โ„น๏ธ Informations

How to connect into a vm:

$ vagrant ssh $VM_NAME

PS: if you want to use another ssh client see here

Default credential (user:password):

vagrant:vagrant

How to get ssh port:

$ vagrant port $VM_NAME

How to become root:

vagrant@hote:~$ sudo su -

This stack is composed of 6 networks

#ID Address
1 10.0.1.0/24
2 10.0.2.0/24
3 10.0.3.0/24
4 10.0.4.0/24
5 10.0.5.0/24
6 10.0.6.0/24

All firewalls are running with Debian 10 but you probably need to change it to pfSense in the futur. (a variable is already available)

Each VM is connected with NAT and 1+ host only interfaces. Due to NAT authorization all VMs can ping each other

๐Ÿ’ป Using other ssh client:

Method 1: using password

Get the ssh port of the vm and keep it

$ vagrant port $VM_NAME
22 (guest) => 2222 (host)

Connect into a VM using vagrant

$ vagrant ssh $VM_NAME

Edit sshd_config and change ChallengeResponseAuthentication from no to yes

vagrant@admin:~$ sudo nano /etc/ssh/sshd_config

Reboot sshd service

vagrant@admin:~$ sudo service sshd restart

You can connect into a VM using default username:password

$ ssh [email protected] -p 2222

Method 2: using private key

Get the ssh port of the vm

$ vagrant port $VM_NAME
22 (guest) => 2222 (host)

Get the private key file

$ ssh [email protected] -p 2222 -i $YOUR_PATH\networksecurityTP01\.vagrant\machines\$VM_NAME\virtualbox\private_key

PS: please change PATH with yours

๐Ÿง Userful commands

If you modify the Valgrantfile, you need to reload it without delete your VM

$ vagrant reload

If you want to stop all VMs

$ vagrant halt

If you want to destroy all VMs

$ vagrant destroy

๐ŸŒŸ You are all set! You have a problem ? Please open an issue

networksecuritytp01's People

Contributors

lacazethomas avatar pololacoste avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.