Skip to content

changed defguard to Defguard #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Sleep for 10 seconds
working-directory: temp
run: sleep 10s
- name: Test defguard is available
- name: Test Defguard is available
working-directory: temp
run: curl -f http://id.localhost/api/v1/health
- name: Stop compose stack
Expand Down
2 changes: 1 addition & 1 deletion charts/defguard-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: defguard-proxy
description: Defguard proxy is a public-facing proxy for core defguard service
description: Defguard proxy is a public-facing proxy for core Defguard service

type: application
version: 0.5.5
Expand Down
10 changes: 5 additions & 5 deletions charts/defguard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ autoscaling:
cookie:
domain: ""
insecure: false
# defguard full name override
# Defguard full name override
fullnameOverride: ""
# defguard name override
# Defguard name override
nameOverride: ""
# defguard-core container image configuration
# Defguard-core container image configuration
image:
pullPolicy: IfNotPresent
repository: ghcr.io/defguard/defguard
tag: "" # overrides .Chart.AppVersion
# defguard-core container image pull secrets
# Defguard-core container image pull secrets
imagePullSecrets: []
# defguard-core ingress configuration
# Defguard-core ingress configuration
ingress:
grpc:
annotations: {}
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DEFGUARD_URL=<YOUR_DEFGUARD_URL>
# Webauthn RP ID (https://w3c.github.io/webauthn/#rp-id)
# E.g.: defguard.mycompany.com (without http/https)
DEFGUARD_WEBAUTHN_RP_ID=<YOUR_DEFGUARD_WEBAUTHN_RP_ID>
# Public URL of your defguard proxy gRPC server
# Public URL of your Defguard proxy gRPC server
# DEFGUARD_PROXY_URL=<YOUR_PROXY_GRPC_URL>
# Public URL of your enrollment service
# E.g.: https://enrollment.mycompany.com
Expand Down
24 changes: 12 additions & 12 deletions docker-compose/setup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# shellcheck shell=bash

# This is a script that sets up an entire defguard instance (including core,
# This is a script that sets up an entire Defguard instance (including core,
# gateway, enrollment proxy and reverse proxy). It's goal is to prepare
# a working instance by running a single command.

