Hi guys,
I’ve got configure network with a public ip and public and private subnets. Apparently it works (with ipv4) but I don’t know if this configuration is the best. I’m a noob with this so I would be grateful If someone with more experience could give me an opinion or advise me:
pveversion -v
Sincerely,
Josemi
I’ve got configure network with a public ip and public and private subnets. Apparently it works (with ipv4) but I don’t know if this configuration is the best. I’m a noob with this so I would be grateful If someone with more experience could give me an opinion or advise me:
Code:
### Hetzner Online GmbH - installimage
# All Ip's are fictitious
# Loopback device:
auto lo
iface lo inet loopback
iface lo inet6 loopback
# device: eth0
auto eth0
iface eth0 inet static
address 5.9.49.68
netmask 255.255.255.255
gateway 5.9.49.161
pointopoint 5.9.49.161
iface eth0 inet6 static
address 2a01:4f8:167:5471::2
netmask 128
gateway fe80::1
up sysctl -p
# device: vmbr0
auto vmbr0
iface vmbr0 inet static
address 5.9.49.68
netmask 255.255.255.255
bridge_ports none
bridge_stp off
bridge_fd 0
# Public subnet block
up route add -host 5.9.51.158/32 dev vmbr0
up route add -host 5.9.51.159/32 dev vmbr0
up route add -host 5.9.51.160/32 dev vmbr0
up route add -host 5.9.51.161/32 dev vmbr0
up route add -host 5.9.51.162/32 dev vmbr0
up route add -host 5.9.51.163/32 dev vmbr0
up route add -host 5.9.51.164/32 dev vmbr0
up route add -host 5.9.51.164/32 dev vmbr0
iface vmbr0 inet6 static
address 2a01:4f8:167:5471::2
netmask 64
# device: vmbr192
auto vmbr192
iface vmbr192 inet static
address 192.168.1.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE
# I detected after 3 or 4 hours containers lost connectivity to the internet.
# Adding these lines connectivity comes again.
post-up iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o eth0 -j MASQUERADE
# iface vmbr192 inet6 static
# ...
# I don't know how to configure IPv6 connectivity using IPv6 block offered by Hetzner on vmbr192
pveversion -v
Code:
pve-manager: 4.2-15 (running version: 4.2-15/6669ad2c)
pve-kernel-4.4.13-1-pve: 4.4.13-56
pve-kernel-4.4.8-1-pve: 4.4.8-52
lvm2: 2.02.116-pve2
corosync-pve: 2.3.5-2
libqb0: 1.0-1
pve-cluster: 4.0-42
qemu-server: 4.0-83
pve-firmware: 1.1-8
libpve-common-perl: 4.0-70
libpve-access-control: 4.0-16
libpve-storage-perl: 4.0-55
pve-libspice-server1: 0.12.5-2
vncterm: 1.2-1
pve-qemu-kvm: 2.5-19
pve-container: 1.0-70
pve-firewall: 2.0-29
pve-ha-manager: 1.0-32
ksm-control-daemon: not correctly installed
glusterfs-client: 3.5.2-2+deb8u2
lxc-pve: 1.1.5-7
lxcfs: 2.0.0-pve2
cgmanager: 0.39-pve1
criu: 1.6.0-1
Sincerely,
Josemi
Last edited: