Installing OpenVPN server to listen to a different port than the default UDP 1194.
When connecting with a client, I get the following error message:
Code: Select all
TCP/UDP: Incoming packet rejected from [AF_INET]10.0.0.x:1194[2], expected peer address: [AF_INET]83.15.xxx.xxx:20000 (allow this incoming source address/port by removing --remote or adding --float)
The rejected packet contains the internal LAN IP of the OpenVPN server
This seems to be a known issue when connecting over the external IP, but to OpenVPN server which is inside the same LAN as the client.
In my case, I connected from a VirtualBox virtual machine client, so I just switched the VirtualBox network type to "NAT". So the VM client wasn't in the same subnet as the OpenVPN server anymore.
Then I had to add "float" the the ovpn config file (or "--float" to the commandline) and it worked