OpenBSD Journal

ADSL logins

Contributed by jose on from the broadband-control dept.

Per-Olov Sjöholm writes: "I have seen a bunch of tips for users using OpenBSD and PF as a firewall with NAT for ADSL connections, but not any info for the ones where the ADSL logins takes place in the client PC instead of the ADSL modem.

So... I wanted to submit a tips to the people that uses ADSL connections were the login takes place in the client PC insted of the ADSL modem. I have set up a bunch of OpenBSD firewalls will the fantastic PF firewall to friends and smaller companies.

A lot of them have what I describe above. As most people know, there are some programs out there to take care of this annoying issue. But I have not yet seen a program that can run directly on OpenBSD. So I was thinking of writing my own when I found the http://www.lfdomain.com site. This software runs on windows, Linux and FreeBSD, but will run perfect on OpenBSD with the FreeBSD compatibility libs.

To let the OpenBSD firewall take care of the ADSL login do as follows...

  1. Download and install the FreeBSD "LF Connection Keeper" from http://www.lfdomain.com. It is only a binary and a config file.
  2. Install the freebsd_lib-4.0 libraries package from the ports tree.
  3. Here is a possible way to make this daemon start during boot. Add this to /etc/rc.conf.local
    ----
    lfdom=YES               # Tiscali login
    ----
    
    Add this to /etc/rc.local
    ----
    if [ X"${lfdom}" == X"YES" -a -x /usr/local/bin/lfck 
        -a -e /etc/lfck.conf ]; then
           echo -n ' lfdom';       /usr/local/bin/lfck start &
    fi
    ----

This is very cool, thanks Per-Olav.

(Comments are closed)


Comments
  1. By A Non Moose Cow Herd () on

    When I read this article I remembered visiting a site some time ago which had a few useful scripts on this topic.
    Of course they all required some tweaking and tuning (one way or the other) to work with my connection and my ISP.
    But I managed to get a little bit of this and some more of that to finally do the trick for me.
    The link to the webpage where I found some examples of how other people had solved the problem was, and still is: http://curl.haxx.se/curlprograms.html


    Hopefully this will give some more input on how to solve things for oneself when having to do a "manual" login at your computer before accessing the Net.


    I'm sorry if this post looks like something the cat got hold of. At least I tried to format it nicely...

    Happy scripting

    //A learing by doing type of person

  2. By bards () bards1888@yahoo.com.au on mailto:bards1888@yahoo.com.au

    Am I missing something, doesn't pppoe log the user in from the PC ? I know there are some modems that have a built in PPPOE/A client but those can generally be turned off by running in bridged mode.

    Mind you it is 6:30am and I've been up half the night doing on-call work. ZZZzzzz.

    Cheers.

    Comments
    1. By Anonymous Coward () on

      well it depends on the modem, I've given up trying to bridge my DSL-504, the crappy web-if doesn't have such new-fangled thingies and the command-line dates back to the mid-70's or so

      while we're on the subject, anyone ever got a pci adsl modem running or heard of one with at least a BSD driver? I haven't checked for some time...

      (yes I do know winmodems are resource-wasteful, but on edge routers that are 90% inactive, it doesn't really matter...)

  3. By Matthew () on


    I use pppoa (accessrunner) with a USB modem and don't need anything else: I don't see the point of introducing a new tool like this when it can be done with existing tools.

    My approach: ADSL service defined in /etc/ppp/ppp.conf; configure /etc/hostname.tun0 to call ppp -ddial -quiet isp; this starts ppp on boot and keeps the connection up (a couple of service outages and kernel panics have been weathered).

    If you need to use custom login scripts, then you can define them in ppp, and of course ppp has redial as well.

    Am I missing something ?

    Comments
    1. By Stefan () stefanjo@telia.com on mailto:stefanjo@telia.com

      Well some ISP's atleast here in Sweden uses a web based login instead of ppp or pppoe. Another usefull tool for some of them like Telia ADSL, COMHEM and Tiscali is qADSL (http://savannah.nongnu.org/projects/qadsl/).

    2. By Anonymous Coward () on

      This might be a dumb question but how do you add it to /etc/hostname.tun0, to call up ppp?

      I've always started it through /etc/rc.local with -ddial.

      TIA.

  4. By moo () on

    qadsl is very nice as well, iirc its even in ports

    Comments
    1. By Anonymous Coward () on

      For what QADSL or LF is worth, but the tools are already in base install. I'm quite sure that it's possible to do something similar with other swedish ISP's that uses a similar system. The following will attempt to login on the Telia network. Put it in a crontab if you wish to stay connected.

      #!/bin/ksh
      USER="u1234567"
      PASSWD="pAsWoRd"
      lynx -dump "http://10.0.0.6/sd/init" >/dev/null 2>&1
      lynx -dump "http://10.0.0.6/sd/login?username=${USER}&password=${PASSWD}" >/dev/null 2>&1

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]