Lxc remote -> connection refused

I am trying to connect to a LXD remote from another machine. ufw is disabled. When I do: lxc remote add babylon

I get this error:

Error: Get "": Unable to connect to: ([dial tcp connect: connection refused])

I run this on the server: lxc monitor --type=logging --pretty. Which gives me this output:

DEBUG  [2022-08-17T12:04:41Z] Heartbeat updating local raft members         members="[{{1 voter} babylon}]"
DEBUG  [2022-08-17T12:04:41Z] Starting heartbeat round                      local="" mode=normal
DEBUG  [2022-08-17T12:04:41Z] Completed heartbeat round                     duration=4.091455ms local=""

sudo netstat -ltpn | grep lxd gives me this:

tcp        0      0*               LISTEN      3436/lxd

and curl gives me this:

curl: (7) Failed to connect to port 8443 after 12 ms: Connection refused

lxc config show:


I have no added IPTABLES rules.

But why I cannot get to add this remote?

Where are you trying to connect from?

I am connecting in the same network from a macos m1 machine.

Does curl connect when run from the LXD host itself?

You’ve most likely got a firewall setup without knowing it.

What does sudo nft list ruleset and sudo iptables-save show?

As always, you are right. firewalld had a couple of rules added, and I was not aware. iptable chains are a mystery to me.

1 Like