Giter Club home page Giter Club logo

bastionbox's Introduction

BastionBox

A simple bastion host setup designed for cloud-hosted and on-premises lab environments.

Main Screen

AWS AMI

The easiest way to get started is to use our community AMI.

We recommend a t2.small instance for general use.

us-east-1

ami-0223eaf7dcb180393

Other Regions

To launch the BastionBox in other AWS regions, you'll need to copy the AMI.

Installation

Ubuntu 20.04

This is currently the only tested/supported OS, though other debian based operating systems are likely to just work.

  1. Clone Repository

    git clone https://github.com/snaplabsio/BastionBox
    
  2. Run Install Script

    chmod +x ./BastionBox/install.sh
    sudo ./BastionBox/install.sh
    

Usage

Web Interface

The BastionBox web interface will be accessible on port 80 after launch or install.

Username and Password

The default username is admin.

If you use the prebuilt AMI, the admin password will be set to the InstanceId.

A manual install will prompt for a password.

The username and password can be changed in the BastionBox/API/config.json file. Run pm2 restart 0 or reboot for web API changes to take affect.

Static IP Address

By default, EC2 instances are assigned dyanmic public IP addresses. In order for VPN configs to work across power on/off cycles, your BastionBox needs a static IP. In AWS, this means allocating and associating an elastic IP address with your instance.

BastionBox will otherwise work fine without a static IP; you'll just need to generate new VPN configs any time the IP address changes.

Routing traffic to VPN clients

If you want to initiate network connections with VPN clients from within your lab environment, you will need to add a route directing the vpn client IP range (default: 172.19.253.0/24) to the BastionBox. This could be required for things such as command and control (C2) callbacks.

You could do this locally on each system in the lab, but it is likely easier to do it at the router/default gateway level.

In AWS this means:

  1. Disabling the source/destination check on the BastionBox network interface
  2. Adding a route to the VPC/subnet's route table directing the vpn range to the BastionBox network interface

Routing traffic through the VPN

The AMI will use your VPC CIDR range to push a route directing traffic through the VPN. The manual install will attempt to query AWS for the VPC CIDR, and if unavailable, use the subnet visible on the local interface.

You can manually modify this route or add more in the VPN server config /etc/openvpn/server.conf. Restart the vpn service systemctl start openvpn@server for changes to take affect.

Security Considerations

Access

We recommend limiting access to this application to known IP addresses. In AWS, security groups are an easy way to do this.

HTTPS

All of the web connections are proxied through Apache. To enable SSL/TLS, generate or upload your certificates and then uncomment the SSL options in /etc/apache2/sites-enabled/000-default.conf (or BastionBox/Resources/apache.conf pre-install).

Session Length

You can adjust the session length of the web interface by ediitng "sessionLength" (measured in hours) in BastionBox/API/config.json. Run pm2 restart 0 or reboot for web API changes to take affect.

More Screenshots

Login Screen Login

RDP Connection RDP

Adding a Connection Console

Creating a VPN Configuration VPN

bastionbox's People

Contributors

swizzlez avatar peewpw avatar

Stargazers

 avatar s1l3nt78 avatar Ben Davis avatar

Watchers

 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.