Toon posts:

Problemen met OpenVPN kan deamon niet starten foutje?

Pagina: 1
Acties:

Verwijderd

Topicstarter
Hallo allemaal, ik kom er echt niet uit, probeer al even een raspberry om te toveren om ook een openvpn server te spelen, maar ik kan op moment de openvpn service niet starten...

Nu vertelde iemand me om in het /var/log/syslog te kijken of ik iets zag maar dat zegt niets op het moment ik de service probeer te starten... wel wordt de service uiteraard herkend. |:(

Ik heb de volgende tutorial gebruikt voor het maken van mijn openvpn server, en het ging ook allemaal goed, maar ik kan hem niet opstarten...

http://raspberrypihelp.ne...1-openvpn-server-tutorial

Wanneer ik het volgende commando geef, krijg ik dit:

root@raspbmc:/etc/openvpn# sudo /etc/init.d/openvpn start
[FAIL] Starting virtual private network daemon: openvpn server failed!

Mijn config ziet er als volgt uit (openvpn.conf) in de map /etc/openvpn/
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
dev tun
proto udp
port 1194
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/server.crt
key /etc/openvpn/easy-rsa/keys/server.key
dh /etc/openvpn/easy-rsa/keys/dh1024.pem
user nobody
group nogroup
server 10.8.0.0 255.255.255.0
persist-key
persist-tun
status /var/log/openvpn-status.log
verb 3
client-to-client
push .redirect-gateway def1"
#set the dns servers
push .dhcp-option DNS 8.8.8.8"
push .dhcp-option DNS 8.8.4.4"
log-append /var/log/openvpn
comp-lzo


Mijn certificaten etc heb ik allemaal al aangemaakt, maar tot zover geen resultaat. =(
Graag zou ik wat tips suggesties willen, misschien weten jullie waar die clue zit...

  • Freeaqingme
  • Registratie: April 2006
  • Laatst online: 23:44
Wat staat er in je logs?

Eventueel kan je ook openvpn van de command line draaien om meteen te zien wat deze doet: openvpn /etc/openvpn/openvpn.conf

No trees were harmed in creating this message. However, a large number of electrons were terribly inconvenienced.


Verwijderd

Topicstarter
Ah als ik dat draai geeft die geen meldingen of dergelijke o.o en gaat die gewoon door ;) maar hij is nog niet gestart.

In mijn log staat het volgende

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Aug 17 23:33:25 raspbmc xinetd[1326]: removing daytime
Aug 17 23:33:25 raspbmc xinetd[1326]: removing discard
Aug 17 23:33:25 raspbmc xinetd[1326]: removing discard
Aug 17 23:33:25 raspbmc xinetd[1326]: removing echo
Aug 17 23:33:25 raspbmc xinetd[1326]: removing echo
Aug 17 23:33:25 raspbmc xinetd[1326]: removing time
Aug 17 23:33:25 raspbmc xinetd[1326]: removing time
Aug 17 23:33:25 raspbmc xinetd[1326]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
Aug 17 23:33:25 raspbmc xinetd[1326]: Started working: 4 available services
Aug 17 23:33:27 raspbmc xinetd[1326]: Exiting...
Aug 17 23:33:27 raspbmc xbmc: xinetd stop/waiting
Aug 17 23:33:29 raspbmc xbmc: xinetd start/running, process 1353
Aug 17 23:33:29 raspbmc xinetd[1353]: Reading included configuration file: /etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=14]
Aug 17 23:33:29 raspbmc xinetd[1353]: Reading included configuration file: /etc/xinetd.d/daytime [file=/etc/xinetd.d/daytime] [line=28]
Aug 17 23:33:29 raspbmc xinetd[1353]: Reading included configuration file: /etc/xinetd.d/discard [file=/etc/xinetd.d/discard] [line=26]
Aug 17 23:33:29 raspbmc xinetd[1353]: Reading included configuration file: /etc/xinetd.d/echo [file=/etc/xinetd.d/echo] [line=25]
Aug 17 23:33:29 raspbmc xinetd[1353]: Reading included configuration file: /etc/xinetd.d/ftp [file=/etc/xinetd.d/ftp] [line=26]
Aug 17 23:33:29 raspbmc xinetd[1353]: Reading included configuration file: /etc/xinetd.d/netbios-ns [file=/etc/xinetd.d/netbios-ns] [line=10]
Aug 17 23:33:29 raspbmc xinetd[1353]: Reading included configuration file: /etc/xinetd.d/samba [file=/etc/xinetd.d/samba] [line=12]
Aug 17 23:33:29 raspbmc xinetd[1353]: Reading included configuration file: /etc/xinetd.d/ssh [file=/etc/xinetd.d/ssh] [line=12]
Aug 17 23:33:29 raspbmc xinetd[1353]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=12]
Aug 17 23:33:29 raspbmc xinetd[1353]: removing chargen
Aug 17 23:33:29 raspbmc xinetd[1353]: removing chargen
Aug 17 23:33:29 raspbmc xinetd[1353]: removing daytime
Aug 17 23:33:29 raspbmc xinetd[1353]: removing daytime
Aug 17 23:33:29 raspbmc xinetd[1353]: removing discard
Aug 17 23:33:29 raspbmc xinetd[1353]: removing discard
Aug 17 23:33:29 raspbmc xinetd[1353]: removing echo
Aug 17 23:33:29 raspbmc xinetd[1353]: removing echo
Aug 17 23:33:29 raspbmc xinetd[1353]: removing time
Aug 17 23:33:29 raspbmc xinetd[1353]: removing time
Aug 17 23:33:29 raspbmc xinetd[1353]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
Aug 17 23:33:29 raspbmc xinetd[1353]: Started working: 4 available services
Aug 17 23:33:39 raspbmc kernel: bcm2708 watchdog, heartbeat=10 sec (nowayout=0)
Aug 17 23:40:41 raspbmc xbmc: no talloc stackframe around, leaking memory
Aug 18 13:17:06 raspbmc xbmc: Exception SystemExit in <function _remove at 0x269c430> ignored

