The host netplan addresses:
addresses: [192.184.16.92/24,192.184.16.242/32]
gateway4: 192.184.14.1
is incorrect. It doesn't appear that these two addresses can reach the
gateway. Hence why ingress SSH connection cannot be established.
addresses: [192.184.16.92/16,192.184.16.242/
<http://192.184.16.92/24,192.184.16.242/32>16]
gateway4: 192.184.14.1
change both addresses to /16 and you should now be able to establish the
SSH connection.
But a second problem I see is that the vagrant machine (VM) has the same
configured IP address as the host interface:
192.184.16.242/ <http://192.184.16.92/24,192.184.16.242/32>32
vs
config.vm.network "public_network", ip: "192.184.16.242"
So should the SSH connection be established with the host or with the VM?
I'm going to guess what you are trying to do and say,
1. remove 192.184.16.242/ <http://192.184.16.92/24,192.184.16.242/32>32
from the host netplan. It's a single interface, i.e. enp1s0f0. If you need
two addresses for a single interface, then use an alias, e.g. enp1s0f0:0.
2. configure bridge-mode of the vagrant machine so that dhcp establishes an
IP for your VM within the subnet of your hosts network, i.e.
192.184.16.X/24.
3. whatever addresses is granted to the vagrant machine, e.g.
192.184.16.123, is now accessible from outside the host. Try the SSH
connection now.
Good luck,
Den
On Saturday, 11 May 2019 02:24:31 UTC-4, dijkstra wrote:
>
> Me and my colleague have been working on this for hours trying to see if
> its possible but we're giving up hope as we've tried everything on google.
>
> I have a server running vagrant inside my data center with the following
> IP's
>
>
> ~# cat /etc/netplan/50-cloud-init.yaml
>
> # This file is generated from information provided by
>
> # the datasource. Changes to it will not persist across an instance.
>
> # To disable cloud-init's network configuration capabilities, write a file
>
> # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
>
> # network: {config: disabled}
>
> network:
>
> ethernets:
>
> enp1s0f0:
>
> addresses: [192.184.16.92/24,192.184.16.242/32]
>
> gateway4: 192.184.14.1
>
> nameservers:
>
> addresses:
>
> - 1.1.1.1
>
>
> Here is my VM config:
>
>
> # cat Vagrantfile
>
> # -*- mode: ruby -*-
>
> # vi: set ft=ruby :
>
>
> Vagrant.configure("2") do |config|
>
>
> # /*=====================================
>
> # = FREE VERSION! =
>
> # =====================================*/
>
> # This is the free (still awesome) version of Scotch Box.
>
> # Please go Pro to support the project and get more features.
>
> # Check out https://box.scotch.io to learn more. Thanks
>
>
> config.vm.box = "scotch/box"
>
> config.vm.network "public_network", ip: "192.184.16.242"
>
> config.vm.hostname = "scotchbox"
>
> config.vm.synced_folder ".", "/var/www", :mount_options =>
> ["dmode=777", "fmode=666"]
>
>
> # Optional NFS. Make sure to remove other synced_folder line too
>
> #config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options =>
> ["dmode=777","fmode=666"] }
>
>
> end
>
> ####################
>
>
>
> How in the world do I SSH to the 192.184.16.242 scotch box from the public
> internet?
>
>
> Is it even possible?
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/9ae27dfb-e906-425d-9096-4292d21fb9c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.