/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2010 Ermal Luçi
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
plugins.inc.d/openvpn/wizard.inc121Authentication Type SelectionlisttopicSelect an Authentication Backend TypeselectType of ServerauthtypeIf you are unsure, leave this set to "Local User Access".wizardtemp->step1->typeNextsubmit
if (isset($config['wizardtemp'])) {
unset($config['wizardtemp']);
}
step1_submitphpaction();2LDAP Server SelectionlisttopicLDAP Authentication Server ListauthservLDAP serversselectwizardtemp->step2->authservsubmitAdd new LDAP serversubmitNextstep2_stepbeforeformdisplay();step2_submitphpaction();enablechange();3Add LDAP ServerlisttopicLDAP Authentication Server ParametersnameNameinputwizardtemp->step2->authtype30Descriptive server name, for your own reference.ipHostname or IP addressinputwizardtemp->step2->ipAddress of the LDAP server.portPortinput8wizardtemp->step2->portLDAP Server port, leave blank for the default (389 for TCP, 636 for SSL).transportTransportselectwizardtemp->step2->transportThe protocol used by your LDAP server. It can either be standard TCP or SSL encrypted.scopeSearch Scope Levelselectwizardtemp->step2->scopebasednSearch Scope Base DNinput40wizardtemp->step2->basednauthscopeAuthentication Containersinput40wizardtemp->step2->authscopeSemicolon separated. This will be prepended to the search base DN above or you can specify full container path, e.g. CN=Users;DC=example or CN=Users,DC=example,DC=com;OU=OtherUsers,DC=example,DC=comuserdnLDAP Bind User DNinput20If left blank, an anonymous bind will be done.wizardtemp->step2->userdnpassdnLDAP Bind Passwordpassword20wizardtemp->step2->passdnIf a user DN was supplied above, this password will also be used when performing a bind operation.nameattrUser Naming Attributeinputwizardtemp->step2->nameattrTypically "cn" (OpenLDAP, Novell eDirectory), "sAMAccountName" (Microsoft AD)groupattrGroup Naming Attributeinputwizardtemp->step2->groupattrTypically "cn" (OpenLDAP, Microsoft AD, and Novell eDirectory)memberattrMember Naming Attributeinputwizardtemp->step2->memberattrTypically "member" (OpenLDAP), "memberOf" (Microsoft AD), "uniqueMember" (Novell eDirectory)submitAdd new Serverstep3_submitphpaction();enablechange();4RADIUS Server SelectionlisttopicRADIUS Authentication Server ListauthservRADIUS serversselectwizardtemp->step2->authservsubmitAdd new RADIUS serversubmitNextstep4_stepbeforeformdisplay();step4_submitphpaction();enablechange();5Add RADIUS ServerlisttopicRADIUS Authentication Server ParametersnameNameinputwizardtemp->step2->authtype20Descriptive name for the RADIUS server, for your reference.ipHostname or IP addressinputwizardtemp->step2->ipAddress of the RADIUS server.portAuthentication Portinput8wizardtemp->step2->portPort used by the RADIUS server for accepting Authentication requests, typically 1812.secretShared Secretpassword20wizardtemp->step2->passwordAdd new Serversubmitstep5_submitphpaction();6Certificate Authority SelectionChoose a Certificate Authority (CA)listtopiccertca_selection1certcaCertificate Authoritywizardtemp->step6->authcertcasubmitAdd new CANextsubmitstep6_stepbeforeformdisplay();step6_submitphpaction();7Add Certificate AuthorityCreate a New Certificate Authority (CA) CertificatelisttopicdescrDescriptive nameA name for your reference, to identify this certificate. This is the same as common-name field for other Certificates.input20wizardtemp->step6->certcakeylengthKey lengthSize of the key which will be generated. The larger the key, the more security is offers, but larger keys are generally slower to use.select2048wizardtemp->step6->keylengthlifetimeLifetimeinput10825Lifetime in days. This is commonly set to 825 (approximately 2 years).wizardtemp->step6->lifetimecountryCountry CodeTwo-letter ISO country code (e.g. NL, DE, US)input5wizardtemp->step6->countrystateState or ProvinceFull State of Province name, not abbreviated (e.g. Zuid Holland, Sachsen, Kentucky).input30wizardtemp->step6->statecityCityCity or other Locality name (e.g. Middelharnis, Leipzig, Louisville).input30wizardtemp->step6->cityorganizationOrganizationOrganization name, often the Company or Group name.input30wizardtemp->step6->organizationemailEmailEmail address for the Certificate contact. Often the email of the person generating the certificate (i.e. You.)input30wizardtemp->step6->emailAdd new CAsubmitstep7_submitphpaction();enablechange();8Server Certificate SelectionChoose a Server Certificatelisttopiccert_selectioncertnameCertificatewizardtemp->step9->authcertnamesubmitAdd new CertificateNextsubmitstep8_stepbeforeformdisplay();step8_submitphpaction();9Add a Server CertificateCreate a New Server CertificatelisttopicdescrDescriptive nameA name for your reference, to identify this certificate. This is also known as the certificate's "Common Name".input20wizardtemp->step9->certnamekeylengthKey lengthSize of the key which will be generated. The larger the key, the more security is offers, but larger keys are generally slower to use.select2048wizardtemp->step9->keylengthlifetimeLifetimeLifetime in days. This is commonly set to 397 (approximately 1 year).input10397wizardtemp->step9->lifetimecountryCountry CodeTwo-letter ISO country code (e.g. NL, DE, US)input5wizardtemp->step9->countrystateState or ProvinceFull State of Province name, not abbreviated (e.g. Zuid Holland, Sachsen, Kentucky).input30wizardtemp->step9->statecityCityCity or other Locality name (e.g. Middelharnis, Leipzig, Louisville).input30wizardtemp->step9->cityorganizationOrganizationOrganization name, often the Company or Group name.input30wizardtemp->step9->organizationemailEmailEmail address for the Certificate contact. Often the email of the person generating the certificate (i.e. You.)input30wizardtemp->step9->emailCreate new Certificatesubmitstep9_stepbeforeformdisplay();step9_submitphpaction();10Server SetuplisttopicGeneral OpenVPN Server Informationinterfaceinterfaces_selectionopenvpnanyThe interface where OpenVPN will listen for incoming connections.Interfacewizardtemp->step10->interfaceProtocolselectwizardtemp->step10->protocolUDPProtocol to use for OpenVPN connections. If you are unsure, leave this set to UDP.localportLocal PortLocal port upon which OpenVPN will listen for connections. The default port is 1194. Leave this blank to auto-select an unused port.input10wizardtemp->step10->localportdescriptionDescriptionA name for this OpenVPN instance, for your reference. It can be set however you like, but is often used to distinguish the purpose of the service (e.g. "Remote Technical Staff").input30wizardtemp->step10->descrlisttopicCryptographic SettingsTLS AuthenticationcheckboxonEnable authentication of TLS packets.wizardtemp->step10->tlsauthGenerate TLS KeygeneratetlskeytlssharedkeyoncheckboxAutomatically generate a shared TLS authentication key.wizardtemp->step10->gentlskeyTLS Shared KeytlssharedkeyPaste in a shared TLS key if one has already been generated.textarea305wizardtemp->step10->tlskeycryptoselectEncryption Algorithmwizardtemp->step10->cryptoThe method used to encrypt traffic between endpoints. This setting must match on the client and server side, but is otherwise set however you like. Certain algorithms will perform better on different hardware, depending on the availability of supported VPN accelerator chips.digestselectAuth Digest Algorithmwizardtemp->step10->digestSHA1The method used to authenticate traffic between endpoints. This setting must match on the client and server side, but is otherwise set however you like.listtopicTunnel SettingsIPv4 Tunnel Networktunnelnetinput20wizardtemp->step10->tunnelnetThis is the IPv4 virtual network used for private communications between this server and client hosts expressed using CIDR (eg. 10.0.8.0/24). The first network address will be assigned to the server virtual interface. The remaining network addresses can optionally be assigned to connecting clients. (see Address Pool)IPv6 Tunnel Networktunnelnetv6input20wizardtemp->step10->tunnelnetv6This is the IPv6 virtual network used for private communications between this server and client hosts expressed using CIDR (eg. fe80::/64). The first network address will be assigned to the server virtual interface. The remaining network addresses can optionally be assigned to connecting clients. (see Address Pool)Redirect GatewayredirectgwcheckboxForce all client generated traffic through the tunnel.wizardtemp->step10->rdrgwIPv4 Local Networklocalnetinput20wizardtemp->step10->localnetThese are the IPv4 networks that will be accessible from the remote endpoint. Expressed as a comma-separated list of one or more CIDR ranges. You may leave this blank if you don't want to add a route to the local network through this tunnel on the remote machine. This is generally set to your LAN network.IPv6 Local Networklocalnetv6input20wizardtemp->step10->localnetv6These are the IPv6 networks that will be accessible from the remote endpoint. Expressed as a comma-separated list of one or more IP/PREFIX. You may leave this blank if you don't want to add a route to the local network through this tunnel on the remote machine. This is generally set to your LAN network.IPv4 Remote Networkremotenetinput20wizardtemp->step10->remotenetThese are the IPv4 networks that will be routed through the tunnel, so that a site-to-site VPN can be established without manually changing the routing tables. Expressed as a comma-separated list of one or more CIDR ranges. If this is a site-to-site VPN, enter the remote LAN/s here. You may leave this blank if you don't want a site-to-site VPN.IPv6 Remote Networkremotenetv6input20wizardtemp->step10->remotenetv6These are the IPv6 networks that will be routed through the tunnel, so that a site-to-site VPN can be established without manually changing the routing tables. Expressed as a comma-separated list of one or more IP/PREFIX. If this is a site-to-site VPN, enter the remote LAN/s here. You may leave this blank if you don't want a site-to-site VPN.Concurrent ConnectionsconcurrentconSpecify the maximum number of clients allowed to concurrently connect to this server.input10wizardtemp->step10->concurrentconCompressioncompressionCompress tunnel packets using the LZO algorithm. Adaptive compression will dynamically disable compression for a period of time if OpenVPN detects that the data in the packets is not being compressed efficiently.wizardtemp->step10->compressionselectType-of-ServicetoscheckboxSet the TOS IP header value of tunnel packets to match the encapsulated packet value.wizardtemp->step10->tosInter-Client CommunicationinterclientcheckboxAllow communication between clients connected to this server.wizardtemp->step10->interclientDuplicate Connectionsduplicate_cncheckboxAllow multiple concurrent connections from clients using the same Common Name. This is not generally recommended, but may be needed for some scenarios.wizardtemp->step10->duplicate_cnlisttopicClient SettingsDynamic IPdynipcheckboxonAllow connected clients to retain their connections if their IP address changes.wizardtemp->step10->dynipAddress PooladdrpoolcheckboxonProvide a virtual adapter IP address to clients (see Tunnel Network).wizardtemp->step10->addrpoolDNS Default DomaindefaultdomaininputProvide a default domain name to clients.wizardtemp->step10->defaultdomainDNS Server 1dnsserver1inputwizardtemp->step10->dns1DNS server to provide for connecting client systems.DNS Server 2dnsserver2inputwizardtemp->step10->dns2DNS server to provide for connecting client systems.DNS Server 3dnsserver3inputwizardtemp->step10->dns3DNS server to provide for connecting client systems.DNS Server 4dnsserver4inputwizardtemp->step10->dns4DNS server to provide for connecting client systems.NTP Serverntpserver1inputwizardtemp->step10->ntp1Network Time Protocol server to provide for connecting client systems.NTP Server 2ntpserver2inputwizardtemp->step10->ntp2Network Time Protocol server to provide for connecting client systems.nbtenablecheckboxNetBIOS Optionswizardtemp->step10->nbtenableEnable NetBIOS over TCP/IP. If this option is not set, all NetBIOS-over-TCP/IP options (including WINS) will be disabled.NetBIOS Node Typenbttypeselectwizardtemp->step10->nbttypePossible options: b-node (broadcasts), p-node (point-to-point name queries to a WINS server), m-node (broadcast then query name server), and h-node (query name server, then broadcast).NetBIOS Scope IDnbtscopeinputwizardtemp->step10->nbtscopeA NetBIOS Scope ID provides an extended naming service for NetBIOS over TCP/IP. The NetBIOS Scope ID isolates NetBIOS traffic on a single network to only those nodes with the same NetBIOS Scope ID.WINS Server 1winsserver1inputwizardtemp->step10->wins1A Windows Internet Name Service (WINS) server to provide for connecting clients, which allows them to browse Windows shares. This is typically an Active Directory Domain Controller, designated WINS server, or Samba server.WINS Server 2winsserver2inputwizardtemp->step10->wins2A Windows Internet Name Service (WINS) server to provide for connecting clients, which allows them to browse Windows shares. This is typically an Active Directory Domain Controller, designated WINS server, or Samba server.Nextsubmitstep10_stepbeforeformdisplay();step10_submitphpaction();11Firewall Rule ConfigurationlisttopicFirewall Rule ConfigurationtextFirewall Rules control what network traffic is permitted. You must add rules to allow traffic to the OpenVPN server's IP and port, as well as allowing traffic from connected clients through the tunnel. These rules can be automatically added here, or configured manually after completing the wizard.listtopicTraffic from clients to serverovpnruleFirewall RuleAdd a rule to permit traffic from clients on the Internet to the OpenVPN server process.checkboxwizardtemp->step11->ovpnrulelisttopicTraffic from clients through VPNovpnallowOpenVPN ruleAdd a rule to allow all traffic from connected clients to pass across the VPN tunnel.checkboxwizardtemp->step11->ovpnallowNextsubmit12Finished!textYour configuration is now complete.submitFinishstep12_submitphpaction();