This project contains a script to simply deploy the Cisco Defense Orchestrator (CDO) Secure Device Connector (SDC) and Secure Events Connector (SEC) on Linux Ubuntu systems (Tested on Ubuntu 22.04 - Jammy).
While Cisco Defense Orchestrator does supply a Linux VMWare image that has a configuration wizard, docker, and the needed packages already installed for the SDC and SEC services, many organizations may desire to run these services on their own Linux system rather than use the pre-packaged VMWare image. The reasons are many, but may include: the organization may not have a VMWare implementation, the organization has a requirement to use a specific Linux distro, the organization has an existing docker eco-system, there are organizational boundaries and challenges that make it difficult to deploy new VMWare instances, simple lab usage, etc.
Note: Do NOT sudo or run as root!
git clone xxxxx
cd xxxxx
./deploy_sdc.sh Q0RPX1RPS0VOPSJleU...Y29fYWFoYWNrbmUtU0RDLTQiCg==
Where Q0RPX1RPS0VOPSJleU...Y29fYWFoYWNrbmUtU0RDLTQiCg== is your SDC bootstrap data from the CDO portal.
The SDC is a docker containerized service that facilitates communication between Cisco Defense Orchestrator and Cisco Adaptive Security Appliance (ASA/ASAv) firewalls (HTTPS) and Cisco IOS Routers/Switches (SSH) that are not cloud-native (Note that the Firewall Threat Defense platform (FTD) is CDO cloud native and does not require the use of an SDC to be managed by CDO and a cloud-delivered Firewall Management Center (cdFMC)).
Once the SDC is deployed an SEC container is an easy add-on. The SEC service receives syslog messages from ASA, IOS, and FTD platforms and securely sends them to the Cisco cloud where eventing services like CDO Analytics and Cisco XDR can store, augment, and analyze these log messages. (Fact Check XDR)
TODO: Include images for architecture here
These scripts were written using Ubuntu 22.04 as the test system. Your milage may vary on older Ubuntu releases. TODO: Test on Ubuntu 20.0x
The deployment script will install the needed packages and their dependencies for deploying the SDC and SEC using the Ubuntu apt package manager when the script runs, if the required packages and dependencies not already present.
The resource requirements are for both bare-metal Ubuntu installations as well as virtual installations like VMWare, Nutanix, Cisco Modeling Labs, qemu, AWS, Azure, etc.
- SDC Container Only
- CPU Requirement: 2 CPU Cores/vCPUs
- RAM Requirement: 2 Gig
- SDC and Secure Events Connector (SEC) Containers
- CPU Requirement: 6 CPU Cores/vCPUs
- RAM Requirement: 10 Gig
- A static IP address or DHCP reservation on the Ubuntu server to ensure the Ubuntu system's IP address does not change
- An RFC-1918 ("Private") IP address on the Ubuntu server is fine
- Outbound Internet access on ports 80 and 443 TODO: Fact Check this
- The Ubuntu server running the SDC container will need a network path to reach the management interfaces of the ASAs and IOS devices
- Devices that wish to log to the cloud will need a network path to the Ubuntu server running the SEC container
- See the
Tips and Trickssection for iptables or firewalling considerations
It is recommended to use Docker Community Edition (docker-ce) rather than the docker version that is packaged with Ubuntu. See the README-DOCKER.md file for more information about installing Docker and using the included docker-ce installation script.
While it's not necessary to know all of the detailed steps that the script executes to use the deploy script, we are providing the following details for the inquisitive or those that may want to adapt the script for some other Linux distro.
Note that when running the script, the current user must be able to run sudo commands and will be prompted for their password when running the script, as there are sudo commands as needed as part of the deploy script. As always, check the script's code in deploy.sh if there are concerns over the use of the sudo commands.
Note: Do NOT sudo or run as root!
deploy_sdc.sh script:
- Checks to make sure the required apt packages are installed and installs them if they are not present.
- Add a new user
sdc. This is the user under which the SDC and SEC containers will run. - Creates the
sdcuser's home directory at/usr/local/cdo. - Add the
sdcuser to thedockeruser group to give thesdcuser permissions to start and stop docker containers. - Adds the user running the script to the
dockeruser group to give current user permissions to start and stop docker containers. - Checks that the
/etc/daemon.jsonfile exists. If the file does not exist, the script create it with some default settings. See the README-DOCKER.md file for more details. - Restarts the docker daemon and displays the docker daemon status. Note: If you have existing docker containers, this restart will impact them in the same way that any docker restart would.
- Downloads a bespoke
bootstrap.shscript as part of an archive from your specific CDO tenant and decompresses the archive in/usr/local/cdo. - Decodes the base64 bootstrap data provided as an argument to the
deploy_sdc.shscript, exports the data as environment variables, and then passes the variables into thebootstrap.shscript, which is ran automatically. - The
bootstrap.shscript pulls the required docker images from the CDO docker registry, configures thesdcuser's crontab to keep the SDC and SEC containers updated as needed, and finally runs the docker containers, making the SDC active and available in CDO.
git clone xxxxx
cd xxxxx
- Log into your CDO Tenant and navigate to Tools & Services --> Secure Connectors
- Click the blue (+) button and add a Secure Device Connector (SDC)
- Copy the
SDC Bootstrap Datato use as a CLI parameter for the script.
We will run the deploy_sdc.sh with the SDC Bootstrap Data that you copied from the CDO tenant portal as the only parameter for the script. Note that the SDC Bootstrap Data will wrap several lines in your terminal. This is fine and there is no need to try and split the data into smaller chunks.
Note: Do NOT sudo or run as root!
Example:
./deploy_sdc.sh Q0RPX1RPS0VOPSJleU...Y29fYWFoYWNrbmUtU0RDLTQiCg==
Once the SDC is deployed, the bootstrap scripts needed to deploy an SEC are already present on your system.
- Log into your CDO Tenant and navigate to Tools & Services --> Secure Connectors
- Click the blue (+) button and add a Secure Events Connector (SEC)
- Copy the
SEC Bootstrap Datato use in the bootstrap script TODO: include screen shot highlighting SEC bootstrap data
*** TODO: Write this ***
TODO: Write a script to do this
These steps are provided in the case that you experience errors or just want to run a fresh install of an SDC/SEC on your system.
sudo su sdcand runsudo -u sdc crontab -r- Stop and remove the docker containers
docker ps -a | grep projectlockhart-docker | cut -f1 -d' ' | xargs docker stop | xargs docker rm - Remove the SDC and SEC
docker images | grep projectlockhart-docker-hub-mirror | tr -s " " | cut -f3 -d' ' | xargs docker image rm - Delete the SDC user's home directory
/usr/local/cdosudo rm -Rf /usr/local/cdo - Optionally remove the
sdcuser from the system
If you are filtering connections to and from your Ubuntu server, there are a few considerations to address for the SDC and SEC:
- The SDC container will need outbound
httpsaccess to your ASA devices on whatever IP and port your ASAs have been configured to listen on. Typically, this is the ASA's management interface IP address onTCP port 443. - The SDC container will need outbound
SSHaccess to your IOS or other SSH integrations that you wish to manage from CDO. Typically, this will be some management IP onTCP port 22. - The SEC receives syslog and netflow data from ASA, IOS, and FTD devices. As such, there will need to be inbound access rules for the Ubuntu server to receive these packets. By default, the SEC will listen on the following ports and protocols:
- Syslog UDP/10025
- Syslog TCP/10125
- Netflow TCP/10425
