1

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.

batman
  • 321
  • 1
  • 5
  • 10

1 Answers1

2

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.

Alex
  • 21
  • 6