OpenVPN / openvpn3

OpenVPN 3 is a C++ class library that implements the functionality of an OpenVPN client, and is protocol-compatible with the OpenVPN 2.x branch.
https://openvpn.net
Other
973 stars 383 forks source link

The lport directive in config file being ignored #179

Open carvakaguru opened 2 years ago

carvakaguru commented 2 years ago

I have config which requires the use of the lport directive but openvpn3 as well as openvpn2 completely ignore it. Log for both shows the lport as being an unused option -

2021-10-22 17:55:47 Client DEBUG: UNUSED OPTIONS
4 [resolv-retry] [infinite]
5 [lport] [58137]

I am using OpenVPN 3/Linux v16_beta version on ubuntu bionic.

The same config works fine with openvpn 2.4 but it needs to run with sudo.

dsommers commented 2 years ago

Can you please elaborate why you need lport at all? Have you tried connecting without it?

carvakaguru commented 2 years ago

I am working on handling NAT Traversal out-of-band which does NAT hole punching (so that pre-allocated port forwarding is not required on the server side and in some cases not even possible to do). The mechanism I use results in the server side expecting packets from a specific IP-port combination. Hence the need for the lport directive.

This already works wonderfully in openvpn 2.4 but that requires sudo access. I thought that since openvpn3 does not need sudo access it would be perfect to upgrade to it but without lport I am stuck using openvpn 2.x.

dsommers commented 2 years ago

Thanks! This is essentially related to a missing feature in the OpenVPN 3 Core library, so I'll move this ticket to that project.

ValdikSS commented 2 years ago

It was unfortunate to learn that OpenVPN 3 does not support lport, since I need it to circumvent NAT as well, and there's no OpenVPN 2 client on iOS.