Re: Values for MySQL tables for pptpd ?

Steve Phillips <[email protected]> Wed, 23 May 2012 18:04:53 +1000
Newsgroups gmane.network.poptop
Message-ID <[email protected]>
This appears to be a problem with your configuration of freeradius.

 From looking over the messages in your logfile, Its appears freeradius 
is trying to look the user up (after you added it) and this is 
succeeding, but then it tried to get the reply attributes, cant locate 
the user and so exits.

Have you tried adding an entry in the radreply table as well ? (try 
adding something like, "Service-Type=Framed" and "Framed-Protocol=PPP" 
as reply attributes as they are pretty standard and it wont hurt to add 
them)

Before doing the entire pptp thing, try using the command line radcheck 
tool (I forget the exact name of the binary, but it will be comething 
like radcheck or checkrad or radtest) that comes with free radius and 
ensure this is all working and you are getting good authentication 
replies before adding pptp into the mix.

-- 
Steve.

On 23/05/2012 5:17 PM, Ali Jawad wrote:
> Hi
> I did setup pptpd with freeradius + mysql
> http://poptop.sourceforge.net/dox/radius_mysql.html.
> pptpd "poptop"  works fine without freeradius, with freeradius and
> mysql, all seems fine apart from me not knowing what values to enter
> into the mysql tables of freeradius.
>
> With no entries in database I get
>
> Ready to process requests.
>
> rad_recv: Access-Request packet from host 127.0.0.1:45194
> <http://127.0.0.1:45194/>, id=198, length=67
>          Service-Type = Framed-User
>          Framed-Protocol = PPP
>          User-Name = "test"
>          Calling-Station-Id = "193.227.186.146"
>          NAS-IP-Address = 127.0.0.1
>          NAS-Port = 0
>    Processing the authorize section of radiusd.conf
> modcall: entering group authorize for request 0
>    modcall[authorize]: module "preprocess" returns ok for request 0
>      rlm_realm: No '@' in User-Name = "test", looking up realm NULL
>      rlm_realm: No such realm "NULL"
>    modcall[authorize]: module "suffix" returns noop for request 0
> radius_xlat: 'test'
> rlm_sql (sql): sql_set_user escaped user --> 'test'
> radius_xlat: 'SELECT id, UserName, Attribute, Value, op           FROM
> radcheck           WHERE Username = 'test'           ORDER BY id'
> rlm_sql (sql): Reserving sql socket id: 4
> rlm_sql (sql): User test not found in radcheck
> radius_xlat: 'SELECT radgroupcheck.id
> <http://radgroupcheck.id/>,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op
>   FROM radgroupcheck,usergroup WHERE usergroup.Username = 'test' AND
> usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id
> <http://radgroupcheck.id/>'
> radius_xlat: 'SELECT radgroupreply.id
> <http://radgroupreply.id/>,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op
>   FROM radgroupreply,usergroup WHERE usergroup.Username = 'test' AND
> usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id
> <http://radgroupreply.id/>'
> rlm_sql (sql): User test not found in radgroupcheck
> rlm_sql (sql): Released sql socket id: 4
> rlm_sql (sql): User not found <#######################
>    modcall[authorize]: module "sql" returns notfound for request 0
>    modcall[authorize]: module "mschap" returns noop for request 0
> modcall: leaving group authorize (returns ok) for request 0
> auth: No authenticate method (Auth-Type) configuration found for the
> request: Rejecting the user
> auth: Failed to validate the user.
> Delaying request 0 for 1 seconds
> Finished request 0
> Going to the next request
> --- Walking the entire request list ---
> Waking up in 1 seconds...
> --- Walking the entire request list ---
> Waking up in 1 seconds...
> --- Walking the entire request list ---
> Sending Access-Reject of id 198 to 127.0.0.1 port 45194
> Waking up in 4 seconds...
> --- Walking the entire request list ---
> Cleaning up request 0 ID 198 with timestamp 4fbc8c9d
>
>
> When I do add to radcheck -
>
> INSERT INTO `radcheck` (`id`, `UserName`, `Attribute`, `op`, `Value`) VALUES
> (11, 'test', 'Chap-Password', '==', 'test');
>
>   I get
>
> rad_recv: Access-Request packet from host 127.0.0.1:46882
> <http://127.0.0.1:46882/>, id=199, length=67
>          Service-Type = Framed-User
>          Framed-Protocol = PPP
>          User-Name = "test"
>          Calling-Station-Id = "193.227.186.146"
>          NAS-IP-Address = 127.0.0.1
>          NAS-Port = 0
>    Processing the authorize section of radiusd.conf
> modcall: entering group authorize for request 1
>    modcall[authorize]: module "preprocess" returns ok for request 1
>      rlm_realm: No '@' in User-Name = "test", looking up realm NULL
>      rlm_realm: No such realm "NULL"
>    modcall[authorize]: module "suffix" returns noop for request 1
> radius_xlat: 'test'
> rlm_sql (sql): sql_set_user escaped user --> 'test'
> radius_xlat: 'SELECT id, UserName, Attribute, Value, op           FROM
> radcheck           WHERE Username = 'test'           ORDER BY id'
> rlm_sql (sql): Reserving sql socket id: 3
> radius_xlat: 'SELECT radgroupcheck.id
> <http://radgroupcheck.id/>,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op
>   FROM radgroupcheck,usergroup WHERE usergroup.Username = 'test' AND
> usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id
> <http://radgroupcheck.id/>'
> radius_xlat: 'SELECT id, UserName, Attribute, Value, op           FROM
> radreply           WHERE Username = 'test'           ORDER BY id'
> radius_xlat: 'SELECT radgroupreply.id
> <http://radgroupreply.id/>,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op
>   FROM radgroupreply,usergroup WHERE usergroup.Username = 'test' AND
> usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id
> <http://radgroupreply.id/>'
> rlm_sql (sql): Released sql socket id: 3
> rlm_sql (sql): No matching entry in the database for request from user
> [test]
>    modcall[authorize]: module "sql" returns notfound for request 1
>    modcall[authorize]: module "mschap" returns noop for request 1
> modcall: leaving group authorize (returns ok) for request 1
> auth: No authenticate method (Auth-Type) configuration found for the
> request: Rejecting the user <#################
> auth: Failed to validate the user.
> Delaying request 1 for 1 seconds
> Finished request 1
> Going to the next request
> --- Walking the entire request list ---
> Waking up in 1 seconds...
> --- Walking the entire request list ---
> Waking up in 1 seconds...
> --- Walking the entire request list ---
> Sending Access-Reject of id 199 to 127.0.0.1 port 46882
> Waking up in 4 seconds...
> --- Walking the entire request list ---
> Cleaning up request 1 ID 199 with timestamp 4fbc8d01
> Nothing to do.  Sleeping until we see a request.
>
>
> I am lost here, please advice.
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
>
>
> _______________________________________________
> Poptop-server mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/poptop-server

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
Poptop-server mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/poptop-server
smime.p7s (application/pkcs7-signature, 3.7 KB) - not displayed