Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Called-Station-Id - why IP instead of MAC?

    Scheduled Pinned Locked Moved Captive Portal
    1 Posts 1 Posters 3.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      grantemsley
      last edited by

      I'm trying to move from m0n0wall to pfsense for several hotspot installations.  I'm using radius authentication, and pfSense 2.0 beta (from a couple days ago).

      m0n0wall by default sends the WAN mac address as Called-Station-Id, and the client's MAC address as Calling-Station-Id.  This works great, because I can filter our reports by that, and the mac address of the router never (unless hardware dies) changes.

      pfSense on the other hand sends the WAN IP address.  Which can change frequently (I have little control over the internet connection these are connected to.  It's not always a static IP.)

      Is there a reason this change was made?  I also notice if using PPPoE, the WAN interface shows all 0's for the mac address.  m0n0wall uses the mac address of the physical interface.

      My solution has been to hack in another option for "Type".  I had to use the wireless card's MAC address since I can't get the WAN one easily, but it works.  Any chance of making this an option in the normal builds?

      In /usr/local/captiveportalk/radius_authentication.inc:

          switch($radiusvendor) {
      
              case 'cisco':
                      $calledstationid = $clientmac;
                      $callingstationid = $clientip;
                      break;
      +        case 'custom':
      +                $calledstationid = mac_format(get_interface_mac(get_real_interface("ath0")));
      +                $callingstationid = $clientmac;
      +                break;
      
      

      Two similar changes to radius_accounting.inc

      In /usr/local/www/services_captiveportal.php:

      
      - $radiusvendors = array("cisco");
      + $radiusvendors = array("cisco","custom");
      
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.