opsdisk / scantron

A distributed nmap / masscan scanning framework complete with scan scheduling, engine pooling, subsequent scan port diff-ing, and an API client for automation workflows.
Apache License 2.0
156 stars 27 forks source link

Console Install #8

Open AloneAndUnknown opened 2 years ago

AloneAndUnknown commented 2 years ago

having an issue with the console install. after running this command

ansible-playbook console.yml -u masscan --become --private-key=/home/masscan/.ssh/id_rsa

TASK [console : Install specified packages. pkg={{ install_packages }}, state=latest] ***** fatal: [Blacked out IP]: FAILED! => { "changed": false }

MSG:

No package matching 'python-virtualenv' is available

The package python3-virtualenv is installed... Not sure where i need to change the code to python3 instead of python.... or if i even need to do that? should i just continue?

AloneAndUnknown commented 2 years ago

found it in roles/console/var.

But im going through dependency HELL!

dingusgh commented 2 years ago

note, the docs say to use 18.04 and my experience so far is that it works with that i have noticed (and it could be because im using windows and virtualbox) that making sure system time is accurate and UTC is important

ive been working on some tweaks for getting console to work on 20.04: remove some warnings from ansible:

use chrony instead of ntp use a variable for ubuntu_version use a variable for python_version use ubuntu_version variable for postgress repo addition switch to python3-venv instead of python3-virtualenv (use python_version)

keep an eye on dependencies between:

consider the following: using postgresql_version version to easily switch from 12 to 14

using later versions for django stuff

rinse and repeat the whole process for

AloneAndUnknown commented 2 years ago

Im going to fire up ubuntu 18 and see if that can fix my woes. I got pretty far but i threw in the towel last night when i got down to python versioning and pygraphviz. pygraphviz just seemed to conk out on compiling a file. I think it has something to do with ubuntu 20 just wanting to use python3.8 even though 3.6 is installed and i linked python3 to python3.6 in usr/bin. I about threw the laptop at that point and went to bed. now you come in here giving me hope.... I dont know... but. ill give it a shot :)

dingusgh commented 2 years ago

my test environment: virtualbox on windows download 20.04.4 iso from ubuntu create vm called deployer with 2048 ram instead of 1024 switch network from NAT to bridged launch vm all defaults except at the end, check the box for openssh server allow it to do the updates and then remove the install disk and reboot repeat this again for console and engine

while in deployer VM: install chrony and check proper time configured run apt update and upgrade generate ssh key add account to sudoers.d

echo 'USERNAME ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/USERNAME

install ansible git clone scantron run initial_setup script scp pub key to authorized_keys on console/engine

cat ~/.ssh/id_rsa.pub | ssh -t USERNAME@IPADDRESS "mkdir -p ~/.ssh ; cat - >> ~/.ssh/authorized_keys"

while on console/engine add account to sudoers.d

echo 'USERNAME ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/USERNAME

install chrony and check proper time configured note, the goal is to do the bare minimum manual configurations here we should let ansible playbook handle the rest poweroff the boxes and clone them generate new MACs when cloning and use full clone option use clones during testing

always double check the system time after starting up a VM! restart chronyd if you have to, but wait 5 seconds for it to fetch updated time

sudo service chronyd restart
dingusgh commented 2 years ago

ok, great news, i got it to work! https://github.com/dingusgh/scantron/tree/main-20.04