Circuit Relay Server

Hello,

I’m brazilian student and i’m researching about the ipfs protocol.
My problem is classic, NAT and firewalls in the network private.

Anyway, i have a linux server with public address and I would like to configure it as a RELAY node to connect two computers behind NAT. It’s possible ?

In my studies, I didn’t find anything that shows me how to do this, are relay servers not available to the community?

Best Regards,
Rafael

EnableRelayHop => true
EnableAutoRelay => false

on your public node.

EnableRelayHop => false
EnableAutoRelay => true

on your NATed nodes.

Add your public node as bootstrapper for the others. ipfs id on the NATed hosts should show a p2p-circuit address through the public node. If it does not automagically (honestly, don’t know), then it could be added manually to Announce addresses in the NATed nodes configuration.

I have not tried this myself, just recounting from memory.

Hello Hector,

Thanks for the good response. But in my test, in the two node behind NAT not have communication. In my public node, the EnableRelayHop is active and my two NAT nodes the EnableAutoRelay is active. But don’t have communication.
In my two computers with NAT, my public address has announced in bootstrap and “Address.Announce”. I don’t know what my mistake was.

Another question, the Address.Announced have to be in NAT nodes or in the public node ?

Best Regards

Can you post ipfs id from your nodes?

I will try to get a configuration that works.

This is in my computer with NAT

 ipfs id
    {
            "ID": "12D3KooWSyf3mCo8Hgqr5PKoo5c6AaqCPDDpW68D5u26meg1dTsS",
            "PublicKey": "CAESIP73/arJj6sda7s37jZiXQJ514A5UCnyQSO3do+8lP5V",
            "Addresses": [
                    "/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWSyf3mCo8Hgqr5PKoo5c6AaqCPDDpW68D5u26meg1dTsS",
                    "/ip4/138.204.x.x/tcp/4001/p2p/12D3KooWSyf3mCo8Hgqr5PKoo5c6AaqCPDDpW68D5u26meg1dTsS",
                    "/ip4/192.168.88.248/tcp/4001/p2p/12D3KooWSyf3mCo8Hgqr5PKoo5c6AaqCPDDpW68D5u26meg1dTsS",
                    "/ip6/::1/tcp/4001/p2p/12D3KooWSyf3mCo8Hgqr5PKoo5c6AaqCPDDpW68D5u26meg1dTsS",
                    "/ip6/::1/udp/4001/quic/p2p/12D3KooWSyf3mCo8Hgqr5PKoo5c6AaqCPDDpW68D5u26meg1dTsS"
            ],
            "AgentVersion": "go-ipfs/0.7.0/",
            "ProtocolVersion": "ipfs/0.1.0",
            "Protocols": [
                    "/ipfs/bitswap",
                    "/ipfs/bitswap/1.0.0",
                    "/ipfs/bitswap/1.1.0",
                    "/ipfs/bitswap/1.2.0",
                    "/ipfs/id/1.0.0",
                    "/ipfs/id/push/1.0.0",
                    "/ipfs/lan/kad/1.0.0",
                    "/ipfs/ping/1.0.0",
                    "/libp2p/autonat/1.0.0",
                    "/libp2p/circuit/relay/0.1.0",
                    "/p2p/id/delta/1.0.0",
                    "/x/"
            ]

And how about the public one?

My public node is a Ubuntu Server

ipfs id
{
        "ID": "12D3KooWMZGJMrcm6X2Rf8UbWpUJKhnJKbzpHR63k75HubF5akNv",
        "PublicKey": "CAESIK5t5S3S0iEkwd/p79PqNfHAr4DmMEXgfPnIcLZkDpqr",
        "Addresses": null,
        "AgentVersion": "go-ipfs/0.7.0/ea77213e3",
        "ProtocolVersion": "ipfs/0.1.0",
        "Protocols": null
}

“Addresses”: null,

Is ipfs running?

Sorry by my error

{
        "ID": "12D3KooWMZGJMrcm6X2Rf8UbWpUJKhnJKbzpHR63k75HubF5akNv",
        "PublicKey": "CAESIK5t5S3S0iEkwd/p79PqNfHAr4DmMEXgfPnIcLZkDpqr",
        "Addresses": [
                "/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWMZGJMrcm6X2Rf8UbWpUJKhnJKbzpHR63k75HubF5akNv",
                "/ip4/127.0.0.1/udp/4001/quic/p2p/12D3KooWMZGJMrcm6X2Rf8UbWpUJKhnJKbzpHR63k75HubF5akNv",
                "/ip4/138.204.x.x/tcp/4001/p2p/12D3KooWMZGJMrcm6X2Rf8UbWpUJKhnJKbzpHR63k75HubF5akNv",
                "/ip4/138.204.x.x/udp/4001/quic/p2p/12D3KooWMZGJMrcm6X2Rf8UbWpUJKhnJKbzpHR63k75HubF5akNv",
                "/ip6/::1/tcp/4001/p2p/12D3KooWMZGJMrcm6X2Rf8UbWpUJKhnJKbzpHR63k75HubF5akNv",
                "/ip6/::1/udp/4001/quic/p2p/12D3KooWMZGJMrcm6X2Rf8UbWpUJKhnJKbzpHR63k75HubF5akNv"
        ],
        "AgentVersion": "go-ipfs/0.7.0/ea77213e3",
        "ProtocolVersion": "ipfs/0.1.0",
        "Protocols": [
                "/ipfs/bitswap",
                "/ipfs/bitswap/1.0.0",
                "/ipfs/bitswap/1.1.0",
                "/ipfs/bitswap/1.2.0",
                "/ipfs/id/1.0.0",
                "/ipfs/id/push/1.0.0",
                "/ipfs/kad/1.0.0",
                "/ipfs/lan/kad/1.0.0",
                "/ipfs/ping/1.0.0",
                "/libp2p/autonat/1.0.0",
                "/libp2p/circuit/relay/0.1.0",
                "/p2p/id/delta/1.0.0",
                "/x/"
        ]
}