VPN connection failed from Appveyor

ap's Avatar


08 Aug, 2018 06:12 AM

We trying to include in the deployment process of the our app step to upload files to specific FTP via PowerShell. But we can work with such FTP only via VPN. Because it we are trying to connect to VPN from PowerShell script.
We create VPN connection from Install script with help command:
Add-VpnConnection -Name "vpn_name" -ServerAddress "server_address" -TunnelType PPTP -SplitTunneling
Attempts to connect to VPN we make from script, that we call from deployment step. We use such command:
rasdial "vpn_name" username password;

We have such error

Connecting to vpn_name...
Verifying username and password...
Remote Access error 619 - A connection to the remote computer could not be established, so the port used for this connection was closed.
For more help on this error:
Type 'hh netcfg.chm' In help, click Troubleshooting, then Error Messages, then 619

We expirenced such problem when tried to connect to vpn via rasdial with already opened other VPN connections. Did Appveyor use another vpn connection and can be this a reason for our problem?
Could you consult how we can fix this problem with connection to VPN.

  1. Support Staff 1 Posted by Owen McDonnell on 08 Aug, 2018 05:19 PM

    Owen McDonnell's Avatar

    I think you will need to add a static route.
    That can be done from powershell cmdlet Add-VpnConnectionRoute followed by vpn connection name and then destination address.
    Or you can use cmd route add <dest_address> MASK <VPN_SERVER_IP>

  2. 2 Posted by Aleksei on 09 Aug, 2018 06:02 AM

    Aleksei's Avatar

    What should be detination address in the static route and why I should add it to make VPN working?

  3. Support Staff 3 Posted by Owen McDonnell on 09 Aug, 2018 06:31 PM

    Owen McDonnell's Avatar

    Sorry, I think the command i suggested was wrong. Should be

    route add <VPN_SERVER_IP> MASK
    Second value is the default gateway address.

    As for the why... well i'm really not a networking pro so I would guess its because of an extra layer of NAT due to virtualization.

  4. 4 Posted by Aleksei on 10 Aug, 2018 05:19 AM

    Aleksei's Avatar

    Thanks for corrected command. We tried to apply this to our build and it was not helped to solve problem with connection. For command to add static route system answered "OK", but when script tried to connect to VPN it return exactly same error with code 619.

  5. Support Staff 5 Posted by Owen McDonnell on 10 Aug, 2018 11:29 PM

    Owen McDonnell's Avatar

    The team came up with a command that should get this working for you.
    Add the following before you establish the connection with the VPN

    netsh advfirewall firewall set rule name="Routing and Remote Access (GRE-In)" new enable=yes
  6. 6 Posted by Aleksei on 14 Aug, 2018 05:23 AM

    Aleksei's Avatar

    This command solve our problem. Very thanks for you help.

  7. Support Staff 7 Posted by Owen McDonnell on 14 Aug, 2018 05:47 AM

    Owen McDonnell's Avatar

    Great, thanks for the update!

  8. Owen McDonnell closed this discussion on 14 Aug, 2018 05:47 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac