tag:help.appveyor.com,2012-11-13:/discussions/problems/12920-trouble-using-vpn-with-appveyorAppVeyor: Discussion 2018-08-25T02:27:28Ztag:help.appveyor.com,2012-11-13:Comment/448898122018-03-13T00:46:50Z2018-03-13T00:46:50ZTrouble using VPN with AppVeyor<div><p>Can you please try to connect to the build VM over <a href="https://www.appveyor.com/docs/how-to/rdp-to-build-worker/">RDP</a> and run this script manually? Note that environment variables from the build are not available in the RDP session, so you need to reset them manually. This experiment will help us rule out (or blame) networking issues. If it works in RDP, next step will be to check if all variables are correct during the build. If not, will concentrate on networking part of the problem.</p>
<p>Please let us know what you found.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/448898122018-03-13T15:39:20Z2018-03-13T15:39:20ZTrouble using VPN with AppVeyor<div><p>I've tried using the method described in that article to connect over RDP but haven't had success making it work (even with the VPN connect turned off). I've double checked a few variables, but what's strange to me is the output seems to just die after the rasdial command is called without any more output of what went wrong.</p></div>adamtag:help.appveyor.com,2012-11-13:Comment/448898122018-03-14T00:01:40Z2018-03-14T00:01:40ZTrouble using VPN with AppVeyor<div><p>Hi Adam,</p>
<p>Can you try to create a VPN connection in UI to see if this works?</p>
<p>If you could create test VPN user for me, I could investigate. You can make this conversation private or email to team at appveyor.com with VPN user and server details.</p>
<p>Also we can enable you to set build worker clouds, e.g. datacenters where build VM is being provisioned for you to check if some specific datacenter works. But for that we need your AppVeyor account name.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/448898122018-03-14T18:43:06Z2018-03-14T18:43:06ZTrouble using VPN with AppVeyor<div><p>Hi Ilya,</p>
<p>I'm not sure how to create a VPN connection using the UI in AppVeyor...is there a guide for this?</p>
<p>My AppVeyor account is ARizzo35.</p></div>adamtag:help.appveyor.com,2012-11-13:Comment/448898122018-03-15T02:43:02Z2018-03-15T02:43:02ZTrouble using VPN with AppVeyor<div><p>Hi Adam,</p>
<p>I did some research and I think that you are loosing the VM because connection is actually succeeded, but default gateway is being set to your VPN server private IP, so it is being lost for AppVeyor and public Internet in general because routing is broken.</p>
<p>Add the following to your <code>Add-VpnConnection</code> command: <code>-SplitTunneling $true</code>.</p>
<p>Also might be needed to add static route (with <code>route add</code> command) to <code>192.168.128.103</code> host.</p>
<p>Let us know if this helps.</p>
<p>P.S. To create VPN connection on AppVeyor with UI, you need to follow the same steps as on any Windows machine, using <code>Control Panel > Network and Internet > Network and Sharing Center > Set up an new connection or network</code>.</p>
<p>Ilya.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/448898122018-03-15T16:08:19Z2018-03-15T16:08:19ZTrouble using VPN with AppVeyor<div><p>Thanks Ilya! I can see the connection complete successfully now if I use the SplitTunneling option. I'm still not able to get the network drive to connect properly but I will continue debugging this.</p></div>adamtag:help.appveyor.com,2012-11-13:Comment/448898122018-03-15T16:25:04Z2018-03-15T16:25:04ZTrouble using VPN with AppVeyor<div><p>Great!</p>
<p>Regarding networking drive I would first ensure that IP routing works properly. I would do something like this <code>route ADD 192.168.128.103 MASK 255.255.255.255 <VPN_SERVER_PRIVATE_IP></code> and then check that <code>ping</code> and <code>tracert</code> to <code>192.168.128.103</code> work properly (assuming that ICMP is allowed on VPN server and on target servers firewall).</p>
<p><code>VPN_SERVER_PRIVATE_IP</code> can be tricky and not what it seems from the first look. You can check on your <strong>local machine</strong> by typing <code>ipconfig</code> and <code>route print</code> before and after VPN connection made <strong>without split tunneling</strong>. New <strong>default gateway</strong> appeared after connection was made is that IP.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/448898122018-03-15T20:49:50Z2018-03-15T20:49:50ZTrouble using VPN with AppVeyor<div><p>Ilya, much thanks for your help! I was finally able to get this working after adding the right entry in the routing table.</p></div>adamtag:help.appveyor.com,2012-11-13:Comment/448898122018-03-15T20:53:06Z2018-03-15T20:53:06ZTrouble using VPN with AppVeyor<div><p>Good, thanks for update :)</p></div>Ilya Finkelshteyn