OpenWrt Forum Archive

Topic: OpenWrt Model DIR-645 Chaos Calmer 15.05.1 cyberghost vpn help needed

The content of this topic has been archived on 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hostname OpenWrt
Model D-Link DIR-645
Firmware Version OpenWrt Chaos Calmer 15.05.1 / LuCI 15.05-149-g0d8bbd2 Release (git-15.363.78009-956be55) 
ive got open vpn on it
but cant seem to find a guide for setting it up for cyberghost vpn
i want all devices conected to the router to use the vpn done lots of reading and just gets more confusing
am hoping someone can help me please
thx

sorry wasnt sure where to post
followed your guide changing parts for cyberghost  ovpn file etc
now getting Options error: Unrecognized option or missing parameter(s) in /etc/openvpn/openvpn.ovpn:18: explicit-exit-notify (2.3.6)
but their is no explicit-exit-notify in openvpn.ovpn
driving me nuts started fresh 3 times now same result even tried changing to openvpn.conf same result also redownloaded zip from cyberghost 3 times
did some googling not much info just advise to remove explicit-exit-notify
but isnt in etc/config/openvpn or etc/openvpn/openvpn.ovpn

ok tried again and here is what ive done and the log at end driving me crazy

opkg update
opkg install openvpn-openssl

opkg install install luci-app-openvpn
/etc/init.d/openvpn enable

ca.crt client.crt client.key openvpn.ovpn copied to /etc/openvpn

uci set openvpn.cyberghost=openvpn
uci set openvpn.cyberghost.enabled='1'
uci set openvpn.cyberghost.config='/etc/openvpn/openvpn.ovpn'
uci commit openvpn

uci set network.cyberghosttun=interface
uci set network.cyberghosttun.proto='none'
uci set network.cyberghosttun.ifname='tun0'
uci commit network

uci add firewall zone
uci set firewall.@zone[-1].name='cyberghost'
uci set firewall.@zone[-1].input='REJECT'
uci set firewall.@zone[-1].output='ACCEPT'
uci set firewall.@zone[-1].forward='REJECT'
uci set firewall.@zone[-1].masq='1'
uci set firewall.@zone[-1].mtu_fix='1'
uci add_list firewall.@zone[-1].network='cyberghosttun'
uci add firewall forwarding
uci set firewall.@forwarding[-1].src='lan'
uci set firewall.@forwarding[-1].dest='cyberghost'
uci commit firewall

uci set network.wan.peerdns='0'
uci del network.wan.dns
uci add_list network.wan.dns='208.67.222.222'
uci add_list network.wan.dns='208.67.220.220'
uci commit

here is the log

Sat Mar 18 13:14:50 2017 daemon.err openvpn(cyberghost)[3301]: Options error: Unrecognized option or missing parameter(s) in /etc/openvpn/openvpn.ovpn:18: explicit-exit-notify (2.3.6)
Sat Mar 18 13:14:50 2017 daemon.warn openvpn(cyberghost)[3301]: Use --help for more information.
Sat Mar 18 13:14:55 2017 daemon.err openvpn(cyberghost)[3381]: Options error: Unrecognized option or missing parameter(s) in /etc/openvpn/openvpn.ovpn:18: explicit-exit-notify (2.3.6)
Sat Mar 18 13:14:55 2017 daemon.warn openvpn(cyberghost)[3381]: Use --help for more information.
Sat Mar 18 13:15:01 2017 daemon.err openvpn(cyberghost)[3383]: Options error: Unrecognized option or missing parameter(s) in /etc/openvpn/openvpn.ovpn:18: explicit-exit-notify (2.3.6)
Sat Mar 18 13:15:01 2017 daemon.warn openvpn(cyberghost)[3383]: Use --help for more information.
Sat Mar 18 13:15:06 2017 daemon.err openvpn(cyberghost)[3385]: Options error: Unrecognized option or missing parameter(s) in /etc/openvpn/openvpn.ovpn:18: explicit-exit-notify (2.3.6)
Sat Mar 18 13:15:06 2017 daemon.warn openvpn(cyberghost)[3385]: Use --help for more information.
Sat Mar 18 13:15:11 2017 daemon.err openvpn(cyberghost)[3386]: Options error: Unrecognized option or missing parameter(s) in /etc/openvpn/openvpn.ovpn:18: explicit-exit-notify (2.3.6)
Sat Mar 18 13:15:11 2017 daemon.warn openvpn(cyberghost)[3386]: Use --help for more information.
Sat Mar 18 13:15:16 2017 daemon.err openvpn(cyberghost)[3389]: Options error: Unrecognized option or missing parameter(s) in /etc/openvpn/openvpn.ovpn:18: explicit-exit-notify (2.3.6)
Sat Mar 18 13:15:16 2017 daemon.warn openvpn(cyberghost)[3389]: Use --help for more information.
Sat Mar 18 13:15:16 2017 daemon.info procd: Instance openvpn::instance1 s in a crash loop 6 crashes, 0 seconds since last crash
Sat Mar 18 13:20:17 2017 daemon.err openvpn(cyberghost)[3509]: Options error: Unrecognized option or missing parameter(s) in /etc/openvpn/openvpn.ovpn:18: explicit-exit-notify (2.3.6)
Sat Mar 18 13:20:17 2017 daemon.warn openvpn(cyberghost)[3509]: Use --help for more information.

