Setting Up OpenWRT OpenVPN Server and Certificate Creation

Channel:
Subscribers:
14,400
Published on ● Video Link: https://www.youtube.com/watch?v=8mmPXGj-63o



Category:
Tutorial
Duration: 7:58
5,102 views
42


#OpenWRT #OpenVPN #VPNServer

Full steps can be found at https://i12bretro.github.io/tutorials/0284.html

Prerequisites
   - A XCA PKI database  https://youtu.be/ezzj3x207lQ
 
Create Required Certificates
   01. Launch XCA
   02. Open the PKI database if it is not already (File ≫ Open DataBase), enter password
   03. Click on the Certificates tab, right click on your Intermediate CA certificate
   04. Select New
   05. On the Source tab, make sure Use this Certificate for signing is selected
   06. Verify your Intermediate CA certificate is selected from the drop down
   07. Click the Subject tab
   08. Complete the Distinguished Name section
         internalName: OpenVPN Server
         countryName: US
         stateOrProvinceName: Virginia
         localityName: Northern
         organizationName: i12bretro
         organizationUnitName: i12bretro Certificate Authority
         commonName: vpn.i12bretro.local
   09. Click the Generate a New Key button
   10. Enter a name and set the key size to at least 2048
   11. Click Create
   12. Click on the Extensions tab
   13. Set the Type dropdown to End Endity
   14. Check the box next to Subject Key Identifier
   15. Update the validity dates to fit your needs
   16. Click the Key Usage tab
   17. Under Key Usage select Digital Signature and Key Encipherment
   18. Under Extended Key Usage select TLS Web Server Authentication
   19. Click the Netscape tab
   20. Deselect all options and clear the Netscape Comment field
   21. Click OK to create the certificate
   22. Click on the Certificates tab, right click on your Intermediate CA certificate again
   23. Select New
   24. On the Source tab, make sure Use this Certificate for signing is selected
   25. Verify your Intermediate CA certificate is selected from the drop down
   26. Click the Subject tab
   27. Complete the Distinguished Name section
         internalName: OpenVPN Client #1
         countryName: US
         stateOrProvinceName: Virginia
         localityName: Northern
         organizationName: i12bretro
         organizationUnitName: i12bretro Certificate Authority
         commonName: VPN Client 1
   28. Click the Generate a New Key button
   29. Enter a name and set the key size to at least 2048
   30. Click Create
   31. Click on the Extensions tab
   32. Set the Type dropdown to End Endity
   33. Check the box next to Subject Key Identifier
   34. Update the validity dates to fit your needs
   35. Click the Key Usage tab
   36. Under Key Usage select Digital Signature, Key Agreement
   37. Under Extended Key Usage select TLS Web Client Authentication
   38. Click the Netscape tab
   39. Deselect all options and clear the Netscape Comment field
   40. Click OK to create the certificate
   41. On the Certificates tab, click the OpenVPN Server certificate
   42. Select Extra ≫ Generate DH Parameter
   43. Type 2048 for DH parameter bits
   44. Click OK
   45. Select a location for dh2048.pem and click Save
 
Exporting Required Files for OpenVPN
   01. In XCA, click on the Certificates tab
   02. Right click the Intermediate CA certificate ≫ Export ≫ File
   03. Set the file name with a .pem extension and verify the export format is PEM chain (*.pem)
   04. Click OK
   05. Right click the OpenVPN Server certificate ≫ Export ≫ File
   06. Set the file name with a .crt extension and verify the export format is PEM (*.crt)
   07. Click OK
   08. Right click the OpenVPN Client #1 certificate ≫ Export ≫ File
   09. Set the file name with a .crt extension and verify the export format is PEM (*.crt)
   10. Click OK
   11. Click on the Private Keys tab
   12. Right click the OpenVPN Server key ≫ Export ≫ File
   13. Set the file name with a .pk8 extension and verify the export format is PKCS #8 (*.pk8)
   14. Click OK
   15. Right click the OpenVPN Client #1 key≫ Export ≫ File
   16. Set the file name with a .pk8 extension and verify the export format is PKCS #8 (*.pk8)
   17. Click OK
 
Setting Up OpenVPN Server in OpenWRT
   01. Open a web browser and navigate to your OpenWRT IP address
   02. Login when prompted
   03. Select System ≫ Software from the navigation menu
   04. Click on the Update lists button to update the software repositories
   05. Click the Dismiss button once the update has completed
   06. Type openvpn in the filter field
   07. Click the Install... button next to openvpn-openssl
   08. Click the Install button to confirm installing with dependencies
   09. Click the Dismiss button once the install has completed
   10. Click the Install... button next to luci-app-openvpn
   11. Click the Install button to confirm installing with dependencies
   12. Click the Dismiss button once the install has completed
   13. Refresh the browser window


....Full steps can be found on GitHub [link at the top]


### Connect with me and others ###
★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro







Tags:
Free Software
Home Lab
Home Lab Ideas
How To
How To Install OpenVPN Server On OpenWRT
How To Run OpenVPN Server On OpenWRT
Install Guide
Installation
Linux
Networking
OVPN
OpenVPN
OpenWRT
Router
Self-Hosted VPN
Tutorial
VPN
VPN Server
VPN Solution
i12bretro