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

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
User avatar
Mimiko
Forum Team
Posts: 1568
Joined: Wed Sep 22, 2010 3:18 am

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

Post by Mimiko » Thu Oct 11, 2018 5:42 am

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?

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 5095
Joined: Fri Jun 03, 2016 1:17 pm

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

Post by TinCanTech » Thu Oct 11, 2018 11:18 am

Perhaps your log will have more details ..

User avatar
Mimiko
Forum Team
Posts: 1568
Joined: Wed Sep 22, 2010 3:18 am

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

Post by Mimiko » Fri Oct 12, 2018 5:12 am

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.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 5095
Joined: Fri Jun 03, 2016 1:17 pm

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

Post by TinCanTech » Fri Oct 12, 2018 11:17 am

--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

User avatar
Mimiko
Forum Team
Posts: 1568
Joined: Wed Sep 22, 2010 3:18 am

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

Post by Mimiko » Fri Oct 12, 2018 3:56 pm

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.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 5095
Joined: Fri Jun 03, 2016 1:17 pm

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

Post by TinCanTech » Fri Oct 12, 2018 7:26 pm

I will take your word on that ..

Post Reply