[Solved] VPN (L2TP and PPTP) - static client IP address

Hi everyone,

I set up 2 VPNs on VyOS (crux), PPTP and L2TP. Both are configured with radius server. Everything works as it should except one thing. Is there any possibility to assign static IP’s for certain VPN clients ?
There is directive client-ip-pool responsible for ip address assigning, but when many clients are connected I receive different IP address everytime I connect to VPN.

I’ve had no experience with L2TP on Vyos, but what happens if you send back a “framed-ip-address” RADIUS attribute when you authenticate your user?

That should, I believe, work (if Vyos’ L2TP supports it)

Yes tjh is correct if you specify a framed ip on the radius profile it will overwrite the pool ip.

@tjh and @skoenman right.
@sebad, if you need to assign static IP address, just send via RADIUS attribute Framed-IP-Address in Access-Accept.

Thank you guys. I found the place where I can configure this, but I don’t know what attribute value should I type in. Screen attached.

Hi @sebad, put ipv4 address which you want to assign to the client.

It doesn’t make sense. I have ~50 accounts. For example for 2 of them I want assign IP’s manually. Is this possible ?

You need to add the attribute Framed-IP-Address on Radius Server only for these 2 accounts.
If RADIUS server does not send Framed-IP-Address then to clients will allocate IP from defined ip address pool on l2tp server.

Wow. I’m impressed. Everyting works as I expected. Thank you all for your help. Respect !

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