One NIC in this new hetzner ubuntu 20.04.3 bare metal setup.
Few instances are running and i wanted to check out the routed way and ordered one more IP.
Since the default profile is lxdbr2, does it maybe conflict with routed and give this odd error?
lxc launch ubuntu:focal myrouted --profile default --profile routed_mail
Creating myrouted
Starting myrouted
Error: Failed to start device "eth0": Error setting up reverse path filter: Failed to run: ip6tables -w -t raw -I PREROUTING -m rpfilter --invert -i veth12a360d7 -j DROP -m comment --comment generated for LXD container myrouted (eth0) rpfilter: Could not open socket to kernel: Address family not supported by protocol
Try `lxc info --show-log local:myrouted` for more info
lxc info --show-log local:myrouted
Name: myrouted
Status: STOPPED
Type: container
Architecture: x86_64
Created: 2022/01/16 16:38 CET
Configs done:
ipv6 is disabled at boot via kernel cmd line options.
net.ipv4.conf..forwarding=1 is set as per Handbook. in sysctl.conf
net.ipv4.conf.enp0s31f6.forwarding=1
config:
user.network-config: |
version: 2
ethernets:
eth0:
addresses:
- [ Public IP 2 ]/32
ipv6.address: none
ipv6.firewall: "false"
nameservers:
addresses:
- 185.12.64.1
- 185.12.64.2
- 8.8.8.8
- 8.8.4.4
search: []
routes:
- to: 0.0.0.0/0
via: 169.254.0.1
on-link: true
description: Default LXD profile
devices:
eth0:
ipv4.address: [ Public IP 2 ]
nictype: routed
parent: enp0s31f6
type: nic
name: routed_mail
used_by: []
below two lines had no effect but i had to try
ipv6.address: none
ipv6.firewall: “false”
lxc profile show default
config: {}
description: Default LXD profile
devices:
eth0:
name: eth0
network: lxdbr2
type: nic
root:
path: /
pool: hdd
type: disk
name: default
used_by:
- /1.0/instances/haproxy
- /1.0/instances/foro
- /1.0/instances/db
- /1.0/instances/nextcloud
- /1.0/instances/onflyoffice
- /1.0/instances/c1
- /1.0/instances/myipvlan
/etc/network/interfaces
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
auto enp0s31f6
iface enp0s31f6 inet static
address [ Public IP 1]
netmask 255.255.255.192
gateway 1XX.YYY.XZX.1
pointpoint 1XX.YYY.XZX.1 # same as gateway
dns-nameserver 185.12.64.1 185.12.64.2 8.8.8.8 8.8.4.4
#broadcast 1XX.YYY.XZX.42
#additional IP
up ip addr add [ Public IP 2]/32 dev enp0s31f6
down ip addr del [ Public IP 2]/32 dev enp0s31f6
/etc/dnsmasq.conf does not exist
ps aux | grep dnsmasq
lxd 2433 0.0 0.0 7204 3748 ? Ss 13:30 0:01 dnsmasq --keep-in-foreground --strict-order --bind-interfaces --except-interface=lo --pid-file= --no-ping --interface=lxdbr2 --dhcp-rapid-commit --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address=10.0.0.1 --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/snap/lxd/common/lxd/networks/lxdbr2/dnsmasq.leases --dhcp-hostsfile=/var/snap/lxd/common/lxd/networks/lxdbr2/dnsmasq.hosts --dhcp-range 10.0.0.2,10.0.0.254,1h -s lxd --interface-name _gateway.lxd,lxdbr2 -S /lxd/ --conf-file=/var/snap/lxd/common/lxd/networks/lxdbr2/dnsmasq.raw -u lxd -g lxd
jim 452151 0.0 0.0 8504 2516 pts/1 S+ 19:49 0:00 grep --color=auto dnsmasq
journactl has no errors
lxc config show --expanded myrouted
architecture: x86_64
config:
image.architecture: amd64
image.description: ubuntu 20.04 LTS amd64 (release) (20220111)
image.label: release
image.os: ubuntu
image.release: focal
image.serial: "20220111"
image.type: squashfs
image.version: "20.04"
user.network-config: |
version: 2
ethernets:
eth0:
addresses:
- [ Public IP 2 ]/32
ipv6.address: none
ipv6.firewall: "false"
nameservers:
addresses:
- 185.12.64.1
- 185.12.64.2
- 8.8.8.8
- 8.8.4.4
search: []
routes:
- to: 0.0.0.0/0
via: 169.254.0.1
on-link: true
volatile.apply_template: create
volatile.base_image: ced57a80f2b761c3cdab867c2296b801c6adfe521f811bacdd61410da4bc2734
volatile.eth0.hwaddr: 00:16:3e:19:b6:0a
volatile.eth0.name: eth0
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.uuid: 635898b9-e809-47f5-b579-fee6d8fdce7a
devices:
eth0:
ipv4.address: [ Public IP 2 ]
nictype: routed
parent: enp0s31f6
type: nic
root:
path: /
pool: hdd
type: disk
ephemeral: false
profiles:
- default
- routed_mail
stateful: false
description: ""
…
Went ahead and tested ipvlan profile which works with the public IP but thought i post this routed error, since only thing that shows ipv6 seems to be the lxd dnsmasq.