PPP over WLAN in Ubuntu

It’s not that easy to get PPP over WLAN running in Ubuntu.

Network Manager lacks the option to choose a connection, but instead always tries to connect through ethernet. This works fine when you are actually plugged to a wall, but sometimes you connect to a LAN over WLAN and then need to establish a PPP connection to the internet.

This is a known bug for some time:

https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/23…

There exists a tool called pppoeconf (sudo apt-get install pppoeconf) that sets PPPoW connections quite easily, but somehow always conflicts with NM and causes it to stop working properly. If this happended to you as well, here’s a way to fix NM:

http://ubuntuguide.net/fix-dsl-pppoe-connection-problem-with-network-man…

For now, my method of establishing such a connection is using pppoeconf to create the the connection, then fixing NM and using gpppon (sudo apt-get install gpppon) to connect after I’m on WLAN. Maybe there is a better way to do this, because gpppon uses pon and poff scripts which in term look for connections in /etc/ppp/peers so it’s probably enough to add a conf file somewhere in there – without using pppoeconf.

Hopefully there will be a nicer way to do this sometime in the future…

Published by

metakermit

Building apps, analysing data at Punk Rock Dev and sharing weird & cool photographs, drawings, music, films, games... More about me here. You can get new blog posts via RSS or follow @metakermit on Twitter where I also announce new stuff.

2 thoughts on “PPP over WLAN in Ubuntu”

  1. As of 2014 there still seems to be no nice way of doing this.

    My workaround is an nm-dispatcher script that calls pon/poff after connecting to wifi/cat5
    I have two ppp conf files (wlan0, eth0)

    script looks something like this (/etc/NetworkManager/dispatcher.d):
    #!/bin/bash
    IF=$1
    STATUS=$2

    test_network ()
    {
    IS_VCG_NETWORK=true

    if ! ifconfig | grep “addr:10.23.[0-9]\{1,3\}.[0-9]\{1,3\}” > /dev/null
    then
    debug ” no 10.23.x.x address -> no vcg”
    IS_VCG_NETWORK=false
    return
    fi
    }

    test_network
    if [ $STATUS = up ]
    then
    if [ “$IS_VCG_NETWORK” = “false” ]
    then
    exit
    fi

    if ! pidof pppd >/dev/null
    then
    pon vcg_${IF}
    fi
    fi

    if [ “$STATUS” = “down” ]
    then

    if [ “$IS_VCG_NETWORK” = “true” ]
    then
    exit
    fi

    poff -a
    fi

  2. Yeah, it’s not a very nice network situation. Even more so on smartphones – I could find no way to make it work on Android phones without rooting them. In the end I figured out that some ISPs leave an option to select a normal PPP-less connection, so maybe it’s worth contacting them.

Leave a Reply

Your email address will not be published. Required fields are marked *