Hello, I was wondering if there is a better suggestion to what I’m doing here. I could very well do the following by setting the username equal to the Agent Remote Id. I would be then only using the radcheck table setting the Auth-Type to Accept and the radreply table for returning the IP address.
if ("%{sql:SELECT username FROM radcheck WHERE username = '%{string:ADSL-Agent-Remote-Id}'}" != "") { update request { User-Name := "%{string:&ADSL-Agent-Remote-Id}" } }
When I do this:
update control { Auth-Type := Accept }
the check on radreply table gets skipped and nothing is returned int the Access-Accept packet. Any idea why? Everything is done at the authorize section in the virtual server. Met vriendelijke groet \ With kind regards, Marijn van Gool NOC Network Engineer noc@comsave.com <mailto:noc@comave.com> +31 88 999 5555 marijn.vangool@comsave.com <mailto:marijn.vangool@comsave.com> www.comsave.nl <http://www.comsave.nl/>
On 16 Apr 2018, at 21:53, Marijn van Gool <marijn.vangool@comsave.com> wrote:
The only thing I did now is this:
server { authorize { if ("%{sql:SELECT agent_remote_id FROM radremoteid WHERE agent_remote_id = '%{string:ADSL-Agent-Remote-Id}'}" != "") { update request { User-Name := "%{string:&ADSL-Agent-Remote-Id}" } } } }
For this I had to populate the radcheck table where I added the ADSL-Agent-Remote-Id | Auth-Type | := | Accept.
Would I only do this:
update control { Auth-Type := Accept }
I noticed that the SELECT query on the radreply table gets skipped.
Is it necessary to make a ADSL-Agent-Remote-Id table at all. I could just populate tables radcheck, radreply, radgroupcheck and radgroupreply. Your thoughts on this?
Met vriendelijke groet \ With kind regards,
Marijn van Gool NOC Network Engineer noc@comsave.com <mailto:noc@comave.com>
+31 88 999 5555 marijn.vangool@comsave.com <mailto:marijn.vangool@comsave.com> www.comsave.nl <http://www.comsave.nl/>