[ Voor 132% gewijzigd door Verwijderd op 23-08-2013 19:35 ]


  • ihre
  • Registratie: Juni 2004
  • Laatst online: 12-02 09:36
Mijn OpenVPN config:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
port 1194
proto udp
dev tun

;management 127.0.0.1 1194

ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
;tls-auth keys/ta.key 0

;secret server.key

server 172.16.0.0 255.255.255.0
;ifconfig 172.16.0.1 172.16.0.6
push "route 10.10.1.0 255.255.255.0"
push "dhcp-option DNS 10.10.1.1"
push "dhcp-option DOMAIN 10.10.1.1"

client-to-client
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status /var/log/openvpn-status.log
log-append /var/log/openvpn.log
verb 0


Het volgende lijkt me iig niet goed in jouw config:

code:
1
2
push .dhcp-option DNS 8.8.8.8"
push .dhcp-option DNS 8.8.4.4"


Wordt:

code:
1
2
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"


Je kunt de server ook starten met, dan krijg je debug info te zien:
code:
1
sudo openvpn /path/to/serverconfig


En de log die je moet volgen is natuurlijk /var/log/openvpn (in jouw config):
code:
1
sudo tail -f /var/log/openvpn

[ Voor 14% gewijzigd door ihre op 23-08-2013 19:47 ]


Verwijderd

Topicstarter
Options error: In [CMD-LINE]:1: Error opening configuration file: /path/to/serve rconfig
Use --help for more information.

Krijg ik dan als error?

  • ihre
  • Registratie: Juni 2004
  • Laatst online: 12-02 09:36
lol, ik bedoel met /path/to/serverconfig dus /etc/openvpn/openvpn.conf.

[ Voor 28% gewijzigd door ihre op 23-08-2013 20:11 ]


Verwijderd

Topicstarter
Mhm oke ja hij heet openvpn.conf in /etc/openvpn/ maar die is er gewoon ;) maar dat is deze file.. Ik heb die aanpassingen gedaan misschien niet de juiste permissions?

  • ihre
  • Registratie: Juni 2004
  • Laatst online: 12-02 09:36
Met sudo maken die rechten niks uit:
code:
1
sudo openvpn /etc/openvpn/openvpn.conf


Tevens wil je juist dat openvpn.conf van root is, dus:
code:
1
2
sudo chown root.root /etc/openvn/openvpn.conf
sudo chmod 600 /etc/openvpn/openvpn.conf

[ Voor 46% gewijzigd door ihre op 23-08-2013 20:14 ]


Verwijderd

Topicstarter
Heb dit beide gedaan krijg nog steeds failed bij het starten even die log kijken...


EDIT:

Fri Aug 23 20:38:00 2013 Cannot load certificate file /etc/openvpn/easy-rsa/keys/server.crt: error:0906D06C:PEM routines:PEM_read_bio:no start line: error:140AD009:SSL routines:SSL_CTX_use_certificate_file:PEM lib

Faalhaas... |:( |:( |:( |:( |:( |:( |:( |:( |:( |:( |:(

[ Voor 65% gewijzigd door Verwijderd op 23-08-2013 20:38 ]


  • ihre
  • Registratie: Juni 2004
  • Laatst online: 12-02 09:36
code:
1
push .redirect-gateway def1"


>

code:
1
push "redirect-gateway def1"


Viel me net pas op :P

Verwijderd

Topicstarter
haha die heb ik al thnx ;) Ik heb nog 1 vraag, in mijn tutorial staat:

sudo nano /etc/rc.local

[ENTER]

The nano editor pops up with the rc.local file

Add this 2 lines just above “exit 0”

iptables -t nat -A INPUT -i eth0 -p udp -m udp --dport 1194 -j ACCEPT

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j SNAT --to-source RASPBERRY.PI.IP.ADRESS


Bedoelen ze hier het interne adres of het adres vanaf buitenaf? Intern toch?

  • ihre
  • Registratie: Juni 2004
  • Laatst online: 12-02 09:36
Ja, het interne LAN IP van je RPI, ik heb zelf:
code:
1
iptables -t nat -A POSTROUTING -s 172.16.0.0/24 -o eth0 -j MASQUERADE

Verwijderd

Topicstarter
wat doet dat dan? :D

  • ihre
  • Registratie: Juni 2004
  • Laatst online: 12-02 09:36
"To allow LAN nodes with private IP addresses to communicate with external public networks, configure the firewall for IP masquerading..."
http://www.centos.org/doc...uting-ipmasquerading.html

Zodoende kunnen je VPN clients andere nodes op je hostnetwerk bereiken, via NAT.

[ Voor 25% gewijzigd door ihre op 23-08-2013 21:51 ]

Pagina: 1