Code Monkey home page Code Monkey logo

csec731-sp22---ansible's Introduction

Ansible For Project C

A couple of roles created to set up a system with required services to allow running a tls termination + modsecurity proxy servers to a DVWA container.

Getting Started

Prerequisites

To run this project the following prerequisites are required installed and available in the enviroment.

Installing

  • Clone the project locally by running the following in the terminal and in your desired directory:

    git clone [email protected]:VincentHokie/CSEC731-SP22---ansible.git

Setup and Run for Remote Deployment

  • Generate a github token that should have the following scopes (these are the permissions on my token). This will be useful later on.
- repo
- admin:public_key
- user
- admin:gpg_key
  • Create a VM either locally or in a cloud provider of your choice. As you can probably tell I created my VM in AWS (based on the inventory file).

  • Once the VM is ready, update the inventory file by either creating a new group or using the already-existing aws group. If you create a new group, update the project-c.yml and replace aws with the group you added to the inventory file

  • Add your IP address (public IP if using the cloud, 127.0.0.1 if using a VM on your local environment)

  • Add variables required to connect to your host e.g. ansible_port, ansible_user, ansible_ssh_private_key_file in the inventory file/ using a more secure technique e.g. ansible-vault.

  • Once you are set up with the above information. Navigate to the root directory of the project and run the command below to set up the VM.

    GITHUB_USER='{your-github-user}' GITHUB_TOKEN='{your-github-token}' ansible-playbook -i inventory project-c.yml

  • Once this has run to the end, visit port 8080 and/ or 443 of your VM to reach the DVWA container through the modsecurity and tls-termination proxies respectively.

Assumptions

  • This playbook was tested on a "fresh" Ubuntu 18 installation where the user being used was ubuntu. This should also work on a system with Ubuntu 20 installed with an ubuntu user that is part of the sudoers group, but that is not a guarantee.

Opportunities for improvement

  • Making the script compatible with more OSs
  • Making less asunptions about the conditions of the server e.g. the user being used

Authors

csec731-sp22---ansible's People

Contributors

vincenthokie avatar

Watchers

James Cloos 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.