Create a VPS on Digital Ocean easily with the mainRecon included to launch the recon workflow.
Digital Ocean Bonus
You can sign up with my referral link https://m.do.co/c/b5a9fc36fd95 and get $100 free credit to try it out!
- Terraform installed (Mac Version used: 0.13.0)
- Ansible installed (Mac Version: 2.9.11)
- SSH private and public keys
- Digital Ocean account - My referral link https://m.do.co/c/b5a9fc36fd95
git clone --depth 1 https://github.com/l34r00t/vps-mainRecon.git
cd vps-mainRecon
-
Create credentials folder.
mkdir credentials
- Inside credentials folder run
ssh-keygen -t rsa -f mainRecon
in the terminal. Empty passphrase is ok. - It creates two files: private key (
mainRecon
) and public key (mainRecon.pub
).
- Create a Personal access tokens with write permission and copy it. See Tutorial
- Enter to digital-ocean folder
- With the personal access token copied run
export TF_VAR_do_token="Personal_Access_Token_Here"
- Run the next commands:
# Initialize terraform provider
$ terraform init
Terraform has been successfully initialized!
# Create the resources
$ terraform apply -auto-approve
Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
Outputs:
external_ip = x.x.x.x
- Copy the external_ip value
Note: The droplet type and the region used are: s-2vcpu-4gb and nyc3. You can change the values on server.tf and variables.tf
- In digital-ocean folder run the next command. Change x.x.x.x by external_ip value copied.
# Access to VPS
$ ssh [email protected] -i ../credentials/mainRecon
- For run mainRecon image you can see the mainRecon repository.
- In digital-ocean folder run the next command.
# Destroy the resource
$ terraform destroy -auto-approve
The service fail2ban has been installed to avoid brute force and block non-authorized users.
If you like my content, please consider inviting me a coffee.
This repository has been possible thank you to my friend Arsenio Aguirre
Copyright (c) 2020, L34r00t