How to setup V1 Relay in the new config

yes, of course
“ID”: “12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV”,
“PublicKey”: “CAESIJaGVFy2Ff5wVSUQccqpCj3ZOyXr192rRfVSV+r8pkC6”,
“Addresses”: [
“/ip4/125.253.126.88/tcp/4001/p2p/12D3KooWAAm17JYqc7fM5qsZAdnkKSqmQF7bqsCKAQ1tww5RQTCA/p2p-circuit/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV”,
“/ip4/125.253.126.88/udp/4001/quic/p2p/12D3KooWAAm17JYqc7fM5qsZAdnkKSqmQF7bqsCKAQ1tww5RQTCA/p2p-circuit/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV”,
“/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV”,
“/ip4/127.0.0.1/udp/4001/quic/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV”,
“/ip4/192.168.1.233/tcp/4001/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV”,
“/ip4/192.168.1.233/udp/4001/quic/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV”,
“/ip4/54.169.103.175/tcp/4001/p2p/12D3KooWR9zzY5ZZnKyvwm5cKTxexPFQ4DZCypAtqZ1sHDm2GtqP/p2p-circuit/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV”,
“/ip4/54.169.103.175/udp/4001/quic/p2p/12D3KooWR9zzY5ZZnKyvwm5cKTxexPFQ4DZCypAtqZ1sHDm2GtqP/p2p-circuit/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV”,
“/ip6/64:ff9b::7dfd:7e58/tcp/4001/p2p/12D3KooWAAm17JYqc7fM5qsZAdnkKSqmQF7bqsCKAQ1tww5RQTCA/p2p-circuit/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV”,
“/ip6/64:ff9b::7dfd:7e58/udp/4001/quic/p2p/12D3KooWAAm17JYqc7fM5qsZAdnkKSqmQF7bqsCKAQ1tww5RQTCA/p2p-circuit/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV”,
“/ip6/::1/tcp/4001/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV”,
“/ip6/::1/udp/4001/quic/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV”
],

Hope you can help us

It works for me, but that’s probably because my node is reachable, so when I connect to your “hidden” node, it doesn’t really have to establish a “hole punch”, it just calls mine back. Anyway, here is the run, and you can see at the end that it lists two connections, the relay one, and then the direct one that ipfs id caused (and you can see that the direct one is inbound, meaning your node called me). So, your problem is definitely the inability of your two hidden nodes to establish a “hole punch” connection.

>  ~ ipfs swarm connect /ip4/54.169.103.175/tcp/4001/p2p/12D3KooWR9zzY5ZZnKyvwm5cKTxexPFQ4DZCypAtqZ1sHDm2GtqP
connect 12D3KooWR9zzY5ZZnKyvwm5cKTxexPFQ4DZCypAtqZ1sHDm2GtqP success
>  ~ ipfs id 12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV
{
	"ID": "12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV",
	"PublicKey": "CAESIJaGVFy2Ff5wVSUQccqpCj3ZOyXr192rRfVSV+r8pkC6",
	"Addresses": [
		"/ip4/125.253.126.88/tcp/4001/p2p/12D3KooWAAm17JYqc7fM5qsZAdnkKSqmQF7bqsCKAQ1tww5RQTCA/p2p-circuit/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV",
		"/ip4/125.253.126.88/udp/4001/quic/p2p/12D3KooWAAm17JYqc7fM5qsZAdnkKSqmQF7bqsCKAQ1tww5RQTCA/p2p-circuit/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV",
		"/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV",
		"/ip4/127.0.0.1/udp/4001/quic/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV",
		"/ip4/192.168.1.233/tcp/4001/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV",
		"/ip4/192.168.1.233/udp/4001/quic/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV",
		"/ip4/54.169.103.175/tcp/4001/p2p/12D3KooWR9zzY5ZZnKyvwm5cKTxexPFQ4DZCypAtqZ1sHDm2GtqP/p2p-circuit/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV",
		"/ip4/54.169.103.175/udp/4001/quic/p2p/12D3KooWR9zzY5ZZnKyvwm5cKTxexPFQ4DZCypAtqZ1sHDm2GtqP/p2p-circuit/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV",
		"/ip6/64:ff9b::7dfd:7e58/tcp/4001/p2p/12D3KooWAAm17JYqc7fM5qsZAdnkKSqmQF7bqsCKAQ1tww5RQTCA/p2p-circuit/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV",
		"/ip6/64:ff9b::7dfd:7e58/udp/4001/quic/p2p/12D3KooWAAm17JYqc7fM5qsZAdnkKSqmQF7bqsCKAQ1tww5RQTCA/p2p-circuit/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV",
		"/ip6/::1/tcp/4001/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV",
		"/ip6/::1/udp/4001/quic/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV"
	],
	"AgentVersion": "kubo/0.15.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",
		"/libp2p/circuit/relay/0.2.0/stop",
		"/libp2p/dcutr",
		"/p2p/id/delta/1.0.0",
		"/x/"
	]
}

>  ~ ipfs swarm peers --direction | grep 12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV                
/ip4/54.169.103.175/tcp/4001/p2p/12D3KooWR9zzY5ZZnKyvwm5cKTxexPFQ4DZCypAtqZ1sHDm2GtqP/p2p-circuit/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV outbound
/ip6/2405:4802:90d2:2b80:cddc:e33a:7aa1:c782/udp/4001/quic/p2p/12D3KooWKwx8DRkgFXisEyZQLfu6cPJNrFu77cxEyTY4eeNk9wQV inbound
>  ~ 

You are probably going to need port forwarding on one of your hidden nodes if hole punch can’t work for you.

Our problem is: the user/app can get any file (CID) that other user/app add/pin no matter where they are. Do you think this problem can be solved using ipfs - hole punching v2 or any suggestions?

I’m not clear on why hole punching doesn’t work for you as it stands, it should. The only other solution is to set up port forwarding (which is always better anyway).

1 Like

Yes, do you have any docs that can help us setup port forward in ipfs and the app. Basically, we want to get the file - directly from other computer via ipfs :slight_smile:

Unfortunately, port forwarding is set up on your router, so you need to refer to your router’s manual.

1 Like

I think I found the problem : swarm listens on ipv6 by default but that computer does not have ipv6 so the get hang. My question:

  1. Can we config always using ipv4 or
  2. Force Swarm listening on ipv4 (I tried “/ip4/0.0.0.0/tcp/4001” in Addresses.Swarm but it failed to listen) any idea

If you look at the run I gave you, your node called me using IPv6, so I’d say it has IPv6 support :grimacing:

Anyway, if you simply remove the ip6 lines from the swarm (and leave in the ip4 lines), it will only listen on IPv4.

When trying to open a connection, the caller will actually try all possible addresses in parallel and use the first one that connects.