Hi Guys,
normally, what i would do to connect to my VM1 through the internet would be something like:
Code:
iptables -t nat -A PREROUTING -p tcp -d 192.168.1.25 --dport 5901 -j DNAT --to-destination 192.168.1.10:5900
Using noip.com pointing to 192.168.1.25:
Being the 192.168.1.25 MY SERVER'S IP
And 192.168.1.10 VIRTUAL MACHINE'S IP
Problem is, when i connect through IPSec/L2TP VPN i can't find a way to connect through VNC directly to the machine
This doesn't work:
Code:
iptables -t nat -A PREROUTING -p tcp -d 10.8.0.1 --dport 5905 -j DNAT --to-destination 192.168.1.10:5900
Being the 10.8.0.1 Server's IP under the VPN;
BUT, if i want to connect through the hypervisor KVM, to the VM UNDER THE VPN, i can do so by using this:
Code:
iptables -t nat -A PREROUTING -p tcp -d 10.8.0.1 --dport 5901 -j DNAT --to-destination 192.168.1.25:5901
Notice that 192.168.1.25 is the server IP, and the 10.8.0.1 is the IP i'm using to connect to the server, so, both addresses are from the server per se.
I do not want this, as i would prefer to connect directly to the VM, that has an X11VNC server active and ready to receive a connection, and it works much better than KVM's VNC default server (Don't even know what kind of server it uses by default)
This is an important matter to me, so, if anyone is willing to work on this, i would be more than glad to pay you the service.
I thank you from the bottom of my heart, to anyone that can provide some kind of help in any way possible.