Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 10.4.0.2 10.4.0.1 --daemon

And also the following commands:

sudo mv /etc/resolv.conf /etc/resolv.conf.save
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

1 Answer 1

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

 
discard

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.