openvpn problems in raspbmc

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
loke99 Offline
Junior Member
Posts: 4
Joined: Jan 2012
Reputation: 0
Post: #1
I have a Raspberry Pi with raspbmc running XBMC 12.2 Git:20131204-5a51fa8

I want to run XBMC through openvpn. However, after enabling openvpn I don't get any network access anymore through XBMC. This because the network configuration isn't updated. When I do the same thing in Mac OS X I see after a few seconds that the network settings inside XBMC are updated. But this does not happen on the raspberry pi.

It seems to me that the connection is ok, I checked with ping and I get connections both with and without openvpn running (a bit slower with the vpn).

It is not an option for me to turn off DHCP. So the question is How do I get XBMC (or raspbmc) to refresh its network settings?

Any help is greatly appreciated

[Edited: Added information about raspbmc below]
Ram: 374mb?
Installation media: SD
Connection: WiFI
Power Supply Type: TV USB port
Power specs: 5V, 1A
Peripherals: none
Storage Device (incl. Network Sharing Protocol): SD
RaspBMC version: raspbmc-rls-1.0-hardfp-b20130208-u20131101
XBMC version: 01:39:44 T:3040198656 NOTICE: Starting XBMC (12.2 Git:20131204-5a51fa8), Platform: Linux (Debian GNU/Linux 7.0 (wheezy), 3.10.24 armv6l). Built on Dec 28 2013
Codecs: ?
Audio/Video Output: HDMI
Overclocked: No
Config.txt Extras: None
XBMC debug log pastebin link:
/var/log/syslog pastebin link:
(This post was last modified: 2014-01-06 09:03 by loke99.)
find quote
robby1337 Offline
Junior Member
Posts: 43
Joined: Mar 2013
Reputation: 1
Post: #2
can you provide some more infos, eg. your client.opvn and your xbmc.log from the connecting sequence? Smile
(This post was last modified: 2014-01-04 03:04 by robby1337.)
find quote
loke99 Offline
Junior Member
Posts: 4
Joined: Jan 2012
Reputation: 0
Post: #3
In the meantime I found that pptp (using pon) is supported by raspbmc, but openvpn isn't(?). I followed the instructions in this thread: In the meantime I found that pptp (using pon) is supported by raspbmc, but openvpn isn't. I followed the instructions in this thread: http://forum.stmlabs.com/printthread.php...754&page=7
which I repeat here (with a few modifications):

Quote:This is the way i configured pptp to work ssh on the raspberry
Install pptp:
Code:
sudo apt-get install pptp-linux
Create a file in /etc/ppp/peers with arbitrary name and edit it
Code:
sudo su
cd /etc/ppp/peers
nano $FILENAME
where $FILENAME is the name of your file (e.g vpn.txt). Then add the following to the file
Code:
pty "pptp $VPNHOSTNAME --nolaunchpppd --debug"
name $USERNAME
password $PASSWORD
remotename PPTP
require-mppe-128
require-mschap-v2
refuse-eap
refuse-pap
refuse-chap
refuse-mschap
noauth
debug
persist
maxfail 0
defaultroute
replacedefaultroute
usepeerdns

Where $VPNHOSTNAME is your VPN host name, $PASSWORD is your VPN password and $USERNAME is your VPN username.

then all you have to do is type
sudo pon $FILENAME where $FILENAME is the name of the file you saved earlier. to start
and
poff $FILENAME to stop

To use from within XBMC, follow the original post in the same thread: http://forum.stmlabs.com/printthread.php...754&page=1 steps 4-5 with some minor modifications:

Quote:4. Now we need to write a couple of simple scripts to run all this stuff. I don't want want to type all this stuff every time I want to pull a VPN and I'm guessing you don't either!
A. Type: nano $VPN_NAME (Whatever you want to call the script, mine is: LondonVPN)

B. Add these values to the file:
#!/bin/bash
sudo pon $FILENAME

C.Save the file (Ctrl O) and hit return, exit with (Ctrl X)

D.Type: nano DisconnectVPN

E. Add these values to the file:
#!/bin/bash
sudo poff $FILENAME

F.Save the file (Ctrl O) and hit return, exit with (Ctrl X)

G.Change the permissions for each script so any user can execute them:
1). chmod 755 $VPN_NAME
2). chmod 755 DisconnectVPN

H. Test the scripts:
1). ./$VPN_NAME (press the return key and after about 20 seconds your VPN should be connected)
2). ./DisconnectVPN (press the return key and your VPN should disconnect)

5.Now we need to be able run these scripts from within XBMC! I don't want to SSH to the RPi every time I need a VPN.
A. From within XBMC: Programs-->Get more-->Advanced Launcher
B. Once installed select "Standalone"
C. Select your RPi drive: Probably labeled[/color] "Pi"
D. I created my scripts in my home directory so the two scripts I created are present when I select the "pi" folder.
E. Select the $VPN_NAME and click okay.
F. Enter "./" and press done. (NOTE: I need to verify this needs to be done, it may not be required)
G. Enter Whatever name you want to call this "LondonVPN".
H. select fanart and all other values are not needed, just select the pi folder and move on.
I. From the Advanced Launcher menu select the launcher you just created and right click it. Slect "Add to favourites"
J. Repeat the process for the DisconnectVPN script.
K. Escape out to the main XBMC screen and on the lower left select the star. It brings up your favorites. Select your VPN!
L. To disconnect so you can use local programming or watch files on your local network, bring up favorites again and select DisconnectVPN.

works like a charm so far.
find quote