Question

Not able to Edit server.conf file

Posted February 25, 2016 6.4k views
UbuntuGetting StartedApplicationsDeploymentLinux Commands

I’m trying to install openvpn to my droplets .
I have successfully installed both openvpn and easy-rsa

apt-get  install openvpn easy-rsa

But when it comes to editing the server.conf file, that’s where I get stuck.
Once I run this command to open the server.conf with Vim editor:

vim /etc/openvpn/server.conf

I’m getting a black screen with blue ‘dashes’ (-) all the way to the bottom
and
E35: NO previous regular expression.

Kindly let me know where I’m going wrong.

Note: The problem started when I entered an SSH key on a different droplet.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

It looks like you’re missing a step here. You are currently seeing those dashes indicating that those lines don’t exist as you are creating a new blank file. The default install of openvpn does not create a server.conf file in /etc/openvpn. You’ll need to grab the sample config file from elsewhere in the filesystem where it is compressed.

gunzip -c /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz > /etc/openvpn/server.conf

This guide will assist you.

by James
OpenVPN is a full-featured open source Secure Socket Layer (SSL) VPN solution that accommodates a wide range of configurations. In this tutorial, we'll set up an OpenVPN server on a Droplet and then configure access to it from Windows, OS X, iOS and Android. This tutorial will keep the installation and configuration steps as simple as possible for these setups.