Vyos ppp interfaces does not contains username

vyos creates ppp interfaces of pppoe server without usernames which causes issue regarding logs. It would be beteer if ppp interface should also contain username like in mikrotik

This can be done on the RADIUS server. I have this in my freeradius 3.0 sites-available/default:

post-auth {
update reply {
NAS-Port-Id = “ppp-%{Stripped-User-Name}”
}

}

1 Like

“ppp-%{Stripped-User-Name}” wqs not working but “ppp-%{User-Name}” did the job. Thanks

Freeradius is quite complex to configure, perhaps there is something different in my local setup here. Good you got it working.

I am getting long username error for some users is there any fix tor this in radius

How long is it? Stripped-User-Name (removes the part after @) if that’s unique and short enough, may need some tweaking I don’t remember (configured RADIUS long time ago and not touched since then). Again freeradius is complex, not easy to configure. But once set up properly, it is stable and just works.

this will work ?

post-auth {
if (NAS-Port-Id) {
rewrite {
# Check if NAS-Port-Id is longer than 15 characters
if (strlen(“%{NAS-Port-Id}”) > 15) {
# Rename NAS-Port-Id to the first 15 characters
update request {
NAS-Port-Id := substr(“%{NAS-Port-Id}”, 0, 15)
}
}
}
}
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.