# Thitle i can start OpenVPN



## Jorlando (May 15, 2018)

I try to start openvpn with `service openvpn start` I get the following

```
"Starting openvpn.
/usr/local/etc/rc.d/openvpn: WARNING: failed to start openvpn"
```
please someone help me


----------



## zirias@ (May 15, 2018)

This is way too little information to provide any help. At least show your openvpn configuration files.


----------



## Jorlando (May 15, 2018)

Zirias said:


> This is way too little information to provide any help. At least show your openvpn configuration files.




```
#################################################
# Sample OpenVPN 2.0 config file for            #
# multi-client server.                          #
#                                               #
# This file is for the server side              #
# of a many-clients <-> one-server              #
# OpenVPN configuration.                        #
#                                               #
# OpenVPN also supports                         #
# single-machine <-> single-machine             #
# configurations (See the Examples page         #
# on the web site for more info).               #
#                                               #
# This config should work on Windows            #
# or Linux/BSD systems.  Remember on            #
# Windows to quote pathnames and use            #
# double backslashes, e.g.:                     #
# "C:\\Program Files\\OpenVPN\\config\\foo.key" #
#                                               #
# Comments are preceded with '#' or ';'         #
#################################################

# Which local IP address should OpenVPN
# listen on? (optional)
local 192.168.1.1
port 1194
proto udp
dev tun
ca /usr/local/etc/openvpn/keys/ca.crt
cert /usr/local/etc/openvpn/keys/openvpn-server.crt
key /usr/local/etc/openvpn/keys/openvpn-server.key

server 192.168.1.0 255.255.255.0


ifconfig-pool-persist ipp.txt
client-to-client


user nobody
group nobody


persist-key
persist-tun


status openvpn-status.log


log         openvpn.log


verb 3

explicit-exit-notify 1
```


----------



## SirDice (May 15, 2018)

What is OpenVPN supposed to do? Server? Client? We're good but we're not clairvoyant. Please explain what you want to do.


----------



## ShelLuser (May 15, 2018)

Jorlando said:


> please someone help me


So what does your logfile tell you? That should list the actual error message(s) and also showcase what went wrong (and why).

Another important aspect: have you followed up (and tried) the connection examples as shown in openvpn(8)?
You know, stuff like this:

```
Example 1: A simple tunnel without security
       On bob:

              openvpn --remote alice.example.com --dev tun1 --ifconfig
              10.4.0.1 10.4.0.2 --verb 9

       On alice:

              openvpn --remote bob.example.com --dev tun1 --ifconfig 10.4.0.2
              10.4.0.1 --verb 9

       Now verify the tunnel is working by pinging across the tunnel.
```
... because that can seriously help you to rule out possible external causes for whatever problem you're facing here.


----------



## Jorlando (May 15, 2018)

HenryLeGrande said:


> Amen





SirDice said:


> What is OpenVPN supposed to do? Server? Client? We're good but we're not clairvoyant. Please explain what you want to do.


It is a server, I finished to configure all archives but when I try to start the service with `service openvpn start`, I get the following,

```
"Starting openvpn.
/usr/local/etc/rc.d/openvpn: WARNING: failed to start openvpn"
```
and in my configuration usr/local/etc/openvpn/openvpn.conf I have this:

```
local 192.168.1.1
port 1194
proto udp
dev tun
ca /usr/local/etc/openvpn/keys/ca.crt
cert /usr/local/etc/openvpn/keys/openvpn-server.crt
key /usr/local/etc/openvpn/keys/openvpn-server.key
server 192.168.1.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-to-client
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
log         openvpn.log
verb 3
explicit-exit-notify 1
```

I'm student and I new to FreeBSD. I think that the configuration is ok. I don't know if is some in /rc.d/openvpn
(sorry for my English, I'm Mexican)


----------



## Jorlando (May 15, 2018)

ShelLuser said:


> So what does your logfile tell you? That should list the actual error message(s) and also showcase what went wrong (and why).
> 
> Another important aspect: have you followed up (and tried) the connection examples as shown in openvpn(8)?
> You know, stuff like this:
> ...


----------



## zirias@ (May 15, 2018)

No offense intended, but if you don't even know how to show a logfile, it's probably time to a) read the fine handbook and b) do some research yourself ... it will enable you to ask a question in a way that's likely to give somebody enough clue to provide you a solution.

Also, unrelated, but c) please get familiar with this message board and formatting text.


----------



## ShelLuser (May 15, 2018)

Jorlando said:


> mmm how do I show my logfile? , I'm new in Freebsd


First of all: definitely take a little more effort to properly quote a post. I know you can do this because you've shown that earlier. It makes it easier to answer.

OpenVPN sends its messages to syslog by default (see /etc/syslog.conf as well as syslog.conf(5)) so /var/log is the first place to look. In specific /var/log/messages and /var/log/auth.

So try to start it, and check if you can find any specific error messages.

Another possible option is to start OpenVPN manually and see where that leads you. For example... `# openvpn --config <point to your config file> |& tee vpn.log` (note that I am assuming here that you're using csh as the root user).

This will start OpenVPN (sort off) and it should give you any error messages. Which will then also be sent to vpn.log as an easy reference.

But I definitely agree with Zirias up there, you definitely need some basic understanding of the OS if you plan on setting up and maintaining a VPN.


----------