Bring content of your OpenVPN configuration file /etc/openvpn/openvpn.ovpn, there should be option explicit-exit-notify. Remove private data like login, password, crt, key files, of course.

(Last edited by ulmwind on 18 Mar 2017, 14:47)

client
remote 1-gb.cg-dialup.net 443
dev tun
proto udp
auth-user-pass
resolv-retry infinite
redirect-gateway def1
persist-key
persist-tun
nobind
cipher AES-256-CBC
auth MD5
ping 5
ping-exit 60
ping-timer-rem
script-security 2
remote-cert-tls server
route-delay 5
tun-mtu 1500
fragment 1300
mssfix 1300
verb 4
comp-lzo


ca ca.crt

cert client.crt

key client.key

started fresh and got
Sat Mar 18 15:18:28 2017 daemon.notice openvpn(cyberghost)[5477]: OpenVPN 2.3.6 mipsel-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Jan 31 2016
Sat Mar 18 15:18:28 2017 daemon.notice openvpn(cyberghost)[5477]: library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08
Sat Mar 18 15:18:28 2017 daemon.err openvpn(cyberghost)[5477]: ERROR: could not read Auth username from stdin
Sat Mar 18 15:18:28 2017 daemon.notice openvpn(cyberghost)[5477]: Exiting due to fatal error
client
remote 1-gb.cg-dialup.net 443
dev tun
proto udp
auth-user-pass


resolv-retry infinite
redirect-gateway def1
persist-key
persist-tun
nobind
cipher AES-256-CBC
auth MD5
ping 5
ping-exit 60
ping-timer-rem
explicit-exit-notify 2
script-security 2
remote-cert-tls server
route-delay 5
tun-mtu 1500
fragment 1300
mssfix 1300
verb 4
comp-lzo


ca ca.crt

cert client.crt

key client.key

Add name of file  with your credentials to auth-user-pass, first line - login, second - password, like:

auth-user-pass /etc/openvpn/secret

Run openvpn in console manually, and see log:

openvpn /etc/openvpn/openvpn.ovpn

Comment following option:

#explicit-exit-notify 2

and run again.

(Last edited by ulmwind on 18 Mar 2017, 17:13)

Options error: remote: port number associated with host auth-user-pass is out of range
root@OpenWrt:~# explicit-exit-notify 2
-ash: explicit-exit-notify: not found

client
remote auth-user-pass /etc/openvpn/userpass.txt 1-gb.cg-dialup.net 443
dev tun
proto udp
auth-user-pass


resolv-retry infinite
redirect-gateway def1
persist-key
persist-tun
nobind
cipher AES-256-CBC
auth MD5
ping 5
ping-exit 60
ping-timer-rem
explicit-exit-notify 2
script-security 2
remote-cert-tls server
route-delay 5
tun-mtu 1500
fragment 1300
mssfix 1300
verb 4
comp-lzo


ca ca.crt

cert client.crt

key client.key

You've understood my instructions incorrectly.
Use following config:

client
remote 1-gb.cg-dialup.net 443
dev tun
proto udp
auth-user-pass  /etc/openvpn/userpass.txt

resolv-retry infinite
redirect-gateway def1
persist-key
persist-tun
nobind
cipher AES-256-CBC
auth MD5
ping 5
ping-exit 60
ping-timer-rem
#explicit-exit-notify 2
script-security 2
remote-cert-tls server
route-delay 5
tun-mtu 1500
fragment 1300
mssfix 1300
verb 4
comp-lzo

ca ca.crt

cert client.crt

key client.key

Run openvpn in console manually, and see log:

openvpn /etc/openvpn/openvpn.ovpn

The discussion might have continued from here.