No connection

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Locked
nephilim75
OpenVpn Newbie
Posts: 11
Joined: Mon May 16, 2016 1:29 pm

No connection

Post by nephilim75 » Mon May 16, 2016 1:57 pm

Hello

all my tries to get connected to my VPN at home are failing. I imported the *.ovpn file. All referenced files are in the same directory as the *.ovpn file. Then I try to connect. OpenVPN Connect replies all the time: "Waiting for server".

I checked my portforwarding on my router and it looks correct. It points to port 1194 (UDP) on my R-Pi (internal hostname: "openvpn").

This is how my openvpn.conf in /etc/openvpn does look like:

Code: Select all

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/dh2048.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 bypass-dhcp"
#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
duplicate-cn
keepalive 10 120
The *.ovpn file in /etc/openvpn/easy-rsa/keys looks this way:

Code: Select all

dev tun
client
proto udp
remote myhost.ddns.net 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
comp-lzo
verb 3
I tried to install the OpenVPN on a R-Pi Model B which is behind a "Fritz!Box" (AVM) router using "Jessie". I followed this instruction: https://jankarres.de/2013/05/raspberry- ... tallieren/

As I am not using "Wheezy" on the R-Pi I adapted the code from step 3 of mentioned manual into this:

Code: Select all

sudo cp -r /usr/share/easy-rsa /etc/openvpn/easy-rsa
Unfortunately I don't know how to export the logfile from OpenVPN Connect on my Android device.

Any idea how I can get this solved? What information do you miss to be able to assist me on this?

Kind regards
//neph

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: No connection

Post by Traffic » Mon May 16, 2016 7:12 pm

nephilim75 wrote:all my tries to get connected to my VPN at home are failing
Are your server and client on the same network at home ?

nephilim75
OpenVpn Newbie
Posts: 11
Joined: Mon May 16, 2016 1:29 pm

Re: No connection

Post by nephilim75 » Thu May 19, 2016 11:29 am

Hello

no, I wasn't.

Kind regards
//nephilim

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: No connection

Post by Traffic » Thu May 19, 2016 11:47 am

Does your server log show any connection attempts ?

uburadpl
OpenVpn Newbie
Posts: 1
Joined: Thu May 19, 2016 4:11 pm

Re: No connection

Post by uburadpl » Thu May 19, 2016 4:16 pm

Do you set forwarding for 943 and 443 TCP ports?

nephilim75
OpenVpn Newbie
Posts: 11
Joined: Mon May 16, 2016 1:29 pm

Re: No connection

Post by nephilim75 » Fri May 20, 2016 12:43 pm

@Traffic: No logs on server. This is why I suggest that it is not a server related issue.

@uburadpl: No, just 1194 UDP is currently forwarded. May I ask why these ports are required as well? Anyhow, I will try it soon. Is this port requirement documented somewhere?

Kind regards
//nephilim

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: No connection

Post by Traffic » Fri May 20, 2016 1:25 pm

nephilim75 wrote:No logs on server
Your server log:

Code: Select all

log-append /var/log/openvpn
If your server log does not show any connection attempts then you have setup your network incorrectly.
nephilim75 wrote:I checked my portforwarding on my router and it looks correct. It points to port 1194 (UDP) on my R-Pi (internal hostname: "openvpn").
Point it to the IP address not the hostname ..

If it still does not work, try using --proto tcp (server and client, and add port forward for TCP as well) for testing.

And make sure you allow the packets in your server firewall.

FYI: You do not require port forwarding for port 443 or 943, that is only for AccessServer product.

nephilim75
OpenVpn Newbie
Posts: 11
Joined: Mon May 16, 2016 1:29 pm

Re: No connection

Post by nephilim75 » Fri May 20, 2016 5:45 pm

Hallo
log-append /var/log/openvpn
System replies: "command not found". It doesn't matter if I work as pi or bash.
Point it to the IP address not the hostname ..
Unfortunately no effect.
If it still does not work, try using --proto tcp (server and client, and add port forward for TCP as well) for testing.
Adapted openvpn.conf accordingly and set in app preferences tcp as well. Forwarded port 1194 via TCP in router. No effect.
And make sure you allow the packets in your server firewall.
Not sure where I should allow this. I try to configure OpenVPN an a R-Pi. I am not aware of a server firewall. What do I need to do?

Kind regards
//nephilim

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: No connection

Post by Traffic » Fri May 20, 2016 7:44 pm

In your server config you have:

Code: Select all

log-append /var/log/openvpn
so your log file is /var/log/openvpn
nephilim75 wrote:I am not aware of a server firewall
probably iptables

nephilim75
OpenVpn Newbie
Posts: 11
Joined: Mon May 16, 2016 1:29 pm

Re: No connection

Post by nephilim75 » Sun May 22, 2016 2:05 pm

Hello

this is the log content:

Code: Select all

Sat May 21 07:17:04 2016 OpenVPN 2.3.4 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jan 23 2016
Sat May 21 07:17:04 2016 library versions: OpenSSL 1.0.1k 8 Jan 2015, LZO 2.08
Sat May 21 07:17:04 2016 Diffie-Hellman initialized with 2048 bit key
Sat May 21 07:17:04 2016 Socket Buffers: R=[87380->131072] S=[16384->131072]
Sat May 21 07:17:04 2016 ROUTE: default_gateway=UNDEF
Sat May 21 07:17:04 2016 TUN/TAP device tun0 opened
Sat May 21 07:17:04 2016 TUN/TAP TX queue length set to 100
Sat May 21 07:17:04 2016 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sat May 21 07:17:04 2016 /sbin/ip link set dev tun0 up mtu 1500
Sat May 21 07:17:04 2016 /sbin/ip addr add dev tun0 local 10.8.0.1 peer 10.8.0.2
Sat May 21 07:17:04 2016 /sbin/ip route add 10.8.0.0/24 via 10.8.0.2
Sat May 21 07:17:04 2016 GID set to nogroup
Sat May 21 07:17:04 2016 UID set to nobody
Sat May 21 07:17:04 2016 Listening for incoming TCP connection on [undef]
Sat May 21 07:17:04 2016 TCPv4_SERVER link local (bound): [undef]
Sat May 21 07:17:04 2016 TCPv4_SERVER link remote: [undef]
Sat May 21 07:17:04 2016 MULTI: multi_init called, r=256 v=256
Sat May 21 07:17:04 2016 IFCONFIG POOL: base=10.8.0.4 size=62, ipv6=0
Sat May 21 07:17:04 2016 MULTI: TCP INIT maxclients=1024 maxevents=1028
Sat May 21 07:17:04 2016 Initialization Sequence Completed
probably iptables
The only IPtable related stuff I remember is that I defined a cronjob which includes the follwoing code:

Code: Select all

@reboot sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
Does this help to assist me further?

Kind regards
//nephilim

nephilim75
OpenVpn Newbie
Posts: 11
Joined: Mon May 16, 2016 1:29 pm

(SOLVED) No connection

Post by nephilim75 » Sun May 22, 2016 5:53 pm

I have found the issue. Reason for my trouble was, as suggested, network related. My issues were caused by DynDNS. The updates of my IP didn't work properly due to account issues.

Thank you so much for all the assistance. It was highly appreciated.

Kind regards
//nephilim

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: No connection

Post by Traffic » Sun May 22, 2016 5:55 pm

Thanks for letting us know the solution 8-)

Locked