Community discussions

MikroTik App
 
kpalagin1
newbie
Topic Author
Posts: 28
Joined: Sun Apr 26, 2020 1:56 pm

allow VPN client to request specific IP address?

Sat Jan 22, 2022 3:56 pm

Hello.

How do I set Mikrotik router to either
allow client to request specific IP address
or
allocate specific IP address based on login name?
Thanks a lot in adnace for any hints.

WBR, KP
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: allow VPN client to request specific IP address?

Sat Jan 22, 2022 7:05 pm

For all types of PPP-based and similarly configured VPNs (PPTP, L2TP, SSTP, OpenVPN), you can specify a particular address for the client as the remote-address parameter of the /ppp secret row representing that client, which is matched by login.

For IPsec, it is one step more complex, as the /ip ipsec identity row must refer to an /ip ipsec mode-config row.

In both cases, the IP address (or pool) is assigned based on client identity.

It is possible that the L2TP/PPTP/SSTP server will assign to the client the address it asks for if it is free and fits into the pool defined for that client. I haven't ever tried that as I saw no point in that. If the client is a Mikrotik device, you would have to create a new /ppp profile row with local-address set to the address you want and assign this profile to the /interface xxtp-client row; at the server side, the remote-address on the /ppp secret row representing that client, or on the /ppp profile row to which that /ppp secret row refers, or on the /ppp profile row set as default-profile of the server, would have to be a name of an /ip pool row into which the address requested by the client would fit.
 
kpalagin1
newbie
Topic Author
Posts: 28
Joined: Sun Apr 26, 2020 1:56 pm

Re: allow VPN client to request specific IP address?

Sun Jan 23, 2022 8:21 pm

Thank you very much for the detailed explanation :D

Who is online

Users browsing this forum: almdandi, Bing [Bot], gianricci, patrikg, Renfrew, uamma and 81 guests