0

I installed vagrant-lxc on my VPS ( VmWare virtualization ). Container created correctly with provisioned application - Drupal. Now I'd like to open site from the outside:

  • Vagrant container have private IP address: 10.0.3.1 - interface "lxcbr0" ( when I checked "ifconfig" from host )
  • Inside Vagrant machine, "ifconfig" showing IP: 10.0.3.22 .
  • VPS have public IP

How can I get access from my local PC to Vagrant machine ( which is inside to VPS )? I found command "redir" ( here is description: https://linux-tips.com/t/tcp-port-redirections-with-redir/199 ) but I'm not confident if is it right way.

Thanks for help.

dawideq03
  • 1
  • 1
  • in your host's command line check with `ifconfig`/`ipconfig` based on your os. and check if you have `vboxnet1` or `vboxnet-xx` check if you can see any ip address for that `vboxnet` adapter, and also check inside guest any ipaddress of same vboxnet adapter's range? please share info. – Hara Aug 09 '17 at 07:25
  • may be if you use `config.vm.network "private_network", ip: "192.168.100.10"` as part of your `Vagrantfile` then you can try using private-ip, It is working for me, I am able to access guest's ip address from host. I am running some processes in guest, and could get response to host from guest, if i use `private_network`. – Hara Aug 09 '17 at 07:30

0 Answers0