RecentChanges TextFormattingRules AllWikiTopics OrphanedWikiTopics ToDoWikiTopics WikiLockList RSS Export2HTML WikiSearch SetUsername StartingPoints Home |
VPN:OpenVPN @Dec 16, 2012 1:30:25 PM
To quote from http://openvpn.net/
"OpenVPN is a full-featured SSL VPN which implements OSI layer 2 or 3 secure network extension using the industry standard SSL/TLS protocol" I'm going to create one VPN server and allow some clients to connect to it. This might be useful if you have one server on the Internet and others that need to create secure Virtual Private Networks to it. ServerInstall on the server. Ubuntu would be like this (my server is Red Hat and I forget how I installed, because it was that long ago)sudo apt-get -y install openvpn Copy the easy-rsa scripts from the install directory to /etc/openvpn. The source directory is different between Red Hat sudo cp -ar /usr/share/doc/openvpn-2.0/easy-rsa /etc/openvpn and Ubuntu sudo cp -ar /usr/share/doc/openvpn/examples/easy-rsa /etc/openvpn Make that directory more secure, as it's going to hold server and client certificates and keys cd /etc/openvpn/easy-rsa Clean and edit the environment variables, which saves a lot of typing in the next part sudo init-config Clean out the keys and build the SSL ca certificate sudo sh ./clean-all Build the server's keys sudo sh ./build-key-server server Build any client's keys sudo sh ./build-key client1 Build the Diffie-Hellman parameter (key) file sudo sh ./build-dh Copy the server's certificates and keys to /etc/openvpn sudo cp -a keys/ca.crt ../ Copy the default server config file from the install directory to /etc/openvpn sudo cp /usr/share/doc/openvpn-2.0/sample-config-files/server.conf /etc/openvpn I suggest you keep those files as secure as you can on the server boxe. sudo chmod 600 /etc/openvpn/dh1024.pem /etc/openvpn/ca.crt Edit the Open VPN server's config file sudo vi /etc/openvpn/server.conf My server's config file looks like this, if I remove all the comments port 1194 Restart the OpenVPN service sudo /etc/init.d/openvpn restart OR sudo service openvpn restart ClientSecurely copy the certificate and keys from your server, where you just built them, to your client boxes. The files are... /etc/openvpn/easy-rsa/keys/ca.crt /etc/openvpn/easy-rsa/keys/client1.crt /etc/openvpn/easy-rsa/keys/client1.keyCopy the default server config file from the install directory to /etc/openvpn cd /etc/openvpn I suggest you keep those files as secure as you can on the client boxes. sudo chmod 600 /etc/openvpn/ca.crt Edit the Open VPN server's config file sudo vi /etc/openvpn/client.conf My client's config file looks like this, if I remove all the comments: client Restart the OpenVPN service sudo /etc/init.d/openvpn restart OR sudo service openvpn restart
|