Getting ip address from host to guest

462 views
Skip to first unread message

Lito Kusnadi

unread,
Aug 19, 2015, 9:16:37 PM8/19/15
to Vagrant
Hi,

I am running Vagrant behind proxy. I am using Mac as the host (base) and spin up centos as guest using vagrant.
On Mac (host), I have a Suidman proxy that automatically sign up to the parent proxy. This works ok.
I want to automatically export http_proxy=http://ip.of.host.addr:8080/ when doing vagrant up.
Is there a way to pass host ip address so I can run it in shell provider?

Thanks.

Alvaro Miranda Aguilera

unread,
Aug 19, 2015, 9:45:16 PM8/19/15
to vagra...@googlegroups.com
On Thu, Aug 20, 2015 at 1:16 PM, Lito Kusnadi <lito.k...@gmail.com> wrote:
> Is there a way to pass host ip address so I can run it in shell provider?

Hello,

If you are using virtualbox, the host should be available on 10.0.2.2 or similar

route print should tell you in the guest
or ifconfig on the host mac


That ip should be always there since Vagrant use that nat network.

Will that work?

Lito Kusnadi

unread,
Aug 20, 2015, 8:38:12 PM8/20/15
to vagra...@googlegroups.com
Alvaro, you are a champion. It works!


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/vawLRMuC4g4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ezh1ft9j_3w4d%2B_HdrhHB-h6zixnXt3V9UJK9SeHwPg9g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Kindly Regards,
Lito Kusnadi
Reply all
Reply to author
Forward
0 new messages