Professional Documents
Culture Documents
Mostrar Adaptadores e Red
Mostrar Adaptadores e Red
ip link
network:
version: 2
renderer: networkd
ethernets:
ens160:
dhcp4: true
Follow with:
Hostnamectl
network:
version: 2
renderer: networkd
ethernets:
enp3s0:
addresses:
- 10.10.10.2/24
gateway4: 10.10.10.1
nameservers:
search: [mydomain, otherdomain]
addresses: [10.10.10.1, 1.1.1.1]
Ocurre que para virtualbox necesitas tener NAT para internet, y HOST-ONLY para que este en la
red
Asi quedaría el netplan
3
check out the post from @Ahsan.Amin in https://askubuntu.com/questions/984445/netplan-
configuration-on-ubuntu-17-04-virtual-machine?rq=1 since he provided a working netplan and
therefore the solution to my problem. :)
To give you an overview these are the steps that allowed me to set a NAT and host only
connection in Virtualbox. I hope you can adapt them to VMWare.
If you simply want to be able to access the VM (guest OS) from your host (e.g. Windows 10
OS) use host-only adapter and NAT to access the internet from your guest OS. Therefore set
the first network adapter to NAT and the second one to host-only network.
Check with ifconfig on your VM for your ethernet name mine is enp0s3 for NAT and enp0s8
for host-only. Simply my network adapter order.
In order to use the network manager, create a netplan.yml (sudo nano PLAN-NAME.yaml) in
etc/netplan/ and set the file to something like this:
network:
ethernets:
enp0s3:
addresses: []
dhcp4: true
enp0s8:
addresses: [192.168.78.2/24]
dhcp4: no
dhcp6: no
nameservers:
addresses: [8.8.8.8,8.8.4.4]
version: 2
renderer: networkd
Addresses containing the static IP of the current VM. Check the host adapter for its IP and
modify the addresses parameter to your needs.
It is really really important not to set the gateway4 parameter. It prevented me from accessing
the internet.
ping -c 4 8.8.8.8
and using Putty / MobaXterm to connect to your VM (use IP from addresses).
In this quick tip, I’ll discuss the solution that you could use to make the changes
in resolv.conf permanent.
I hope this quick tutorial helped you in changing DNS settings and making those
changes permanent. Any questions, suggestions, a word of thanks are welcomed.
Ciao :)