Remote Desktop while using VPN

edited April 2014 in VPN Setup Support Posts: 2
I can connect to Remote Desktop fine via my local IP and dynamic IP when I don't have the VPN running. When I do run the VPN, locally I can connect to RDP but connecting with my dynamic ip stops working. I tried searching through old posts since several others have had the same problem but they're showing up as page not found. Does anyone have a way I can fix this issue. I'd like to still be able to control my machine over the internet while it's connected to VPN.

Comments

  • VPNVPN
    Posts: 795
    You'd have to either connect remotely through the VPN, or exclude remote desktop from using the VPN, either by remote host (easy) or by port (very hard).
    What options do you have?
  • Can you suggest how to exclude (by remote host or by port)
  • Im having this exact problem. Can someone please elaborate as to the solution VPN provided.

    "exclude remote desktop from using the VPN, either by remote host (easy)"
  • Posts: 861
    can you configure remote desktop to listen on whatever port you want?

    if so, you can use the port forwarding PIA provides.  you just use the port PIA assigns you as the port remote desktop listens on.  you must first connect to a port forwarding server.

    Then you try to log on to the remote desktop by going through the IP address of that PIA server with the given port.
  • The computer is already using an alternative port for RDP and the Port is forwarded in the router. Plus this could change when I log in and log off of PIA causing me to have to make a registry change every time I was assigned a different port from PIA, causing me to have to reboot, causing me to potentially get assigned a different port when I reconnect... ect.

    The RDP session comes from outside of my network, to my port forwarded router then on to the target computer. I connect to the router through my DDNS so Im not sure what the issue is. The exact same setup works when the PIA VPN client is off, then stops the second I connect.  I

    I figured since Im connecting directly through my DDNS and not the VPN service that it would bypass the vpn entirely.
  • Posts: 861
    the reason trying to connect to your ISP IP address doesn't work is that once you start the VPN your computer will only communicate through the VPN to/from outside your local network.

    yes, you are correct that the IP address and port will change as you reconnect to VPN.  but, it's the only way to do it while connected to VPN.

    Unless you do some policy based routing so that remote desktop is allowed to communicate outside the VPN.  that is what @VPN was talking about.
  • VPNVPN
    edited February 2015 Posts: 795
    You can actually still communicate over your ISP assigned IP address (which is why leaks happen around the VPN), so you could use that as a feature and make RDP accessible over your ISP IP address.
    How easy this is however depends on your circumstances: If the machine you're trying to connect from has a static public IP address, its very easy. If it has changing IP addresses, that don't even fall within a small network range, it becomes very hard.

    Since you can use the VPN with more than one concurrent connection, it's easy to simulate the static IP address case:
    1) Get your ISP IP address for the RDP machine, write it down as $ISPIP.
    2) Connect the RDP machine to the VPN.
    3) Get the IP address of the VPN server it is connected to, write it down as $VPNIP.
    4) From the machine you want to login from (RDP client), establish a VPN tunnel to the same VPN server at $VPNIP.
    5) From the RDP client machine, open the RDP connection to $ISPIP.

    This will work as long as both machines are connected to the same VPN server machine (there are multiple servers on one VPN location, it must be the same server), because for the VPN to work, the IP address of the VPN server must always be reachable with your $ISPIP.
    The connection will be slower, because it will traverse the VPN one time, from the RDP client to the VPN server.

    If you can't use the VPN from the RDP client machine, and have a changing IP address, it becomes very hard to achieve this, but it might still be possible. You should tell us more about the network and involved routers/devices (specifically operating systems).


    edit: typos
    Post edited by VPN on
  • edited February 2015 Posts: 4
    Thanks for the reply guys.

    Cosmoxl, thanks it makes more since now. I couldn't figure out why it was working while I was within the local network. I thought the VPN was handling all traffic, not just the traffic over the WAN.

    VPN,
    My RDP computer is running Windows Server 2008 r2. It has a static assigned IP from my router. The router has a DDNS that I connect to whenever I'm out of my local network as my ISP provides me with a dynamic ip. The RDP client I'm trying to use is an android device using Microsoft's RDP app. I would like to also be able to use my laptop while away and on other WiFi networks so its not possible to set up static ip's for my RDP clients.
    Post edited by PoppinJ on
  • VPNVPN
    Posts: 795
    In that case, it seems like my instructions are the only easy way to get it to work. See if you can get the OpenVPN app (not PIA's app!) to work on your Android. Enter $VPNIP for the server address/hostname.

    Which firmware does your home router use, stock or custom?
Sign In or Register to comment.