Expand Down Expand Up @@ -261,7 +261,7 @@ print_header() {
_EOF_
echo -e "${C_END}"
echo
echo "defguard docker-compose deployment setup script v${VERSION}"
echo "Defguard docker-compose deployment setup script v${VERSION}"
echo -e "Copyright (C) 2023-2024 ${C_BOLD}teonite${C_END} <${C_BG_GREY}${C_YELLOW}https://teonite.com${C_END}>"
echo
}
Expand All @@ -278,7 +278,7 @@ print_usage() {
echo
echo -e "\t--help this help message"
echo -e "\t--non-interactive run in non-interactive mode - !REQUIRES SETTING all options/env vars"
echo -e "\t--domain <domain> domain where defguard web UI will be available"
echo -e "\t--domain <domain> domain where Defguard web UI will be available"
echo -e "\t--enrollment-domain <domain> domain where enrollment service will be available"
echo -e "\t--use-https configure reverse proxy to use HTTPS"
echo -e "\t--volume <directory> Docker volumes directory - default: ${VOLUME_DIR}"
Expand Down Expand Up @@ -491,7 +491,7 @@ load_configuration_from_input() {
echo -ne "${C_ITALICS}${C_LBLUE}"
cat << _EOF_

Please provide the values to configure your defguard instance. If you've
Please provide the values to configure your Defguard instance. If you've
already configured some options by setting environment variables or through
CLI options, those will be used as defaults.

Expand All @@ -504,7 +504,7 @@ echo -ne "${C_GREY}"
cat << _EOF_

Choose domains that will be used to expose your instance through Caddy
reverse proxy. defguard uses a separate domain for the Web UI, and for
reverse proxy. Defguard uses a separate domain for the Web UI, and for
the optional enrollment/desktop client configuration/password reset
service.

Expand All @@ -530,7 +530,7 @@ _EOF_

while [ X${domain} = "X" ]; do
echo -ne "${C_YELLOW}${TXT_INPUT}${C_END} "
read -p "Enter defguard domain [default: ${CFG_DOMAIN}]: " domain
read -p "Enter Defguard domain [default: ${CFG_DOMAIN}]: " domain
if [ "$domain" ]; then
CFG_DOMAIN="$domain"
fi
Expand Down Expand Up @@ -644,7 +644,7 @@ validate_required_variables() {
}

generate_external_urls() {
# prepare full defguard URL
# prepare full Defguard URL
if [ $CFG_USE_HTTPS ]; then
CFG_DEFGUARD_URL="https://${CFG_DOMAIN}"
else
Expand All @@ -664,7 +664,7 @@ generate_external_urls() {

print_config() {
echo
echo " ${TXT_BEGIN} Setting up your defguard instance with following config:"
echo " ${TXT_BEGIN} Setting up your Defguard instance with following config:"
echo
echo -e " ${TXT_SUB} data volume: ${C_BOLD}${VOLUME_DIR}${C_END}"
echo
Expand Down Expand Up @@ -716,7 +716,7 @@ generate_certs() {
# TODO: allow configuring CA parameters
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}

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

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}
Expand All @@ -733,7 +733,7 @@ EOF
openssl x509 -req -in ${SSL_DIR}/defguard-grpc.csr -CA ${SSL_DIR}/defguard-ca.pem -CAkey ${SSL_DIR}/defguard-ca.key -passin pass:"${PASSPHRASE}" -CAcreateserial \
-out ${SSL_DIR}/defguard-grpc.crt -days 1000 -sha256 -extfile ${SSL_DIR}/defguard-grpc.ext 2>&1 >> ${LOG_FILE}

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

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}
Expand Down Expand Up @@ -910,9 +910,9 @@ enable_vpn_gateway() {

print_instance_summary() {
echo
echo -e "${C_LGREEN} ${TXT_CHECK} defguard setup finished successfully${C_END}. The Docker image version used for the setup was: ${IMAGE_TYPE_NAME}"
echo -e "${C_LGREEN} ${TXT_CHECK} Defguard setup finished successfully${C_END}. The Docker image version used for the setup was: ${IMAGE_TYPE_NAME}"
echo
echo "If your DNS configuration is correct your defguard instance should be available at:"
echo "If your DNS configuration is correct your Defguard instance should be available at:"
echo
echo -e "\t${TXT_SUB} Web UI: ${C_BOLD}${CFG_DEFGUARD_URL}${C_END}"
if [ "$CFG_ENABLE_ENROLLMENT" ]; then
Expand Down
2 changes: 1 addition & 1 deletion index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ entries:
- apiVersion: v2
appVersion: 1.2.0
created: "2025-01-22T13:08:49.18194+01:00"
description: Defguard proxy is a public-facing proxy for core defguard service
description: Defguard proxy is a public-facing proxy for core Defguard service
digest: 4da4f264bea0fc94741abf1d31be308a8824f80f65a7edef2d7beb3f2ee3c0bb
name: defguard-proxy
type: application
Expand Down
4 changes: 2 additions & 2 deletions terraform/modules/core/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ DEFGUARD_DB_USER="${db_username}"
DEFGUARD_DB_PASSWORD="${db_password}"
EOF

log "Enabling defguard service..."
log "Enabling Defguard service..."
systemctl enable defguard

log "Starting defguard service..."
log "Starting Defguard service..."
systemctl start defguard

%{ for network in vpn_networks ~}
Expand Down
8 changes: 4 additions & 4 deletions terraform/modules/gateway/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,22 @@ GATEWAY_TOKEN="$${SIGNING_INPUT}.$${SIGNATURE}"

log "Writing gateway configuration to /etc/defguard/gateway.toml..."
tee /etc/defguard/gateway.toml <<EOF
# This is an example config file for defguard VPN gateway
# This is an example config file for Defguard VPN gateway
# To use it fill in actual values for your deployment below

# Required: secret token generated by defguard
# NOTE: must replace default with actual value
token = "$${GATEWAY_TOKEN}"
# Required: defguard server gRPC endpoint URL
# Required: Defguard server gRPC endpoint URL
# NOTE: must replace default with actual value
grpc_url = "http://${core_address}:${core_grpc_port}"
# Optional: gateway name which will be displayed in defguard web UI
# Optional: gateway name which will be displayed in Defguard web UI
name = "${gateway_name}"
# Required: use userspace WireGuard implementation (e.g. wireguard-go)
userspace = false
# Optional: path to TLS cert file
# grpc_ca = cert.pem
# Required: how often should interface stat updates be sent to defguard server (in seconds)
# Required: how often should interface stat updates be sent to Defguard server (in seconds)
stats_period = 60
# Required: name of WireGuard interface
ifname = "wg0"
Expand Down