Page 1 of 1

Client config ifconfig-push format changed?

Posted: Sun Jan 07, 2024 1:24 pm
by jlinkels58
I have an OpenVPN server running version 2.3.4.
The server.conf contains this line:

Code: Select all

server 172.16.84.0 255.255.255.0
One of the clients has this config file:
/etc/openvpn/clients/client1
contents

Code: Select all

ifconfig-push 172.16.84.53 172.16.84.54
This works correct.
The config is according to https://openvpn.net/community-resources ... -policies/

Now I have set up a new server, version 2.5.1
The server.conf contains this line:

Code: Select all

server 10.89.32.0 255.255.255.0
One of the clients has this config file:
/etc/openvpn/clients/aserv
contents

Code: Select all

ifconfig-push 10.89.32.5 10.89.32.6
Which is exactly according to the specification on the aforementioned web page.
The configuration of the client fails however.

Code: Select all

net_addr_v4_add: 10.89.32.5/-1 dev tun0
aserv ovpn-vpn-lwd[6507]: sitnl_send: rtnl: generic error (-22): Invalid argument
When I remove the client config file the client get assigned the first address from the pool 10.89.32.2 and works correctly.

But I want to assign this specific address to my client.
When I edit the client config file to contain:

Code: Select all

ifconfig-push 10.89.32.5 255.255.255.0
it also works correctly. But it is not according to the instructions.
That format I found in various user forums (not OpenVPN)
I have used the old format as in the manual for decades, literally
Has this format been changed, or what?

Client: Openvpn 2.5.1
Debian Bullseye

Server: OpenVPN 2.5.1
Raspian Bullsey

Re: Client config ifconfig-push format changed?

Posted: Sat Aug 17, 2024 11:50 pm
by TinCanTech
The change you are experiencing is due to --topology subnet

Re: Client config ifconfig-push format changed?

Posted: Tue Aug 20, 2024 1:41 am
by jlinkels58
That explains it, thank you very much.

According to OpenVPN documentation topology subnet is not the default. However it is present in my server.conf all the same, while it is not in the example server.conf. So I might have uncommented it myself while following some guide without knowing what I was doing. <insert head-banging icon here>

Thanks again for the clarification.