rafalap
February 3, 2021, 4:40pm
#1
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
hector
February 3, 2021, 10:09pm
#2
# The go-ipfs config file
The go-ipfs config file is a JSON document located at `$IPFS_PATH/config`. It
is read once at node instantiation, either for an offline command, or when
starting the daemon. Commands that execute on a running daemon do not read the
config file at runtime.
## Profiles
Configuration profiles allow to tweak configuration quickly. Profiles can be
applied with `--profile` flag to `ipfs init` or with the `ipfs config profile
apply` command. When a profile is applied a backup of the configuration file
will be created in `$IPFS_PATH`.
The available configuration profiles are listed below. You can also find them
documented in `ipfs config profile --help`.
- `server`
Disables local host discovery, recommended when
This file has been truncated. show original
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.
rafalap
February 5, 2021, 7:30pm
#3
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
hector
February 5, 2021, 8:26pm
#4
Can you post ipfs id from your nodes?
I will try to get a configuration that works.
rafalap
February 6, 2021, 1:18am
#5
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/"
]
hector
February 6, 2021, 2:10am
#6
And how about the public one?
rafalap
February 6, 2021, 11:45am
#7
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
}
rafalap
February 6, 2021, 12:34pm
#9
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/"
]
}