Search code examples
laravelvagranthomestead

Homestead Vagrant not working while connected to VPN


I am running Homestead 2.0 with vagrant and virtualbox locally to work on a laravel project. When I use homestead up, the vm starts up normally and everything works fine. When I visit myProject.app (as configured in my homestead.yaml file), it loads up just fine. Here is what my Homestead.yaml file looks like:

---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
- ~/.ssh/id_rsa

folders:
- map: ~/Desktop/Projects/Laravel-Projects
  to: /home/vagrant/Code

sites:
- map: myProject.app
  to: /home/vagrant/Code/myProject/public

databases:
- myDatabase

variables:
- key: APP_ENV
  value: local

# blackfire:
#     - id: foo
#       token: bar
#       client-id: foo
#       client-token: bar

# ports:
#     - send: 93000
#       to: 9300
#     - send: 7777
#       to: 777
#       protocol: udp

Now, the problem is, I have to connect to a database which I have to be connected to a VPN to reach. I am using Cisco AnyConnect to connect to the VPN, but for some reason when I try to visit myProject.app after connecting to the VPN, it doesnt work work. Chrome just shows ERR_NETWORK_ACCESS_DENIED error.

I have tried stopping the VM and restarting it AFTER connecting to the VPN, but no luck? Anyone have any idea what this could be or a work around?

Thank you!


Solution

  • I was using Anyconnect 3.1 and upgraded to 4.2 and this fixed the problem instantly. You can grab a new version of Anyconnect from here: http://techs.teklinks.com/ciscovpn/