Closed antonc42 closed 1 year ago
What does iptables-save show and what does iptables -v show?
Also if you reinstall nft temporarily what does "nft list ruleset" show? I suspect you have nft rules still active (either from nft or from the iptables-nft shim)
You were correct. There were some IPv6 rules in the nft ruleset. I forgot to do update-alternatives
on ip6tables
. Everything appears to be working now. Sorry for the trouble, and thanks for all the great work on LXD!
Required information
Issue description
On a new Kubuntu 22.04 install, I disabled and removed nftables and ufw. I'm using plain iptables. After installing the LXD snap, it is not implementing any automatic iptables rules. Therefor the containers do not get DHCP addresses or get NATed and cannot communicate on the network. It appears that for some reason LXD is chosing the 'nftables' firewall driver instead of 'xtables'. From looking at some other discussion threads and the driver code, it appears that it should not do this if the 'nft' command is not available on the system, which it is not.
Steps to reproduce
Chain FORWARD (policy DROP 0 packets, 0 bytes) pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 112K packets, 31M bytes) pkts bytes target prot opt in out source destination
(rest of tables redacted)
lxc info | grep firewall: firewall: nftables
sudo find / -name nft /snap/lxd/24846/bin/nft
sudo snap set lxd daemon.debug=true sudo systemctl reload snap.lxd.daemon