I am asking because I am not sure how those public/bridged etc. networking between host/guest works. Sometime I cannot see the port on the host. Maybe it is because the app in the VM is restricted to accept localhost connection only, but I always strugling to find the exact place of the error.
Are those option equal ? call 192.168.10.101:80 on host machine make port-forward 80:80 and call localhost:80 on host machine Is the first option using NAT while the second is not? On Saturday, March 7, 2020 at 12:59:34 PM UTC+1, Alvaro Miranda Aguilera wrote: > > hello > > if you want to access something on port 80 then you can use 192.168. > 10.101:80 > > http://192.168.10.101 > > > On Fri, Mar 6, 2020 at 12:17 PM zveratko <martin...@gmail.com > <javascript:>> wrote: > >> I have set up some vagrant box and I want to connect to some services >> running on it. I used this to set up the networking >> >> config.vm.network "private_network", ip: "192.168.10.101" >> >> >> I checked in VirtualBoxUI and the machine has two interfaces NAT with >> port forwarding 2222->22(probably the eth0) and HOST_ONLY(eth1?) >> >> eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 >> inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255 >> inet6 fe80::a00:27ff:fec2:4a97 prefixlen 64 scopeid 0x20<link> >> ether 08:00:27:c2:4a:97 txqueuelen 1000 (Ethernet) >> RX packets 27643 bytes 24238095 (23.1 MiB) >> RX errors 0 dropped 0 overruns 0 frame 0 >> TX packets 11304 bytes 1136140 (1.0 MiB) >> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 >> >> >> eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 >> inet 192.168.10.101 netmask 255.255.255.0 broadcast 192.168. >> 10.255 >> inet6 fe80::a00:27ff:fe19:fc5 prefixlen 64 scopeid 0x20<link> >> ether 08:00:27:19:0f:c5 txqueuelen 1000 (Ethernet) >> RX packets 3053 bytes 278689 (272.1 KiB) >> RX errors 0 dropped 0 overruns 0 frame 0 >> TX packets 2380 bytes 683097 (667.0 KiB) >> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 >> >> >> Do I need port forwarding to access some service running inside on port >> ie.80? I have just tested that I can putty in by localhost:2222 or >> 192.168.10.101:22 >> >> In which setting I can ommit port forwarding and just call guest with its >> ip? I have some problems connecting to another service and I am not sure >> whather it just listen to localhost only or something else is wrong. >> >> Is this sentence I noted some time ago correct >> >> port forwarding is not needed when using private network and accessing >> guest from host with guest private ip, port forwarding is used to access >> guest with localhost/127.0.0.1 the ports are then forwarded >> >> -- >> 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 the Google Groups >> "Vagrant" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to vagra...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/vagrant-up/63a27481-91a3-42b4-a93a-4aa7c49a424f%40googlegroups.com >> >> <https://groups.google.com/d/msgid/vagrant-up/63a27481-91a3-42b4-a93a-4aa7c49a424f%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Alvaro > > -- 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 the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/679b3a9b-72e1-4d42-99ca-08860553bc23%40googlegroups.com.