본문 바로가기
정보기술/가상화

DigitalOcean Ubuntu VPS 에서 OpenVPN Access Server 설정

by fermi 2014. 10. 11.

참고: https://www.digitalocean.com/community/tutorials/how-to-install-openvpn-access-server-on-ubuntu-12-04


참고: https://docs.openvpn.net/access-server/


Software Packages


https://openvpn.net/index.php/access-server/download-openvpn-as-sw/113.html?osfamily=Ubuntu


Installing OpenVPN Acess Server


Let's begin by logging in as the root user. From here, download the OpenVPN AS package:


sudo wget http://swupdate.openvpn.org/as/openvpn-as-2.0.7-Ubuntu12.amd_64.deb


The above link is for 64-bit cloud servers since that is what we've decided to use. If by any chance you're using a 32-bit version, the download link would be:


sudo wget http://swupdate.openvpn.org/as/openvpn-as-2.0.7-Ubuntu12.i386.deb


To install OpenVPN AS, enter the following command:


dpkg -i openvpn-as-2.0.7-Ubuntu12.amd_64.deb 


If you are using a 32-bit cloud server, enter the following command instead:


dpkg -i openvpn-as-2.0.7-Ubuntu12.i386.deb


That's it. OpenVPN AS is now installed. However, there are still some things left to do before we can use it. During the installation, OpenVPN has created a default admin user called 'openvpn'. We need to set a password for 'openvpn'. To do that, enter the following command:


sudo passwd openvpn


You'll be prompted to enter your desired password. Make sure your password is secure.


Administration and Client Software Setup


OpenVPN AS web interfaces can be found at:


Admin  UI: https://YourIpAddress:943/admin

Client UI: https://YourIPAddress:943/


Replace "YourIPAddress" with your actual cloud server's IP address. Then, head over to the Client UI to use the access server. You'll see a big bad security warning. But don't be alarmed, it is perfectly okay since we've self-signed our server's SSL. Ignore the warning and click Ok/Proceed and you'll be prompted for username and password. Enter 'openvpn' as the username and the password should be what you've set for 'openvpn' before. 


설정결과 설정파일 위치


/etc/init.d/openvpnas


사용자 account 추가


참고: https://openvpn.net/index.php/access-server/docs/admin-guides/216-how-to-add-users-to-your-openvpn-access-server.html


sudo

adduser examleuser

passwd exampleuser


If you would like to set OpenVPN-AS Specific User Permissions; for example: Administrator, AutoLogin, VPN IP Address etc you will need to login to the OpenVPN-AS Admin UI (https://x.x.x.x:943/admin) with an Administrator account and navigate over to the User Permissions page:


Using DD-WRT with OpenVPN Access Server


참고: https://docs.openvpn.net/frequently-asked-questions/using-dd-wrt-with-openvpn-access-server/


Creating and Downloading the Autologin Profile


To create and download the autologin profile for your DD-WRT router, visit the User Permissions area, create an appropriate username for the DD-WRT OpenVPN client, and then check the Allow Auto-login checkbox. Click the Update Running Server button to make sure the changes take effect.



TLS Cipher 

AES-256 SHA 로 설정 한 후 Status의 OpenVPN Log 에서 TLS plain text error (?) 가 있어서 AES-128 SHA 로 수정함