Skip to content

Commit 3efeb2f

Browse files
authored
docker firewall, prune certificate metadata (#106)
1 parent 40e8062 commit 3efeb2f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docker-compose/docker-compose.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ services:
9090
# DEFGUARD_GRPC_CA: /ssl/defguard-ca.pem # [VPN]
9191
# DEFGUARD_STATS_PERIOD: 30 # [VPN]
9292
# DEFGUARD_TOKEN: ${DEFGUARD_TOKEN} # [VPN]
93+
## This makes our rules run before Docker's rules to avoid conflicts
94+
# DEFGUARD_FW_PRIORITY: -1 # [VPN]
9395
# volumes: # [VPN]
9496
# SSL setup guide: https://docs.defguard.net/deployment-strategies/grpc-ssl-communication#custom-ssl-ca-and-certificates
9597
# - ${VOLUME_DIR:-./.volumes}/ssl:/ssl # [VPN]

docker-compose/setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -714,12 +714,12 @@ generate_certs() {
714714
openssl genrsa -des3 -out ${SSL_DIR}/defguard-ca.key -passout pass:"${PASSPHRASE}" 2048 2>&1 >> ${LOG_FILE}
715715
# generate Root Certificate
716716
# TODO: allow configuring CA parameters
717-
openssl req -x509 -new -nodes -key ${SSL_DIR}/defguard-ca.key -sha256 -days 1825 -out ${SSL_DIR}/defguard-ca.pem -passin pass:"${PASSPHRASE}" -subj "/C=PL/ST=Zachodniopomorskie/L=Szczecin/O=Example/OU=IT Department/CN=${CFG_DOMAIN}" 2>&1 >> ${LOG_FILE}
717+
openssl req -x509 -new -nodes -key ${SSL_DIR}/defguard-ca.key -sha256 -days 1825 -out ${SSL_DIR}/defguard-ca.pem -passin pass:"${PASSPHRASE}" -subj "/CN=${CFG_DOMAIN}" 2>&1 >> ${LOG_FILE}
718718

719719
# generate CA-signed certificate for Defguard gRPC
720720
openssl genrsa -out ${SSL_DIR}/defguard-grpc.key 2048 2>&1 >> ${LOG_FILE}
721721

722-
openssl req -new -key ${SSL_DIR}/defguard-grpc.key -out ${SSL_DIR}/defguard-grpc.csr -subj "/C=PL/ST=Zachodniopomorskie/L=Szczecin/O=Example/OU=IT Department/CN=${CFG_DOMAIN}" 2>&1 >> ${LOG_FILE}
722+
openssl req -new -key ${SSL_DIR}/defguard-grpc.key -out ${SSL_DIR}/defguard-grpc.csr -subj "/CN=${CFG_DOMAIN}" 2>&1 >> ${LOG_FILE}
723723
cat >${SSL_DIR}/defguard-grpc.ext <<EOF
724724
authorityKeyIdentifier=keyid,issuer
725725
basicConstraints=CA:FALSE
@@ -736,7 +736,7 @@ EOF
736736
# generate CA-signed certificate for Defguard proxy gRPC
737737
openssl genrsa -out ${SSL_DIR}/defguard-proxy-grpc.key 2048 2>&1 >> ${LOG_FILE}
738738

739-
openssl req -new -key ${SSL_DIR}/defguard-proxy-grpc.key -out ${SSL_DIR}/defguard-proxy-grpc.csr -subj "/C=PL/ST=Zachodniopomorskie/L=Szczecin/O=Example/OU=IT Department/CN=${CFG_DOMAIN}" 2>&1 >> ${LOG_FILE}
739+
openssl req -new -key ${SSL_DIR}/defguard-proxy-grpc.key -out ${SSL_DIR}/defguard-proxy-grpc.csr -subj "/CN=${CFG_DOMAIN}" 2>&1 >> ${LOG_FILE}
740740
cat >${SSL_DIR}/defguard-proxy-grpc.ext <<EOF
741741
authorityKeyIdentifier=keyid,issuer
742742
basicConstraints=CA:FALSE

0 commit comments

Comments
 (0)