Page 1 of 1

Lots of add and delete addresses via learn-address script.

Posted: Thu Oct 11, 2018 5:42 am
by Mimiko
Hello.

I've implemented calling a script when --learn-address event occur. I see a lot of add address and delete address every 2-3 minutes for same IP. Is this by design? Why it should delete then add same address every 2-3 minutes? May be a parameter on client to extend the time?

Re: Lots of add and delete addresses via learn-address script.

Posted: Thu Oct 11, 2018 11:18 am
by TinCanTech
Perhaps your log will have more details ..

Re: Lots of add and delete addresses via learn-address script.

Posted: Fri Oct 12, 2018 5:12 am
by Mimiko
Unfortunately in logs there is nothing about this. I think the server is just executing learn-address events in response to clients sending those events. On clients also there is nothing about this events in log.

Re: Lots of add and delete addresses via learn-address script.

Posted: Fri Oct 12, 2018 11:17 am
by TinCanTech
--learn-address fires when an address needs to be learned. It happens at connect/disconnect .. therefore your clients are disconnecting and reconnecting, which means your log will have all that detail .. at --verb 4

Re: Lots of add and delete addresses via learn-address script.

Posted: Fri Oct 12, 2018 3:56 pm
by Mimiko
After analyzing with verb 4 I've found that openvpn server deletes an address after about 2 mins by itself. There is no message from client to delete an IP address on the client's lan. So how to increase the time that openvpn server will hold the IP address in its internal routing table.

Re: Lots of add and delete addresses via learn-address script.

Posted: Fri Oct 12, 2018 7:26 pm
by TinCanTech
I will take your word on that ..