Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install openvpn in my amazon ec2 instance. I tried the following site for my setup.

In my client side I run the following command :

sudo openvpn  --proto tcp-client --remote x.x.x.x.x.x. --port 80  --dev tun1  --secret ovpn.key --redirect-gateway def1 --ifconfig --daemon

And also the following commands:

sudo mv /etc/resolv.conf /etc/
echo "nameserver $Of-My-Ec2-Machine-IP" | sudo tee /etc/resolv.conf

But once I run this command. And I tried to connect to my internet from the client side. But it fails.

And also doing :

sudo /etc/init.d/openvpn status

Doesn't give any output.

Where I'm making the mistake?

Thanks in advance.

share|improve this question

I'm pretty sure that --dev tun1 needs to just be --dev tun. The whole nameserver thing is a little weird too, try connecting without doing it.

If not, what's the output of OpenVPN when you remove the --daemon option, and add --verb 3? It will be easier to diagnose from there.

You might also want to put all those options into a config file (one per line, remove the --s) and just pass OpenVPN the file name.

The OpenVPN HOWTO might be a useful aid to start off.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.