Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openvpn-tools with many clients #8

Open
emmanuelgeoffray opened this issue Mar 2, 2017 · 0 comments
Open

openvpn-tools with many clients #8

emmanuelgeoffray opened this issue Mar 2, 2017 · 0 comments

Comments

@emmanuelgeoffray
Copy link

Hello,

I am using openvpn-tools on a server with a vpn where I manage a list of ~ 70 clients.
I have some issues with the last added clients to connect to the vpn.
I found out in clients.list that last clients have an IP_ID of 289, 293 ....
When they succeed to connect, it is with overflowed IP, for exemple a client with an IP_ID of 273, will connect with IP 10.11.12.18
But that breaks the connection for the computer that has an IP_ID of 17.

I examined the openvpn-tools and from what I read, each IP_ID is in a sequence of + 4: 17, 21, 25, etc.
But only two slots are used:

    # Computing client IP ID.
    IP_ID=5
    while [ -n "$(command grep " ${IP_ID}$" "${INSTANCE_CLIENTS_LIST_PATH}")" ]; do
      IP_ID=$((${IP_ID} + 4))
    done

    # Add client to instance client list.
    echo "${CLIENT_LONG_NAME} ${IP_ID}" >> "${INSTANCE_CLIENTS_LIST_PATH}"

    # Create client advanced config file, and fixing IP.
    SERVER_SIDE_IP="${CURRENT_IP_RANGE}.$((${IP_ID} + 1))"
    CLIENT_SIDE_IP="${CURRENT_IP_RANGE}.${IP_ID}"

https://github.com/biapy/howto.biapy.com/blob/master/openvpn/openvpn-tools#L2340

Can I safely change from IP_ID=$((${IP_ID} + 4)) to IP_ID=$((${IP_ID} + 2)) ?

Thank you,
Emmanuel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant