New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
OpenVPN: how to connect to a client
Hello guys!
The question may (is) stupid but I don't understand one thing.
I use a Kimsufi server and I configured it to use OpenVPN as a client (another server is the OpenVPN server). As you know now the Kimsufi changed its IP and has the same IP of the OpenVPN server.
The question is: if I want to connect to the webui of a program running on the kimsufi, how do I do that since the IP changed?
Comments
You have to do port forwarding on the VPN server IP
Thank you for the intuition MuZo!
I'll try to find something online. If you happen to know any good guide that I can read that would be great
Just search on Google how to do port forwarding with iptables. Set the port to go to the VPN client IP so it will be sent over the VPN to the client.
iptables -t nat -A PREROUTING -p tcp --dport port -j DNAT --to-destination ip:port
port=external port
ip:port=openvpnclientip:internalport
the internal IP address of the kimsufi in the VPN might change after a reconnect, not sure...
You can configure Openvpn to provide the same internal IP to specific users.
My suggestion is excluded , you can use dynamic dns for any type of ip or other method of notification for new ip.. if everything else not working.
go on...
https://openvpn.net/index.php/open-source/documentation/howto.html#policy
Thanks for your answer ACaton!
I don't understand one thing: the "ip:port", ip referes to "true ip of the client" or the ip after connecting to the server? Also, what do you mean with external port and internal port?
I'm reading around about forwarding and NAT using iptables but I'm still a bit lost
EDIT: It works
Thank you very much!!
Glad it worked out for you. It took me a bit to find the proper information as well, so I know how you feel. At the end it is a pretty simple command and works like a charm.
Very true! Again, thanks