How to implement a custom certificate for the EDR web interface.
If you only want to change the WebUI port, follow these directions: Customizing the web UI port.
Important: These steps should be performed on all Primary and Secondary server nodes. Without this, users will be able to access the UI via port 443 if the secondary server's IP is entered into a browser. It is recommended that secondary servers not be used to access the web console. If possible, use firewall rules to deny outside access on the port for all server nodes except for the primary. All server nodes still need to communicate on the custom port with each other.
mv /etc/cb/nginx/conf.d/cb.conf /etc/cb/nginx/conf.d/cb.conf.default
cp /etc/cb/nginx/conf.d/cb.multihome.conf.example /etc/cb/nginx/conf.d/cb.multihome.conf
cp /etc/cb/nginx/conf.d/http.conf /etc/cb/nginx/conf.d/http.conf.default
server { # This server configuration is used for communications between the sensors # and the server. # IMPORTANT: If this configuration file is used, NginxSensor#### parameters in # /etc/cb/cb.conf MUST be updated to match this file. # Port 80 is defined in the http.conf. By default it redirects all trafic # to the https://$host$request_uri; If this behaviour needs to change update http.conf listen [::]:443 ssl ipv6only=off; include /etc/cb/nginx/conf.d/includes/cb.server.body; include /etc/cb/nginx/conf.d/includes/cb.server.sensor; # Include content of custom server configuration file include /etc/cb/nginx/conf.d/includes/cb.server.custom; } server { # This server configuration is used for VMware Carbon Black EDR Server's Web UI # IMPORTANT: If this configuration file is used, NginxWebApi#### parameters in # /etc/cb/cb.conf MUST be updated to match this file. # Port 80 is defined in the http.conf. By default it redirects all trafic # to the https://$host$request_uri; If this behaviour needs to change update http.conf listen [::]:8443 ssl ipv6only=off; #include /var/cb/nginx/props/nginx.runtime.ssl_certificate.prop; #include /var/cb/nginx/props/nginx.runtime.ssl_certificate_key.prop; ssl_certificate /etc/cb/certs/mycertfile.crt; ssl_certificate_key /etc/cb/certs/mycertfile.key; include /etc/cb/nginx/conf.d/includes/cb.server.body; include /etc/cb/nginx/conf.d/includes/cb.server.api; #include /etc/cb/nginx/conf.d/includes/cb.server.error; # Include content of custom server configuration file include /etc/cb/nginx/conf.d/includes/cb.server.custom; }
NginxWebApiHttpPort=443 Change to… NginxWebApiHttpPort=8443 And if minion port was also changed (recommended, see additional notes) MinionApiPort=443 change to... MinionApiPort=8443
also modify the SSLUICertFile and SSLUIKeyFile line entries to point to the new .crt and .key files:
SSLUICertFile=/etc/cb/certs/<file name>.crt SSLUIKeyFile=/etc/cb/certs/<file name>.key
return 301 https://$host$request_uri; Change to... return 301 https://$host:8443$request_uri;
#listen [::]80 ipv6only=off;
proxy_set_header Host $host;
proxy_set_header Host $host:$server_port;
iptables -I INPUT 5 -p tcp -m state --state NEW -m tcp --dport 8443 -j ACCEPT service iptables save service iptables reload
firewall-cmd --permanent --add-port=8443/tcp firewall-cmd --reload
cb.conf.default cb.multihome.conf