From ca557249a5f5cf3540913ba2e7c0cfc3957bf6ae Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Wed, 5 Apr 2017 15:13:24 -0700 Subject: [PATCH] Add note on forwarded_port and include host_ip configuration --- templates/commands/init/Vagrantfile.erb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/commands/init/Vagrantfile.erb b/templates/commands/init/Vagrantfile.erb index d746a7126..d503da3eb 100644 --- a/templates/commands/init/Vagrantfile.erb +++ b/templates/commands/init/Vagrantfile.erb @@ -31,8 +31,14 @@ Vagrant.configure("2") do |config| # Create a forwarded port mapping which allows access to a specific port # within the machine from a port on the host machine. In the example below, # accessing "localhost:8080" will access port 80 on the guest machine. + # NOTE: This will enable public access to the opened port # config.vm.network "forwarded_port", guest: 80, host: 8080 + # Create a forwarded port mapping which allows access to a specific port + # within the machine from a port on the host machine and only allow access + # via 127.0.0.1 to disable public access + # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1" + # Create a private network, which allows host-only access to the machine # using a specific IP. # config.vm.network "private_network", ip: "192.168.33.10"