OSMC PPTP Client Configuration

Hello OSMC Community!

I’m trying to setup VPN on on my RaspberryPi 1B with latest OSMC build following this tutorial: http://blog.andrewpike.co.uk/osmc-pptp-client-configuration/

I think all is fine until I try to route all traffic through VPN - I cannot ping google.com or it’s IP address ( and basically the VPN does not work.

Here’s my routing table before starting the tunnel:

osmc@osmc:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 eth0 UGH   0      0        0 eth0 UGH   0      0        0 eth0   U     0      0        0 eth0 UH    0      0        0 eth0

and after starting the tunnel and executing: sudo route add default dev ppp0 it looks like this:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         U     0      0        0 ppp0         UG    0      0        0 eth0 UGH   0      0        0 eth0 UGH   0      0        0 eth0 UH    0      0        0 ppp0   U     0      0        0 eth0 UH    0      0        0 eth0

here’s ifconfig output after starting the tunnel and routing all traffic through vpn:

osmc@osmc:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:e9:a2:03
  inet addr:  Bcast:  Mask:
  inet6 addr: fe80::ba27:ebff:fee9:a203/64 Scope:Link
  RX packets:3596 errors:0 dropped:0 overruns:0 frame:0
  TX packets:2583 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:545897 (533.1 KiB)  TX bytes:374666 (365.8 KiB)

lo        Link encap:Local Loopback
  inet addr:  Mask:
  inet6 addr: ::1/128 Scope:Host
  UP LOOPBACK RUNNING  MTU:65536  Metric:1
  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:0
  RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ppp0      Link encap:Point-to-Point Protocol
  inet addr:  P-t-P:  Mask:
  RX packets:6 errors:0 dropped:0 overruns:0 frame:0
  TX packets:126904 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:3
  RX bytes:60 (60.0 B)  TX bytes:58293431 (55.5 MiB)

I never had any problems with setting this up on Raspbmc. It’s my 3rd attempt to get it working on OSMC and still no luck. I’ll appreciate any help!

You need to enable ip_forward like this:

/bin/echo 1 > /proc/sys/net/ipv4/ip_forward

or in
nano -w /etc/sysctl.conf

Uncomment the next line to enable packet forwarding for IPv4


Thanks - I edited /etc/sysctl.conf and enabled the changes with sysctl -p /etc/sysctl.conf. Then I restarted the device to be extra sure the changes are applied.

Unfortunately, it didn’t solve the problem.
Any suggestion where to dig in?

I’m wondering how ConnMan works with PPTP client - could this be a possible source of the problem?

The issue I have is definitely related to ConnMan. Here is what I did to prove it and get the PPTP client to work:

I disabled Connection Manager with:
systemctl disable connman.service

and installed Network Manager with:
sudo apt-get install network-manager

then I edited /etc/network/interfaces - added my network config:

iface eth0 inet static

after these changes my PPTP client started working correctly.

Now my question to developers (@sam_nazarko and @DBMandrake) is: will this setup work long term, or will I have any problems?

I’d really love to see the PPTP client work with ConnMan, but I’m rather a beginner in linux world, so if someone can guide me, I can continue troubleshooting the connman and my pptp setup.

This will cause unexpected behaviour and we can’t recommend this. It would be much better to work out what the issue is with ConnMan and resolve that.


Totally agree! - where can I officially report this issue, so it can be tracked and doesn’t get lost?

btw - it seems that connman is causing various issues for other users trying to establish VPN connection (ex. this thread on OpenVPN)

HI again,

To be sure that the changes are used try this command, and if it say’s “1” then its used…:

cat /proc/sys/net/ipv4/ip_forward

this command is not helping you :wink: , pptp does this on it’s own.
“sudo route add default dev ppp0”
there should be no need.

i think your problem is that you have set this up like it was on the internet and having/using the same IP as the server(that need iptabels for forwarding), you should give it it’s now range for pptp.

here is my pptp.conf:


all in all i don’t think this is a problem with either OSMC or connman.

if you want more help please add your pptp.conf file and pptpd-options file.


Thanks for your help - however, I don’t have these files you ask for in /etc/ppp - these are the files I have:
chap-secrets ip-down.d ip-up.d ipv6-down.d ipv6-up.d options.pptp peers ip-down ip-up ipv6-down ipv6-up options pap-secrets

Please note, that I don’t have my own VPN server - I’m just trying to connect to remote service (hideipvpn.com)

ohh okay my bad @sew did not see it was a client problem…

i will see if i can connect myself from OSMC to pptp, and get back to you…


I think the issue is that ConnMan keeps modifying the routing table. After establishing the VPN connection and executing the following command (to route all traffic through VPN): sudo route add default dev ppp0 I end up with two default routes, right?:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         U     0      0        0 ppp0         UG    0      0        0 eth0

ConnMan’s wispr will regularly modify the routing table.


Did this ever get a solution?

I just got SSTP-client installed yesterday (for having never used linux before that was quiet a project).
It seems to get a local ip on my home network and I can see on my windows server that it’s connected. However I have the same problem as above, can’t access anything on the network, can’t ping either outside the network or other devices on the network. So I take it it’s the routing probelm mentioned above but it seems the thread just died out.

Is there a solution for this?

Configure PPTP via ConnMan, and you won’t have any routing problems.

Well I’m only interested in SSTP and not PPTP therefore the usage of the SSTP-client.

My windows server with the VPN server side only runs with SSTP for the security reaons, and I like that it uses the 443 port which will be accessible from most places.

So I’m still very much interested in a workaround… :slight_smile:

When using the SSTP-client, if I go into systeminfo within Kodi and then network I see the correct ip-adress (VPN), correct subnet, but the gateway is completely empty. I take it this is the problem but I don’t know how to fix so the gateway is to my home router?

(What frustrates me is the fact that I only need the VPN so I can stream live-tv from my vu+/enigma2 box over secure https. The VU+ PVR add on has this option to enable https but it doesn’t work. I wrote a post here on this: http://forums.openpli.org/topic/41968-openwebif-kodi-vupvr-addon-fails-https/ )