SOLVED: OpenVPN Briding failed

ampned
Posts: 4
Joined: Wed Jul 12, 2017 12:08 am

SOLVED: OpenVPN Briding failed

Postby ampned » Tue Aug 15, 2017 2:53 pm

Hi all,

Tried to setup VPN bridging as my TV provider blocks some streaming services while I'm not 'at home' :D .
Ran into an error after following the steps as provided in the wiki, which ended by attempting to restart the open-vpn service.
note: the guide suggested I stop the VPN before starting, but couldn't find the method to do this? Is it related to this error?
[root@hda system]# service openvpn\@amahi.service restart
Redirecting to /bin/systemctl restart openvpn@amahi.service.service
Job for openvpn@amahi.service failed because the control process exited with error code.
See "systemctl status openvpn@amahi.service" and "journalctl -xe" for details.
[root@hda system]# systemctl status openvpn@amahi.service
openvpn@amahi.service - OpenVPN Robust And Highly Flexible Tunneling Application On amahi
Loaded: loaded (/usr/lib/systemd/system/openvpn@.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-08-15 17:37:49 EDT; 5s ago
Process: 24348 ExecStart=/usr/sbin/openvpn --cd /etc/openvpn/ --config %i.conf --writepid /run/openvpn/amahi.pid (code=exited, status=1/FAILURE)
Process: 24345 ExecStartPre=/usr/bin/chmod -R 755 /run/openvpn/ (code=exited, status=0/SUCCESS)
Process: 24342 ExecStartPre=/usr/bin/mkdir -p /run/openvpn/ (code=exited, status=0/SUCCESS)
Main PID: 24348 (code=exited, status=1/FAILURE)

Aug 15 17:37:49 hda.hidde.nl systemd[1]: Starting OpenVPN Robust And Highly Flexible Tunneling Application On amahi...
Aug 15 17:37:49 hda.hidde.nl openvpn[24348]: Options error: Unrecognized option or missing or extra parameter(s) in amahi.conf:4: <U+200B>mode (2.4.3)
Aug 15 17:37:49 hda.hidde.nl openvpn[24348]: Use --help for more information.
Aug 15 17:37:49 hda.hidde.nl systemd[1]: openvpn@amahi.service: Main process exited, code=exited, status=1/FAILURE
Aug 15 17:37:49 hda.hidde.nl systemd[1]: Failed to start OpenVPN Robust And Highly Flexible Tunneling Application On amahi.
Aug 15 17:37:49 hda.hidde.nl systemd[1]: openvpn@amahi.service: Unit entered failed state.
Aug 15 17:37:49 hda.hidde.nl systemd[1]: openvpn@amahi.service: Failed with result 'exit-code'.
So it refers to amahi.conf line 4, 'mode server', see below for the config file:
port 1194
proto udp
;dev tap
​mode server tls-server dev tap0​
ca /etc/openvpn/amahi/ca.crt
cert /etc/openvpn/amahi/Amahi-Server-OpenVPN.crt
# This file should be kept secret
key /etc/openvpn/amahi/Amahi-Server-OpenVPN.key
dh /etc/openvpn/amahi/dh.pem
# server 10.8.0.0 255.255.255.0
# ifconfig-pool-persist /var/run/openvpn-ipp.cache
push "route 192.168.0.0 255.255.255.0"
push "dhcp-option DNS 192.168.0.10"
push "dhcp-option DOMAIN hidde.nl"
keepalive 10 220
comp-lzo
persist-key
persist-tun
status /var/log/openvpn-status.log
verb 3
;mute 20
plugin /usr/lib64/openvpn/plugins/openvpn-plugin-auth-pam.so "login login USERNAME password PASSWORD"
script-security 2
up ./amahi.up
down ./amahi.down
Anyone has an idea what's going wrong? Would like to have it all working.

Thanks

User avatar
bigfoot65
Project Manager
Posts: 11064
Joined: Mon May 25, 2009 4:31 pm

Re: OpenVPN Briding failed

Postby bigfoot65 » Tue Aug 15, 2017 4:30 pm

note: the guide suggested I stop the VPN before starting, but couldn't find the method to do this?
You can start, stop, and restart the service via the Servers area in the Settings tab of the dashboard. You have to disable watchdog or it will restart automatically.

For command line, try:

Code: Select all

sudo systemctl restart openvpn
See if that solves the issue. The tutorial was contributed by a user, so it may not be accurate for newer #Amahi versions.
ßîgƒσστ65
Applications Manager

ampned
Posts: 4
Joined: Wed Jul 12, 2017 12:08 am

Re: OpenVPN Briding failed

Postby ampned » Wed Aug 16, 2017 1:09 am

Ok thanks, will try that when I get home from work.
Wrt stopping the watchdog; is that arranged when stopping the VPN through the dashboard? Or is there another procedure on this?

If I get this bridge working I'll update the wiki (if possible).

ampned
Posts: 4
Joined: Wed Jul 12, 2017 12:08 am

Re: OpenVPN Briding failed

Postby ampned » Wed Aug 16, 2017 10:07 am

Allright, an update from my side:
The VPN works now after first stopping the service before the procedure, and restarting it after the procedure. Thanks Bigfoot65 for the tip.

Another note has to be made however; iOS does not support tap vpn, which is used for setting up the VPN bridge.
So I reverted back to tun.. Too bad :cry: So the guide to OpenVPN Bridging does not apply if you use an iOS device to connect!

Reference: https://docs.openvpn.net/docs/openvpn-c ... s-faq.html
Q: Why doesn't the app support tap-style tunnels?

A: The iOS VPN API supports only tun-style tunnels at the moment. This is a limitation of the iOS platform. If you try to connect a profile that uses a tap-based tunnel, you will get an error that only layer 3 tunnels are currently supported.

User avatar
bigfoot65
Project Manager
Posts: 11064
Joined: Mon May 25, 2009 4:31 pm

Re: OpenVPN Briding failed

Postby bigfoot65 » Wed Aug 16, 2017 1:14 pm

Happy to assist.

Sorry to hear it won't work with iOS.

Marking this thread as solved.
ßîgƒσστ65
Applications Manager

Who is online

Users browsing this forum: No registered users and 2 guests