How Can I Enable HTTPS on Port 4341 and Configure Certificates for an HVR Agent?
Question
How can I verify connectivity between an HVR Hub and HVR Agent, enable secure HTTPS communication on port 4341, and configure certificates?
Environment
- Product: HVR 6
- Components: HVR Hub, HVR Agent
- OS: Linux and Unix-based systems
Answer
Prerequisites
- Network connectivity between the HVR Hub and HVR Agent.
- Required ports are open and not blocked by firewalls.
- OpenSSL is installed.
- HVR binaries installed and available in the environment.
Verify port reachability
Confirm that the configured port is reachable from the HVR Hub to the HVR Agent:
- Verify that the correct port is configured for the channel.
- Confirm that the port is open.
- Check that firewall rules are not blocking traffic between the Hub and Agent.
Test connectivity using hvragenttest
From the machine that needs to connect to the HVR Agent, run the following hvragenttest command:
hvragenttest <agent_host> <agent_port>
This command verifies that the Hub can communicate with the Agent.
Enable HTTPS on port 4341 using certificates
Generate or obtain certificates
Use OpenSSL to generate a private key and a self-signed certificate:
openssl genpkey -algorithm RSA -out private.key
openssl req -new -key private.key -x509 -days 365 -out certificate.crt
You can also use certificates issued by a trusted Certificate Authority.
Configure certificates
For the HVR Hub, copy the certificate files to the HVR configuration directory:
cp private.key $HVR_CONFIG/etc/cert/hvrhubserver.priv_key cp certificate.crt $HVR_CONFIG/etc/cert/hvrhubserver.pub_cert
For the HVR Agent, configure the agent to use the certificates:
hvragentconfig Agent_Server_Public_Certificate=@certificate.crt Agent_Server_Private_Key=@private.key
Configure the HTTPS port
Configure the HVR Hub Server to use HTTPS on port 4341:
hvrhubserverconfig HTTPS_Port=4341
Start the HVR Hub Server:
hvrhubserver -d
Set the HTTPS port with hvrhubserverconfig. The hvrhubserver command does not accept a port argument.
Verify that port 4341 is listening
Run the following command:
netstat -an | grep 4341
Confirm that port 4341 is in a LISTEN state.
Restart services
After making configuration changes, restart the HVR Hub and HVR Agent services for the changes to take effect.