# openvpn.conf

## shoelesshunter78

I have installed openvpn. when I do

```
/etc/init.d/openvpn start
```

I experience the following:

```
* Starting openvpn ...

grep: /etc/openvpn/openvpn.conf: No such file or directory

grep: /etc/openvpn/openvpn.conf: No such file or directory

grep: /etc/openvpn/openvpn.conf: No such file or directory

grep: /etc/openvpn/openvpn.conf: No such file or directory

Options error: In [CMD-LINE]:1: Error opening configuration file: /etc/openvpn/openvpn.conf

Use --help for more information.

 * start-stop-daemon: failed to start `/usr/sbin/openvpn'

 * Check your logs to see why startup failed                                           [ !! ]

 * ERROR: openvpn failed to start
```

indeed there is no 

```

/etc/openvpn/openvpn.conf
```

but shouldn't that file generate during the openvpn installation?

help needed here to configure my vpn service

----------

## depontius

OpenVPN is quite versatile, and there are many ways to run it, many options, etc.  As such, it isn't the kind of thing that you can do any sort of default configuration upon installation.

By that same token, there are many HowTo, Quick-Start, etc guides for OpenVPN.  Start with one of those.  Google is your friend.

----------

## Anon-E-moose

Look under /usr/share/doc/openvpn*/examples

----------

## shoelesshunter78

I looked there. No examples. My question is why in my last installation, openvpn did not require me to write a config. Why now?

----------

## Anon-E-moose

 *shoelesshunter78 wrote:*   

> I looked there. No examples. My question is why in my last installation, openvpn did not require me to write a config. Why now?

 

are you sure you looked under examples???

/usr/share/doc/openvpn-2.3.2/examples/sample/sample-config-files $ ls

client.conf.bz2      loopback-server.bz2      README.bz2              tls-home.conf.bz2

firewall.sh.bz2      office.up.bz2            server.conf.bz2         tls-office.conf.bz2

home.up.bz2          openvpn-shutdown.sh.bz2  static-home.conf.bz2    xinetd-client-config.bz2

loopback-client.bz2  openvpn-startup.sh.bz2   static-office.conf.bz2  xinetd-server-config.bz2

You do have to copy one of them and rename it!!!!

And possibly modify it for your purposes.

----------

## mubai

There's a USE-flag for generating examples.

Regards,

Johan

----------

## Anon-E-moose

 *mubai wrote:*   

> There's a USE-flag for generating examples.
> 
> Regards,
> 
> Johan

 

You're right, I did set mine. If he'll set the examples flag and re-emerge he should have some samples to use.

----------

## 666threesixes666

can we document this @ wiki plz?  i tried taking a stab at openvpn and it was just too much......  i setup a hamachi stub that is suffice means to my ends, and a pptp stub that was fruitless though seemed to be my next best option over hamachi....  afaik pptp is a microsoft product?  a "just works" config server & config client example would be very very helpful to configuring it any other way i would want.....

----------

## Anon-E-moose

This is from the README in the sample-config-files examples directory.

 *Quote:*   

> Sample OpenVPN Configuration Files.
> 
> These files are part of the OpenVPN HOWTO
> 
> which is located at:
> ...

 

I've only used the client side of it, not the server side.

----------

## shoelesshunter78

I did copy the sample into place. thank you.

a side note of sorts: when I use NetworkManager to graphically import a VPN configuration, I am unable to edit anything in the GUI-- connection name, auth type, drop-downs... where there were once the ability to edit the configurations, there is none.

please help.

----------

## Anon-E-moose

Can't help you there, as I don't use networkmanager.

I do "sudo vi /etc/openvpn/openvpn.conf" instead. (substitute another editor for vi if that is what you use)

But perhaps someone can come by that does use networkmanager.

Glad to see you're getting there.

----------

## nlsa8z6zoz7lyih3ap

I used  *Quote:*   

> http://openvpn.net/index.php/open-source/documentation/howto.html#pki

 

both to set up openvpn servers on my tomato shibby firmware e3000 router and clients on my ipod and laptop.

I don't use the init system to start the clients but use the methods from the above link, after the internet connection has completed.  However I have (some time ago) tested both openrc and systemd for this purpose and both worked well.

----------

## shoelesshunter78

Thank you. NetworkManager did the trick.

However...

I can only access and change settings when logged in as root.

----------

## Anon-E-moose

I think that's because the configuration files are owned by root.

I start openvpn with sudo (effectively root)

Not sure if it can be started by a regular user.

----------

