On Mon, Nov 15, 2021 at 12:08 PM Jan Just Keijser <janj...@nikhef.nl> wrote:
> Hi Rui, > > On 15/11/21 17:32, Rui Santos wrote: > > Hello everyone, > > > > I'm trying to design a setup where I define 2 servers for a particular > > client to connect to, basically 2 remote directives within the same > > client config file. > > Up until now, it works by: > > - defining explicit-exit-notify 2 on the client config file > I guess you mean server config, not client config. On client, 2 would be interpreted as the number of times to send the notify. > > - defining explicit-exit-notify 2 <- 2 here to connect to the next > > server on the list. > > Now, all this works as documented, when I restart one OpenVPN server, > > the client will connect to the next one on the list... perfect. The > > particular problem I have with this is that, this will issue a > > RECONNECT to all clients connected on that particular server. > > > > Now what I couldn't do, don't even know if it's possible is either: > > - to use the management interface to disconnect one particular tunnel. > > Maybe there's another way to accomplish it. The target here, is to > > make a particular client instance, to connect to the next server on > > the list, without actually restarting the daemon > > - to instruct the client to reconnect to the next server in the list, > > no matter the cause of disconnection, or even at ping-timeout (UDP) > > > > Are any of these approaches even feasible? If so, can someone please > > point me in the right direction? > > > > this is indeed what you use the management interface for. Read up at e.g. > https://openvpn.net/community-resources/management-interface/ > > the command is > kill <client-CN> > or > kill <client-IP>:<port> > I think that will send SIGTERM to the client which you do not want. Instead use client-kill CID from the management interface of the server. Here CID is the client-id of the client which could be obtained from status output. This command by default causes the client to RESTART. It takes an optional argument if you want to, say, HALT the client instead. Selva
_______________________________________________ Openvpn-users mailing list Openvpn-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-users