dev {{ openvpn_interface }}
ifconfig {{ openvpn_local_ip }} {{ openvpn_peer_ip }}
secret {{ openvpn_static_key_path }}
cipher AES-256-CBC
auth SHA256
persist-key
persist-tun
verb 3
keepalive 10 60
{% if openvpn_role == 'server' %}
proto {{ openvpn_proto_server }}
port {{ openvpn_listen_port }}
{% for route in openvpn_home_routes %}
route {{ route.network }} {{ route.netmask }}
{% endfor %}
{% endif %}
{% if openvpn_role == 'gateway' %}
proto {{ openvpn_proto_client }}
remote 157.22.231.198 {{ openvpn_listen_port }}
resolv-retry infinite
nobind
route-nopull
script-security 2
up /etc/openvpn/homelab/up.sh
down /etc/openvpn/homelab/down.sh
{% endif %}
