-
Notifications
You must be signed in to change notification settings - Fork 8
Deployment
debifrank edited this page Sep 28, 2022
·
1 revision
This installation guide has been tested on fresh installs of Ubuntu 18.04 and 20.04.
ETM is written with .NET Core, and is designed to run on Linux systems. ETM also is designed to work within Docker containers.
sudo apt update
sudo apt upgrade
sudo apt install vim
sudo apt install git
sudo apt install dos2unix
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose
- /var/matrix
- /var/matrix/app
- /var/matrix/mongo
- /var/matrix/mongo/db
- /var/matrix/mongo/configdb
cd /var/matrix/app
git clone https://github.com/blacklanternsecurity/enter_the_matrix.git
- Change the following line to a unique password (alphanumeric)
- MONGO_INITDB_ROOT_PASSWORD=CHANGEMESUCKAH
cd /var/matrix/app/enter_the_matrix
vim appsettings.json
- Alter the ConnectionString to use your password for the MongoDB container
- Replace the "Ldap" fields with your LDAP configuration
- Replace the "LocalAuthSettings" with your desired administrative account credentials
cd /var/matrix/app/enter_the_matrix/Services
vim LdapAuthenticationService.cs
- Alter line
61
and replaceOU=YOURORG,DC=REPLACEME,DC=ANDME
with the appropriate information for your organization
- Place your SSL certificate at
/var/matrix/app/enter_the_matrix/matrix.cer
- Place your SSL key at
/var/matrix/app/enter_the_matrix/matrix.key
- To create your own self-signed certificate and key:
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout matrix.key -out matrix.cer
- Alter
enter_the_matrix.conf
and replaceYOURDOMAIN
with your domain if you are using one
For whatever reason the nginx configuration does not play nicely coming from a Windows development environment even when specifically telling GIT to convert to LF end-of-line format. So, do the following:
dos2unix /var/matrix/app/enter_the_matrix/enter_the_matrix.conf
If you are using Ubuntu 18.04:
wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
Ubuntu 20.04:
-
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
-
sudo dpkg -i packages-microsoft-prod.deb
-
sudo apt-get install -y apt-transport-https
-
sudo apt-get update
-
sudo apt-get install -y dotnet-sdk-5.0
sudo cd /var/matrix/app/enter_the_matrix
sudo dotnet publish --configuration Release
cd /var/matrix/app/enter_the_matrix
docker-compose up -d