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) ???
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??