[Solved] Lanonly On Android Still Not Working


oko

Recommended Posts

Hello Developers,

 

there's still an issue with LANonly Sync and (at least) the Android App.

 

I have a few windows-installations (mixed 1.3.109 and 1.4.93) and two android-nodes (both 1.4.56).

 

On the windows-nodes there are some shares, all with only "search LAN" checked, no relay, no DHT etc. The windows-nodes see each other more or less without problems (i have to restart sometimes).

 

One of the android-nodes also sees the windows machines, this is the one on a "normal" device, i.e. no root, no modifications and therefore no constraints limiting it's connectivity.

 

On the second android-machine i have cyanogenmod installed and i use AFWall to allow only local-traffic for BTSync.

This node is not able to see any of the others. In the firewall-log i see many attempts to connect to the outside of course without success. If, for test purposes, i allow these connections (even for a fraction of a minute) then it sees the other nodes for a few hours.

 

What does this tell me?

BTSync dose not work (as suggested) without connecting to external servers.

This is an absolute "no-go" for an application which promises security and privacy.

I don't want ANY information leaving my local network.

 

Devs, please comment on this and correct it.

And if you are working on it, please also make "LAN only" the default for new shares. It's also not acceptable if BTSync announces new data to the world during the short timeframe i need to remove the checkmarks...

 

 

Regards

    Olaf

Link to comment
Share on other sites

Hi Olaf,

 

Sync is suitable to work without external servers. The fact it has to turn to tracker server to discover your other devices simply indicates that LAN discovery mechanism (which is built around multicast packets) is not working in your environment by some reason.

 

I suggest checking several things which may prevent your cyanogen phone from connection to other local Sync entities:

1) Make sure that multicast traffic over UDP port 3838 is allowed in your AFWall. Note, that target Ip for multicast traffic is 239.192.0.0 (which might fall out of your definition of local network).

2) Make sure that AFWall does not block IGMP - which might be used by Android to let your router know about new multicast group.

3) Make sure that your outer actually routes multicast: many of cheap solutions does not route multicast packets from wifi to wifi (though, wifi to wired and vice versa is okay).

4) Make sure that your IPs in local network belong to IP ranges defined in RFC1918 (briefly - 10.x.x.x, 172.0.x.x - 172.31.x.x, 192.168. x.x)

 

If all of the above does not help and you are owner of your router and can configure it - you can use next workaround:

1. Set up a static IP for your cyanogen phone

2. Put it into the "Predefined hosts" of your PC.

 

And if you are working on it, please also make "LAN only" the default for new shares. It's also not acceptable if BTSync announces new data to the world during the short timeframe i need to remove the checkmarks...

In 1.4 release you can set the "folder_defaults.use_tracker", "folder_defaults.use_relay" preferences in Advanced preferences so all your freshly created folders won't attempt to connect to Internet from the very moment of creation. We don't want to make it default after app installation as it greatly reduces usability of a product.

 

Though, the settings are not yet available in mobile UI. We plan to implement it in future.

Link to comment
Share on other sites

Hi Admin,

 

thanks for your answer and sorry for my somewhat rude post. I just don't like if things which worked before "suddenly" stop to do so.

 

Your post led me to the solution.

It was indeed blocked multicast-traffic. Afwall defines "local" as same network-address (i.e. 192.168.2.0/24) and blocks everything else.

I now added a custom rule allowing your multicast-traffic and now LAN discovery works again.

 

Here's the custom-script for Afwall:

IPTABLES=/system/bin/iptables$IPTABLES -A "afwall-wifi-fork" --destination "239.192.0.0/16" -j "afwall-wifi-lan"

Hope this might help others, too...

 

Regards

Olaf

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.