Merge pull request #12388 from JonTheNiceGuy/patch-1

Update "Default Router" shell script in publc_network.mdx documentation
This commit is contained in:
Chris Roberts 2021-06-15 08:35:39 -07:00 committed by GitHub
commit 7528cdc235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,5 +152,18 @@ Vagrant.configure("2") do |config|
end
```
Note the above is fairly complex and may be guest OS specific, but we
Or, an alternative, simpler version, assuming you get DHCP from your public network:
```ruby
Vagrant.configure("2") do |config|
config.vm.network "public_network"
# default router
config.vm.provision "shell",
run: "always",
inline: "ip route del default via 10.0.2.2 || true"
end
```
Note the above are fairly complex and will be guest OS specific, but we
document the rough idea of how to do it because it is a common question.