0

I'm trying to use rlm_python to authenticate client with my backend.

The problem is, it seems I could not use different modules for different virtual servers and it cause my authentication backed threat all authentication request as default virtual server.

So the question is: Is there any way to pass a variable to module to inform the current virtual server port address?

For example something like this:

update control {
       Auth-Type := `/usr/bin/python /etc/test.py '%{User-Name}' '%{User-Password}' '#{virtual-server}'`
}

1 Answer 1

0

You can use %{Packet-Dst-Port} which will expand to the destination port in the received UDP packet.

To access it in the rlm_python module you'd need to do something like:

update request {
    Packet-Dst-Port := "%{Packet-Dst-Port}"
}
python

To convert it to a real attribute first.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .