No internet after creating vm

Fatih90

Member
Jul 26, 2020
27
0
6
Omg pls help i am struggling with this for over 18 hours now

i have created a ubuntu desktop 20 vm
after starting there is no internet
i searched the forum but nothing works
so i have proxmox installed on hetzner dedicated server and ordered an aditional ip to configure it for the vm

this is my VMBR0
my ip is 78.46.70.29
so im not sure if i configured this correctly
1595799337413.png

this is my /etc/netplan/01-network-manager-all.yaml
1595799517655.png
after saving i run the command
sudo netplan apply
but no internet :(



pls help what am i doing wrong ?
 
well, this additional IP is routed ;-)

you should follow the guide, I posted above...

the main IP should be assigned to the host and the second should be assigned to your VM

THanks i did not see the link you posted before
i will folow the guide now and will let you know after i am done

Thanks for helping
 
well, this additional IP is routed ;-)

you should follow the guide, I posted above...

the main IP should be assigned to the host and the second should be assigned to your VM

well im lost at the last step where it says
Virtual Machine Configuration (Linux)

but my ubuntu is using netplan which differs a little from interfaces conf file

1595801661838.png
 
I'm not very familiar with netplan but try this

Code:
network:
  version: 2
  renderer: networkd
  ethernets:
    ens18:
      addresses: [ "78.46.70.29/32" ]
      nameservers:
        addresses: [ "213.133.98.98","213.133.99.99","213.133.100.100" ]
      routes:
        - to: 0.0.0.0/0
          via: 78.46.70.10
          on-link: true

still no connection
 
first of all,

remove eth0 from your config, your interface is eno1

I'm a bit confused because of the netmask /27 on eno1, normally you get a /32 netmask on hetzner servers

which server is this ?

thats the default value
 
well, this additional IP is routed ;-)

you should follow the guide, I posted above...

the main IP should be assigned to the host and the second should be assigned to your VM
Hi,
I am still a bit confused as of the fact if a routed setup on hetzner (from view of the node, the main IP of the network card to use an addtional ip) needs that the main IP is repeated in the vmbr0 or not. Is it needed for a routed or a bridged setup type? When youve asked Fatih:

it looks like you are using the same ip on the bridge and inside your vm !?
Is the additional IP routed to the main IP or did you order an IP for an additional MAC Address?
it additionally confused me, but somehow I have the feeling that there Fatih was wrong thinking to setup a bridged router config, while he addressed a routed setup, correct?
Is it then further right to make the sense of using routed over bridged clear: A bridged setup can expose the (in case of uncautious admin) not protected main host to the outer world while the routed setup is protecting the main IP because of the uproute which the NIC is using? through gateway and pointopoint as well as broadcast the config secures the network a bit better, perhaps, because the VMs use 78.46.70.29/29 IPs (subnet any of them probably deployed through a DHCP in the VM) but not (like in a bridge) the IP of the host (main ip = 78.46.70.1) ??? :p
Conclusioin:
So, the real routed setup then can be usedwithout having to fear that the node might become inaccessible, when it is like this network setup here?

Bash:
auto eth0
iface eth0 inet static
        address  138.201.203.16
        netmask  255.255.255.255
        gateway  138.201.203.1
    pointopoint 138.201.203.1
      
auto vmbr0
iface vmbr0 inet static
    address  138.201.203.16
    netmask  255.255.255.255
    bridge_ports none
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0
        up ip route add 138.201.203.49/32 dev vmbr0
        up ip route add 138.201.203.52/32 dev vmbr0
        up ip route add 138.201.203.56/32 dev vmbr0
        up ip route add 138.201.203.57/32 dev vmbr0
surely taken from Dominic Pratt.
and why not do it like created from the script of schaal?
Like this one...:
Bash:
# /etc/network/interfaces

### generated using Proxmox-Setup Tool 1.1 from schaal @it UG
### https://schaal-it.com/script-to-install-proxmox-5-x-and-6-x-on-a-dedicated-hetzner-server/
###
### Network-Type routed

# loopback device
auto lo
iface lo inet loopback
iface lo inet6 loopback

# network device
auto enp196s0
iface enp196s0 inet static
    address        123.215.228.229
    netmask        255.255.255.255
    gateway        123.215.228.193
    pointopoint    123.215.228.193
    post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up echo 1 > /proc/sys/net/ipv4/conf/enp196s0/proxy_arp

iface enp196s0 inet6 static
    address        2a01:4f8:241:4859::1
    netmask        128
    gateway        fe80::1
    up sysctl -p

auto vmbr0
iface vmbr0 inet static
    address        123.215.228.229
    netmask        255.255.255.255
    broadcast     123.215.228.255
    bridge_ports    none
    bridge_stp    off
    bridge_fd    0
    up ip route add 123.215.228.227/32 dev vmbr0
    up ip route add 123.215.228.228/32 dev vmbr0

iface vmbr0 inet6 static
    address        2a01:4f8:241:4859::2
    netmask        64

My main question, I gues, is: and WHERE is the difference that makes the one thing work for routed?

And resulting from lack of knowledge about networks, kindly tell me the difference between this
up ip route add 138.201.203.49/32 dev vmbr0
and that
pointopoint 123.215.228.193
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up echo 1 > /proc/sys/net/ipv4/conf/enp196s0/proxy_arp
and why is the one used over the other, in which cases, please??
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!