tomeshnet / mesh-orange

A small ramdisk system running modern Debian to support mesh networking on ARM single-board computers
https://tomeshnet.github.io/mesh-orange/
GNU General Public License v2.0
39 stars 7 forks source link

cjdroute.conf file, CJDNS establishment, Noob question #12

Open Sultan91 opened 7 years ago

Sultan91 commented 7 years ago

Hello, I've just built an image booted up my orangePi for the first time. Could you give some advice on how to connect to Hyperboria for instance, 'cause I do not see any cjdroute.conf configuration files or any others.

Thanks

benhylau commented 7 years ago

Installation of cjdns on the image is still work in progress, but you can do it manually using this as an example? https://github.com/tomeshnet/prototype-cjdns-pi/blob/master/scripts/install2#L80-L115

Basically:

  1. Get git and nodejs (cjdns needs nodejs to build)
  2. Clone cjdns
  3. Build it
  4. Copy over the systemd files
  5. Reboot

As for connecting to Hyperboria, you'd need to add a peer. Public ones are here: https://peers.fc00.io

Sultan91 commented 7 years ago

Yes that's the thing. I did the ordinary cjdns installation from https://docs.meshwith.me/install/debian-jessie.html and other sites. Logs say that cjdns up and running (active state) however I cannot manage connection to any public peers or even the local ones in cjdroute.conf. (was inserting credentials in UDPinterface: connectTO and ETHinterface connectTO as well)

benhylau commented 7 years ago

What does peerStats say? Does it at least see the peer entry?

By the way, did you reboot the device or restart the service? From what I understand there is no persistence across reboots. My Step 5 above is incorrect.

Sultan91 commented 7 years ago

/cjdns/tools$ ./peerStats v0.0000.0000.0000.0019.guqq5h8p9w6mtxfuh1k9hl1yqljpqqnvj2umcd1cuvx64vbuqhu0.k UNRESPONSIVE in 0kb/s out 0kb/s "outer" v0.0000.0000.0000.0017.sn6lbr223vznkv4hr1prgxzcs7gw8fmb222huprd8zyfv617du90.k UNRESPONSIVE in 0kb/s out 0kb/s "outer" v0.0000.0000.0000.0015.pvtgk72f25urxqywxdzfk12t2b4kuhtrc2f1mx58rtpx0wzbll90.k UNRESPONSIVE in 0kb/s out 0kb/s "outer" v0.0000.0000.0000.0013.h8p5609d03yt1fzu3dlky3g1kt3bq8gffhnsbq2z1dg8j46rt4w0.k UNRESPONSIVE in 0kb/s out 0kb/s "outer" Those credentials I wrote in UDPInterface for ipv4, but didn't say nothing about one ipv6 connection

Sultan91 commented 7 years ago

Maybe you have some working connections, so that i could check it?)

benhylau commented 7 years ago

Hmm... check iptables to make sure the ports aren't blocked? I haven't tried cjdns with this image. Will check it out next week.

Sultan91 commented 7 years ago

No worries, i've found some working peers thanks

benhylau commented 7 years ago

Oh you got it to work? It was an issue with the peers then?

Sultan91 commented 7 years ago

Yep! I was able to ping some hyperboria sites, However don't know how to configure browser (firefox) to be able to connect to the sites.

benhylau commented 7 years ago

I assume that's Firefox on your laptop connected to the mesh orange AP? You should just type in the domain or IPv6 and it will work if the orange zero is configured properly.

If that doesn't work you'd need to configure the mesh orange to NAT the AP's cjdns traffic to the cjdns tun0 device. Something like this: https://github.com/tomeshnet/prototype-cjdns-pi/blob/master/scripts/hostapd/nat.sh

The interface names are probably different here.

Sultan91 commented 7 years ago

Ok I will try, thanks

Sultan91 commented 7 years ago

Could you explain the one thing I am struggling with: I need to deploy local mesh network running cjdns on all pi zeros and one node having internet gateway. Apart from installed cjdns software what other configurations are required. (e.g. do we need actually establish wifi mesh and install cjdns on top of it?)

benhylau commented 7 years ago

Your nodes will first need a way of communicating with each other regardless of internet gateway, via ad-hoc or 802.11s mesh point. Then cjdns will bind to those interfaces and route. So each Pi zero needs an adapter that supports one of those modes, such as the ones listed in the first step here: https://github.com/tomeshnet/prototype-cjdns-pi/blob/master/README.md#set-up Many other devices support these modes and you can find them with iw list.

Next you need to set up one internet gateway node (assigns IP and pins clients' cjdns public keys to allow exiting through) and configure each client to exit through the gateway (pin gateway node's cjdns public key in the IP tunnel section). There is some information and links here: https://github.com/tomeshnet/mesh-isp

darkdrgn2k commented 6 years ago

Is this still an open issue?

benhylau commented 6 years ago

Yes because cjdns is not bundled in, until we sort out the .deb install. Working on it at the moment.