Hi,
Currently I have OpenVPN Access Server 2.5 and have my set up automated through a simple script, I have my configuration in a JSON file which I load by using the command
./confdba -lf
In 2.5 version basically this is all I need to get it up and running to work but upgrading to 2.7.5 it does not and I have to configure it manually through the Admin Web Site.
I have read on the documentation about making backup and restore of the internal SQLite database and everything but I want to configure it by loading only the configuration file as I do in 2.5 version
This is the config.json file I am using in the process(I am hiding some real content as you can see)
{
"Default": {
"admin_ui.https.ip_address": "eth0",
"admin_ui.https.port": "<<PORT>>",
"aui.eula_version": "2",
"auth.ldap.0.name": "My LDAP servers",
"auth.ldap.0.ssl_verify": "never",
"auth.ldap.0.timeout": "4",
"auth.ldap.0.use_ssl": "never",
"auth.module.type": "local",
"auth.pam.0.service": "openvpnas",
"auth.radius.0.acct_enable": "false",
"auth.radius.0.name": "My Radius servers",
"cs.cws_proto_v2": "true",
"cs.https.ip_address": "eth0",
"cs.https.port": "<<PORT>>",
"cs.prof_sign_web": "true",
"host.name": "<<HOSTNAME>>",
"sa.initial_run_groups.0": "web_group",
"sa.initial_run_groups.1": "openvpn_group",
"vpn.client.basic": "false",
"vpn.client.config_text": "cipher AES-128-CBC",
"vpn.client.routing.inter_client": "false",
"vpn.client.routing.reroute_dns": "true",
"vpn.client.routing.reroute_gw": "false",
"vpn.daemon.0.client.netmask_bits": "<<MASK>>",
"vpn.daemon.0.client.network": "<<NETWORK>>",
"vpn.daemon.0.listen.ip_address": "eth0",
"vpn.daemon.0.listen.port": "<<PORT>>",
"vpn.daemon.0.listen.protocol": "tcp",
"vpn.daemon.0.server.ip_address": "eth0",
"vpn.general.osi_layer": "3",
"vpn.server.config_text": "<<CONFIG_TEXT>>",
"vpn.server.daemon.enable": "true",
"vpn.server.daemon.tcp.n_daemons": "1",
"vpn.server.daemon.tcp.port": "<<TCP_PORT>>",
"vpn.server.daemon.udp.n_daemons": "1",
"vpn.server.daemon.udp.port": "<<UDP_PORT>>",
"vpn.server.dhcp_option.dns.0": "<<DNS_0>>",
"vpn.server.dhcp_option.dns.1": "<<DNS_1>>",
"vpn.server.group_pool.0": "<<GROUP_POOL>>",
"vpn.server.nat.masquerade": "true",
"vpn.server.port_share.enable": "true",
"vpn.server.port_share.ip_address": "1.2.3.4",
"vpn.server.port_share.port": "1234",
"vpn.server.port_share.service": "admin+client",
"vpn.server.routing.gateway_access": "true",
"vpn.server.routing.private_access": "nat",
"vpn.server.routing.private_network.0": "<<CIDR_0>>",
"vpn.server.routing.private_network.1": "<<CIDR_1>>",
"vpn.server.session_expire": "36000",
"vpn.tls_refresh.do_reauth": "true",
"vpn.tls_refresh.interval": "30"
},
"_INTERNAL": {
"run_api.active_profile": "Default",
"webui.edit_profile": "Default",
"webui.welcome_shown": "true"
}
}
I also tried to copy the content manually into the
/usr/local/openvpn_as/etc/config.json and
/usr/local/openvpn_as/etc/config-local.json files and restart the service with no good results.
I would really appreciate some help on how to make this same process on 2.7.5 version.