Did not match server certificate

Good afternoon dear Gurus. I had such a problem. There is a foreman server. puppet is deployed on it. This server is waiting for a TCP 8140 connection from the outside . The port is open, but when trying to connect from the client to the “puppet agent -t” server, the following error occurs " ```
Server hostname ‘75.168…’ did not match server certificate; expected one of foreman.dom.local.

**Expected outcome:**
the client was able to sign the certificate and got up for service in foreman\puppet
**Foreman and Proxy versions:**
foreman 3.6 SmartProxy 3.4.1
**Foreman and Proxy plugin versions:**

**Distribution and version:**

**Other relevant data:**
<!-- Managed client information, logs from Foreman and/or the Proxy, modified templates, commands issued, etc. For logs and configuration files, please use "preformatted text" from the toolbar to ensure proper formatting. -->

You have an IP address set in puppet.conf for server

server = 75.168...

but the IP address is not part of the certificate of the puppet server, thus it cannot verify the server certificate.

Don’t use the IP address but the server name to connect to the puppet server.

the problem is that you won’t be able to use the name, since the connection goes through port forwarding, maybe there are other options?

Thank you all, the issue has been resolved, I registered the address in the hosts on the client)