kerozcak
This is because there's bind_local set to false in client mode (socket.c:1014), which prevents resolve_bind_socket function to execute bind() (socket.c:742) to bind a socket to the choosen address. Why bind() is turned off in client mode anyway?
krzee
because clients dont listen for connections
kerozcak
bind() is not used to listen for connection, listen() is. bind() is used to bind a socket to the address (in example ssh is using it for -b option). I had to manually remove the if (socket.c:742) to make it work for client mode in openvpn. So again, why it's turned off in client mode?
krzee
oh ok... you wanted --lport
kerozcak
No... i wanted --local, port doesn't matter to me.