Hi,
1. install ppp-2.4.3
2. I am attaching my radius.c where the radius client from pppd is sending
the MAC address of connecting host. This is my patch and it works fine for
me. I do NOT take any responsibility for the use of this changed file. The
radius.c file has to be places into ppp-2.4.3/pppd/plugins/radius/
directory. When you open the file you will see a part like
/* do you want to send MAC address or IP address in the attribute
* Calling-Station-Id ?
* SEND_HW_ADDR = 1 ( YES ) / 0 ( NO )
* string client_hw_addr contains clients MAC address
*/
where you can enable this option or not. This allows you to send the MAC
address to the radius server ONLY if the authenticating host is on the same
LAN segment as your gateway with pppd. It reads the MAC address from the arp
cache!
Recompile ppp-2.4.3 and voila !
I know this has NOT anything to do with freeRadius, but since the question
was mailed here, maybe some other users may need this too.
Regards,
Edvin Seferovic
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of open
source
Sent: Samstag, 04. Juni 2005 10:37
To: freeradius-users@lists.freeradius.org
Subject: No Calling-Station-Id in Auth-Request
hey guys
I have been trying to authenticate user based on mac-address. But the
problem is my pppd is not sending the mac address of clients in it's
Auth-Request.
I'm using following softwares:
(i) rp-ppoe
(ii) pppd-2.4.1
(iii) ppp-2.4.1-vanilla-radclient-v2.1.patch
(iv) freeradius-1.0.2
Can anyone tell me how to send the mac-address of the client in the
Auth-Request as Calling-Station_Id or anyother attribute/value pair.
Thanks in advance
Open
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
/***
*
* radius.c
*
* RADIUS plugin for pppd. Performs PAP, CHAP, MS-CHAP, MS-CHAPv2
* authentication using RADIUS.
*
* Copyright (C) 2002 Roaring Penguin Software Inc.
*
* Based on a patch for ipppd, which is:
*Copyright (C) 1996, Matjaz Godec <[EMAIL PROTECTED]>
*Copyright (C) 1996, Lars Fenneberg <[EMAIL PROTECTED]>
*Copyright (C) 1997, Miguel A.L. Paraz <[EMAIL PROTECTED]>
*
* Uses radiusclient library, which is:
*Copyright (C) 1995,1996,1997,1998 Lars Fenneberg <[EMAIL PROTECTED]>
*Copyright (C) 2002 Roaring Penguin Software Inc.
*
* MPPE support is by Ralf Hofmann, <[EMAIL PROTECTED]>, with
* modification from Frank Cusack, <[EMAIL PROTECTED]>.
*
* This plugin may be distributed according to the terms of the GNU
* General Public License, version 2 or (at your option) any later version.
*
***/
static char const RCSID[] =
"$Id: radius.c,v 1.28 2004/11/14 10:27:57 paulus Exp $";
#include "pppd.h"
#include "chap-new.h"
#ifdef CHAPMS
#include "chap_ms.h"
#ifdef MPPE
#include "md5.h"
#endif
#endif
#include "radiusclient.h"
#include "fsm.h"
#include "ipcp.h"
#include
#include
#include
#include
#include
#include
/* INCLUDES FOR ARP CACHE ACCESS */
#include
#include
#include
#include
/* do you want to send MAC address or IP address in the attribute
* Calling-Station-Id ?
* SEND_HW_ADDR = 1 ( YES ) / 0 ( NO )
* string client_hw_addr contains clients MAC address
*/
#define SEND_HW_ADDR 1
char client_hw_addr[16];
char client_ip_addr[15];
#define BUF_LEN 1024
#define MD5_HASH_SIZE 16
static char *config_file = NULL;
static int add_avp(char **);
static struct avpopt {
char *vpstr;
struct avpopt *next;
} *avpopt = NULL;
static bool portnummap = 0;
static option_t Options[] = {
{ "radius-config-file", o_string, &config_file },
{ "avpair", o_special, add_avp },
{ "map-to-ttyname", o_bool, &portnummap,
"Set Radius NAS-Port attribute value via libradiusclient library",
OPT_PRIO | 1 },
{ "map-to-ifname", o_bool, &portnummap,
"Set Radius NAS-Port attribute to number as in interface name
(Default)", OPT_PRIOSUB | 0 },
{ NULL }
};
static int radius_secret_check(void);
static int radius_pap_auth(char *user,
char *passwd,
char **msgp,
struct wordlist **paddrs,
struct wordlist **popts);
static int radius_chap_verify(char *user, char *ourname, int id,
struct chap_digest_type *digest,
unsigned char *challenge,
unsigned char *response,
char *message, int message_space);
static void radius_ip_up(void *opaque, int arg);
static void radius_ip_down(void *opaque, int arg);
static void make_username_realm(char *user);
static int radius_setparams(VALUE_PAIR *vp, char *msg, REQUEST_INFO *req_info,
struct chap_digest_type *digest,
unsigned char *challenge,
char *message, int