I have a Model B Pi 1 running Raspbmc (Kodi 14.1). I want to install & configure OpenVPN to connect to my NAS remotely (from a different physical location). Ive read a few posts on other sites about installing OpenVPN on Kodi (such as OpenVPN for Kodi), so that shouldn’t be an issue.
Is there a way to configure Raspbmc to connect to my VPN on each boot? I am planning on saving my username/password to a file and referring to this in the OVPN config file, so it shouldnt need any manual interaction.
This is so that I can connect to the MySQL database & media sources serving my media content.
I am a relative newb on Linux, but am willing to learn. I am running OSMC on my Pi2, but am sticking to Raspbmc on my Pi 1’s until we get to RC on OSMC.
you will need to put your config into /etc/openvpn and give it a specific name e.g. vpn.conf. OSMC is using systemctl to control the started services. So “systemctl start openvpn@vpn.service” should start your connection while “systemctl enable openvpn@vpn.service” would configure it as a boot time service. Before using systemctl you may want to use “openvpn --config /etc/openvpn/vpn.conf” to test your setup.
Hi, (Alpha4 on pi 1 B)
I logged in through SSH and ran:
sudo bash
apt-get install openvpn
but get Unable to locate package openvpn. Any suggestions as to what is needed to access openvpn repo ?.
P.S. This worked on raspbmc latest version (XBian_2015.02.28_rpi.img) and I was able to install Datho VPN. Also openvpn did not ask for credentials, instead the Datho add-on has a gui settings page where you can enter the server address and your password.
Thanks for your quick reply Frank, Ive got an error:
Tue Mar 10 18:18:06 2015 IMPORTANT: OpenVPN’s default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
Tue Mar 10 18:18:06 2015 WARNING: No server certificate verification method has been enabled. See How To Guide: Set Up & Configure OpenVPN Client/server VPN | OpenVPN for more info.
Tue Mar 10 18:18:06 2015 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Tue Mar 10 18:18:06 2015 LZO compression initialized
Tue Mar 10 18:18:06 2015 UDPv4 link local (bound): [undef]
Tue Mar 10 18:18:06 2015 UDPv4 link remote: [AF_INET]xx.xx.xxx.xxx:1194
Tue Mar 10 18:18:06 2015 WARNING: this configuration may cache passwords in memory – use the auth-nocache option to prevent this
Tue Mar 10 18:18:07 2015 [synology.com] Peer Connection Initiated with [AF_INET]xx.xx.xxx.xxx:1194
Tue Mar 10 18:18:09 2015 Note: Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)
Tue Mar 10 18:18:09 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Tue Mar 10 18:18:09 2015 /sbin/ifconfig 10.8.0.6 pointopoint 10.8.0.5 mtu 1500
SIOCSIFADDR: Operation not permitted
: ERROR while getting interface flags: No such device
SIOCSIFDSTADDR: Operation not permitted
: ERROR while getting interface flags: No such device
SIOCSIFMTU: Operation not permitted
Tue Mar 10 18:18:09 2015 Linux ifconfig failed: external program exited with error status: 1
Tue Mar 10 18:18:09 2015 Exiting
So you mean you have 404 errors when doing a sudo apt-get update? That should not be a problem and just might be that one of the central raspbian servers are not reachable. But if you were able to do a sudo apt-get install openvpn you should be fine and the 404 error should not be an issue for successful openvpn operation.