[Solved]VPN fails to start, help! desperate

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Locked
siulman
OpenVPN User
Posts: 28
Joined: Sun Feb 15, 2015 6:00 pm

[Solved]VPN fails to start, help! desperate

Post by siulman » Sun Feb 15, 2015 6:10 pm

Hello,

I'm desperate here! don't know what happens.
I followed this tutorial to configure VPN on my raspberry pi with debian:
http://readwrite.com/2014/04/10/raspber ... b-browsing

here logs:
root@raspberrypi:/var/log# sudo service openvpn stop
[ ok ] Stopping virtual private network daemon:.
root@raspberrypi:/var/log# sudo service openvpn start
[FAIL] Starting virtual private network daemon: server failed!
root@raspberrypi:/var/log# grep VPN *
openvpn.log:Sun Feb 15 18:03:05 2015 OpenVPN 2.2.1 arm-linux-gnueabihf [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Dec 1 2014
openvpn.log:Sun Feb 15 18:03:06 2015 NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
openvpn.log:Sun Feb 15 18:03:06 2015 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
openvpn.log:Sun Feb 15 18:03:06 2015 Control Channel Authentication: using '/etc/openvpn/easy-rsa/keys/ta.key' as a OpenVPN static key file
root@raspberrypi:/var/log# cat openvpn.log
Sun Feb 15 18:03:05 2015 OpenVPN 2.2.1 arm-linux-gnueabihf [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Dec 1 2014
Sun Feb 15 18:03:06 2015 NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
Sun Feb 15 18:03:06 2015 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Sun Feb 15 18:03:06 2015 Control Channel Authentication: using '/etc/openvpn/easy-rsa/keys/ta.key' as a OpenVPN static key file
Sun Feb 15 18:03:06 2015 TCP/UDP: Socket bind failed on local address [AF_INET]192.168.1.12:8080: Cannot assign requested address
Sun Feb 15 18:03:06 2015 Exiting
root@raspberrypi:/var/log#
root@raspberrypi:/var/log# ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:b1:14:88
inet addr:192.168.1.120 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4534 errors:0 dropped:0 overruns:0 frame:0
TX packets:1599 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:287732 (280.9 KiB) TX bytes:318712 (311.2 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1504 (1.4 KiB) TX bytes:1504 (1.4 KiB)

My server configuration

root@raspberrypi:/var/log# cat /etc/openvpn/server.conf
local 192.168.1.12O # adresse IP locale de votre serveur
dev tun # type de VPN, tun (tunnel IP) ou tap (tunnel Ethernet/bridge)
proto udp # protocole à utiliser : tcp ou udp, généralement udp
port 8080 # le port par défaut pour OpenVPN, à ajuster au besoin
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/raspi.crt # à ajuster à votre serveur
key /etc/openvpn/easy-rsa/keys/raspi.key # idem
dh /etc/openvpn/easy-rsa/keys/dh1024.pem # si vous êtes restés sur du 1024 bits, changez ici
server 10.8.0.0 255.255.255.0 #le réseau au sein duquel vous allez attribuer des IP
ifconfig 10.8.0.1 10.8.0.2 # serveur et point de sortie distant
push "redirect-gateway def1"
push "route 10.8.0.1 255.255.255.255" # route vers le serveur VPN
push "route 10.8.0.0 255.255.255.0" # route vers le sous-réseau VPN
push "route 192.168.1.120 255.255.255.0" #sous-réseau local - adaptez l'adresse IP locale de votre serveur
push "dhcp-option DNS 192.168.1.254" # votre serveur DNS primaire (votre routeur, souvent)
# vous pouvez aussi utiliser le DNS Google 8.8.8.8 ou OpenDNS 208.67.222.222
# pour le reste, a priori pas de raisons d'y toucher à moins de savoir ce que vous faites !
client-to-client
duplicate-cn
keepalive 10 120
tls-auth /etc/openvpn/easy-rsa/keys/ta.key 0
cipher AES-128-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn-status.log 20
log /var/log/openvpn.log
verb 1

Client configuration
root@raspberrypi:/var/log# cat /etc/openvpn/easy-rsa/keys/Default.txt
client
dev tun
proto udp
remote my_domaine.no-ip.org 8080
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ns-cert-type server
key-direction 1
cipher AES-128-CBC
comp-lzo
verb 1
mute 20
root@raspberrypi:/var/log#
TCPDUMP (packets seen from the raspberry
root@raspberrypi:/var/log# tcpdump port 8080
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
18:08:31.491828 IP 80.215.228.152.4574 > raspberrypi.http-alt: UDP, length 42
18:08:32.543454 IP 80.215.228.152.4574 > raspberrypi.http-alt: UDP, length 42
18:08:36.603940 IP 80.215.228.152.4547 > raspberrypi.http-alt: UDP, length 42
18:08:38.603710 IP 80.215.228.152.4547 > raspberrypi.http-alt: UDP, length 42
18:08:40.623667 IP 80.215.228.152.4547 > raspberrypi.http-alt: UDP, length 42
I don't know what to do....

can anybody help please?

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: VPN fails to start, help! desperate

Post by maikcat » Sun Feb 15, 2015 6:25 pm

your eth0 is
inet addr:192.168.1.120
192.168.1.120 but in logs
TCP/UDP: Socket bind failed on local address [AF_INET]192.168.1.12:8080: Cannot assign requested address
shows 192.168.1.12

your config
local 192.168.1.12O # adresse IP locale de votre serveur
the 120 is not 120 is 12O (letter O instead of zero)

Michael.

siulman
OpenVPN User
Posts: 28
Joined: Sun Feb 15, 2015 6:00 pm

Re: VPN fails to start, help! desperate

Post by siulman » Sun Feb 15, 2015 8:30 pm

I can't believe it!!!!
4 hours and I didn't see it!!!!

Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you .

Sometimes another point of view is all that we need....

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: [Solved]VPN fails to start, help! desperate

Post by maikcat » Mon Feb 16, 2015 7:28 am

You welcome.

:D

Marked as solved,

closing topic

regards,

Michael.

Locked