Page 1 of 1
Setting port forwarding to client (dynamic ip)
Posted: Mon Sep 26, 2022 9:39 pm
by agente
I installed OpenVPN on a remote vps. I need to port forward one port to a client (in a different network) with dynamic ip. This is a service that I use with commercial VPN services but I cannot undersatand how to do with openvpn.
Thanks
Re: Setting port forwarding to client (dynamic ip)
Posted: Tue Sep 27, 2022 8:25 am
by openvpn_inc
Hello agente,
See this documentation item:
https://openvpn.net/vpn-server-resource ... ss-server/
This assumes you're using OpenVPN Access Server. With Access Server it's easy to do this.
Kind regards,
Johan
Re: Setting port forwarding to client (dynamic ip)
Posted: Tue Sep 27, 2022 11:02 am
by agente
I can add DMZ with a specific IP but my client have dynamic ip and connect with a specific user of course. I just need that every request on one specific port will forward to that user profile (without knowing the ip).
My client connect from remote network.
Re: Setting port forwarding to client (dynamic ip)
Posted: Tue Sep 27, 2022 11:58 am
by agente
UPDATE: I configured static ip for a client following this steps:
Static IP Address Network (Optional): Added 10.0.10.0/24
Routing: Yes, using Routing and added line 10.0.10.0/24
User permission: Ip addressing use static and set 10.0.10.5
DMZ: setting YES added two lines 10.0.10.5:tcp/myneededport 10.0.10.5:udp/myneededport
Saved.
I connected with my client but "myneededport" still close. I missed something?
Re: Setting port forwarding to client (dynamic ip)
Posted: Tue Sep 27, 2022 12:19 pm
by openvpn_inc
Hello agente,
It is not necessary for the VPN client to have a static IP, either on the Internet or on the VPN. It is irrelevant. Access Server will know where to send the request to once the VPN client is connected. The documentation also mentions the following: "A DMZ IP address works with a VPN client that uses either a static or dynamic VPN IP address".
The documentation also shows in the example that you have to specify the public IP of the Access Server for the DMZ rule, not the private IP of the VPN client. Once you've corrected this mistake it should work. If it then still doesn't work for you, you may need to look into firewalls on the server side and on the VPN client side, and on the VPN client side you need to also ensure that the service you're offering is actually listening on the VPN interface.
Kind regards,
Johan
Re: Setting port forwarding to client (dynamic ip)
Posted: Tue Sep 27, 2022 8:23 pm
by agente
my fault. everything working now.. thanks!
Re: Setting port forwarding to client (dynamic ip)
Posted: Wed Sep 28, 2022 5:31 pm
by openvpn_inc
Hello agente,
Glad to hear it.
Have a nice day,
Johan