fix revocation list in server template

This commit is contained in:
Антон
2026-02-08 19:43:58 +03:00
parent e5c0e154b5
commit 14ffd64801
2 changed files with 5 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ def generate_server_config(db: Session, output_path: str = "server.conf"):
file_srv_key_path = os.path.join(PKI_DIR, "private", f"{pki_settings.fqdn_server}.key") file_srv_key_path = os.path.join(PKI_DIR, "private", f"{pki_settings.fqdn_server}.key")
file_dh_path = os.path.join(PKI_DIR, "dh.pem") file_dh_path = os.path.join(PKI_DIR, "dh.pem")
file_ta_path = os.path.join(PKI_DIR, "ta.key") file_ta_path = os.path.join(PKI_DIR, "ta.key")
file_crl_path = os.path.join(PKI_DIR, "crl.pem")
# Render template # Render template
config_content = template.render( config_content = template.render(
@@ -33,6 +34,7 @@ def generate_server_config(db: Session, output_path: str = "server.conf"):
srv_key_path=file_srv_key_path, srv_key_path=file_srv_key_path,
dh_path=file_dh_path, dh_path=file_dh_path,
ta_path=file_ta_path, ta_path=file_ta_path,
crl_path=file_crl_path,
vpn_network=settings.vpn_network, vpn_network=settings.vpn_network,
vpn_netmask=settings.vpn_netmask, vpn_netmask=settings.vpn_netmask,
tunnel_type=settings.tunnel_type, tunnel_type=settings.tunnel_type,

View File

@@ -28,8 +28,8 @@ server {{ vpn_network }} {{ vpn_netmask }}
ifconfig-pool-persist /etc/openvpn/ipp.txt ifconfig-pool-persist /etc/openvpn/ipp.txt
log /var/log/openvpn/openvpn-status.log log /var/log/openvpn/openvpn.log
log-append /var/log/openvpn/openvpn-status.log log-append /var/log/openvpn/openvpn.log
verb 3 verb 3
@@ -84,7 +84,7 @@ persist-tun
# check revocation list # check revocation list
{% if crl_verify %} {% if crl_verify %}
crl-verify /etc/openvpn/crl.pem crl-verify {{ crl_path }}
{% else %} {% else %}
# crl-verify disabled # crl-verify disabled
{% endif %} {% endif %}