Chef management showing ip of public facing interface instead of private

Hello all,

Im having issues with my freshly setup chef server and nodes where chef manage shows my nodes are registering on the public facing network interface instead of the private network interface.

Im not sure how to resolve this

Not 100% sure what you're asking, but I'm taking a guess based on the picture you posted.

Ohai collects data for all of the network interfaces on each host, but it picks one "primary" address based on detecting which one has the default route. All the other interfaces are there in the node data, just ohai has to pick one to be node["ipaddress"]. Everything else is available under node["network"]["interfaces"]

Also, if you’re using some sort of cloud platform then remember to put the
necessary hints file in its place so that ohai can work its magic, e.g. if
you are on ec2 then make sure during bootstrap the file
/etc/chef/ohai/hints/ec2.json is created.

As I recall I had to do this to get the public IP/hostname as the primary
node address for ec2 instances that had public IPs.

I am using a self hosted virtual environment. Each host has multiple network interfaces but the ones I am concerned with are the interfaces the VM’s use, Public - internally unroutable and nat’d to internet and Private - internal networks.

When I bootstrap a vm it bootstraps just fine. when I look in chef manage it shows it connected to eth1 the 192. which is the public interface. It is not accessible from our internal network. I need the node to register on eth0, the 10. private network interface in order for the chef server to be able to interact with the nodes.

Is there a way for me to make the nodes use the private interface?

As I explained earlier, the ipaddress shown in the console has nothing to do with the address that chef uses to talk to the server. Chef communicates over HTTP and follows the normal DNS/routing process to communicate to the server. As part of Chef Client’s normal operation, it collects information about all of the interfaces on the host, and picks a “default” one based on which one has the default route. The address of that interface is assigned to node["ipaddress"] and this is what is shown in the management console.