Configuring A Cloud-based Relay With Local Bare Metal Block Producer

Hey everyone. I’ve almost finished setting up my first cloud-based (external) relay. It is fully synced to the mainnet and is receiving both incoming and outgoing connections (4in/22 out currently). However, my local BP shows 3in/4out. The BP is successfully connecting to the external relay outgoing, but it is failing to accept the incoming connection.

I have tried troubleshooting the issue by reconfiguring relay’s the mainnet topology and start relay node files to try both the BP’s IPv4 as well as it’s full public IP. This has not been successful.

This is the first relay I have configured outside of my local network. Do I need to open a port on the block producer machine itself in order to accept incomings from the cloud-relay? Or is there another solution I am missing?

As always, I appreciate the help. Thank you!

P.S. I have already configured the BP’s topology to point at the external relay’s IP on port 6000 and restarted the node. There is no firewall enabled on the external relay. On my local network, port 6000 is already opened for externals and internals on a local relay.

Hi,

  • open the port on Producer to accept connection from your external Relay
  • perhaps u will need to configure port forwarding … traffic from Relay IP on port x forward to Producer_IP on port x (but this is valid only if the local nodes are using a private LAN)

To check the connectivity from Relay to Producer type on Relay

telnet Producer_IP Producer_PORT
u should see connected

Cheers,

2 Likes

Hey Alex, thank you this makes sense. I’ve only ever opened ports on my relay machines before so I wanted to double check before opening port on the block producer. Thank you my friend

1 Like

Hey Alex, would you mind elaborating on your 2nd bullet point? I have tried opening the port on the BP (to match the external relay’s CNodePort) but still no incoming connection (still 3in/4out). For some context:

My 3 local relay nodes are using a private LAN to connect to my BP. My router allows me to select each of my relay machines from a list for port forward. Usually, I select each of my local relays from this list, choose the port, then open it for external and internal connections. My block producer typically remains hidden with no ports open. My BP’s topology points at the iPv4 of each relay and the topology of the local relays point at the IPv4 of the BP.

In the case of this new external relay, I have tried selecting my BP from the list, then port forwarding it on port X, opening it for internal and external connections.

Port X = a port I randomly selected between 6010-6063. Matches my CNodePort

Port X is set as my CNodePort on the external relay, with the mainnet topology and topology pull pointing at my BP’s public IP (I also tried my BP’s IPv4 with the same effect). The BP still shows 3in/4out & port X still registers as closed on yougetsignal. Also, the telnet command shows as unable to connect from the external relay.

Below are key sections of my relay’s files:

Relay topology pull

#!/bin/bash
BLOCKPRODUCING_IP=MY PUBLIC IP
BLOCKPRODUCING_PORT=6000
curl -s -o...

Mainnet topology

{ "resultcode": "201", "networkMagic": "764824073", "ipType":4, "requestedIpVersion":"4", "Producers": [ 
  { "addr": "MY PUBLIC IP, "port": 6000, "valency": 1 } ,
  { "addr": "relays-new.cardano-mainnet.iohk.io", "port": 3001, "valency": 2 } ,

Topology updater

#!/bin/bash
# shellcheck disable=SC2086,SC2034
 
USERNAME=MY USERNAME
CNODE_PORT=PORT X
CNODE_BIN...

start relay node

#!/bin/bash
DIRECTORY=/home/MY USERNAME/cardano-my-node
PORT=6000
...

Env CNodePort is set to port X

Please also note that the firewall is completely disabled on my external relay. After several restarts and reconfigurations today, it is currently at 2in/22out. One of the “in” connections appears to be my block producer, whose topology is pointed at port X and IPv4 of the external relay. The block producer also shows that it has an “out” connection with the external relay.

What can I do to make the BP accept the incoming connection from the external relay? I’ve done a pretty good amount of troubleshooting today and couldn’t get to the bottom of it yet.

Perhaps, instead of opening both the external and internal port on the BP, should I open the external on a local relay and the internal on the block producer? Would this forward the connection through the relay to the BP?

Cheers my friend. Appreciate your help as always

Hi, if u have the BP at home behind a private node u will need a PF (port forward) on ur local router

Should be like this

Traffic from relay IP port (BP port) should be forwarded to BP private IP BP port

1 Like

Alex, thank you for your insight. I got the issue solved and the BP is now accepting incoming and outgoing from the external relay.

Like you said, it was a simple port forward. I opened my BP’s external port to the CNodePort of the cloud relay, and the internal port to 6000.

Its funny when the solution is so simple, yet evades me for so long! :joy:

1 Like

Glad u fixed :beers:

1 Like