7

I have a Root-Server with Proxmox installed. Until now, I always had Ubuntu 16. Now i upgraded a VM to Ubuntu 18 and I need an example for the new netplan configuration.

This was my old interfaces file:

auto ens18
    iface ens18 inet static
    address 195.201.52.XXX
    netmask 255.255.255.255
    pointopoint 195.201.8.YYY
    gateway 195.201.8.YYY
    dns-nameservers 213.133.98.98 213.133.99.99 213.133.100.100 8.8.8.8

Because I couldn't find the option pointopoint with the new netplan I'm struggling to activate this VM. I know I could simply install ifupdown again. But if there is a possibility, I would like to keep the new netplan.

Additional info:
Have a look at my Configuration Files: https://pastebin.com/Havqfw7t

IPv4 Forwarding is enabled on both Guest and Host System.

2 Answers 2

7

You have the right idea in your "additional info" pastebin. Applying the same IP addresses as your question:

network:
  version: 2
  renderer: networkd
  ethernets:
    ens18:
      dhcp4: no
      dhcp6: no
      addresses: [195.201.52.XXX/32]
      routes:
      - to: 0.0.0.0/0
        via: 195.201.8.YYY
        on-link: true
      nameservers:
        addresses: [213.133.98.98,213.133.99.99,213.133.100.100,8.8.8.8]

However, you seem to have the same IP address on multiple interfaces in your host config; that might not help.

Basically, all your need for point-to-point is to add a static route to 0.0.0.0/0 via the IP of your peer; and make sure to set the route 'on-link: true'.

We put this up on the netplan.io website, too: https://netplan.io/examples#directly-connected-gateway

0

I am using Ubuntu 18 on different hosts with proxmox. My netplan configuration inside vm and container as follows:

/etc/netplan/01-netcfg.yaml:

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:  
    ens18:  
      addresses: [ "192.168.1.18/32" ]  
      nameservers:  
        addresses: [ "1.1.1.1", "1.0.0.1" ]  
      routes:  
        - to: 0.0.0.0/0  
          via: 192.168.1.1  
          on-link: true  

192.168.1.18 is the ip of my container/vm
192.168.1.1 is the ip of my gateway
1.1.1.1 and 1.0.0.1 are public dns server

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .