Hello, I have ovpn created mikrotik, I wish that every client who connects have his own static ip address assigned ?
We have multiple connections from one site, so ipsec is not option as it allows only one connections from site. OVPN works, but don`t know how to asign stastic ip adress to connection.


client.log (6.68 KB)
Hi,
I suppose you had followed OpenVPN guide on Wiki (https://wiki.mikrotik.com/wiki/OpenVPN).
In the example above it’s set:
- IP pool for OVPN clients (ip → pool → OVPN-pool → ranges=10.15.32.34-10.15.32.38).
- OVPN server IP address (PPP → Profiles → your OpenVPN_server_name → local-address)
- selected IP pool for OVPN clients (PPP → Profiles → your OpenVPN_server_name → remote-address=OVPN-pool)
- netmask for OVPN (interface → ovpn-server → server → netmask=29)
So this is OVPN configuration where client IP is set in DHCP:
- server = 10.15.32.33/29 (obviously static IP)
- clients = 10.15.32.34/29 to 10.15.32.38/29
You need static IP for clients:
- select server OVPN IP according to netmask (let’s say you want 192.168.1.1)
- netmask /29 means clients IP from 192.168.1.2 to 192.168.1.6, if you need more IP addresses you have to change netmask
- remove IP pool from OVPN server settings if all clients will work using static IP, leave it otherwise.
- set static IP address for every client:
- /ppp secret add name=“ovpn-smiiko-1” … remote-address=192.168.1.2
- /ppp secret add name=“ovpn-smiiko-2” … remote-address=192.168.1.3
- …and so on
It should work if I’ve correctly understood your question.
Ok I understood, current config was - I used one secret for multiple connections, its working like this, but then I cannot control assigned ip adresses for each conneciton.
Now I created secret for each connection and now I am able to control ip adresses. thank you