prosciutboy

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by prosciutboy

  1. Hi RomanZ, your advice is good but I don't really know to check how the DNS resolver works... and I wonder if there is any easy way to modify the way it works. Anyway, I manage to bypass this issue and I can now sync with peers outside my network ! As already stated, the problem is due to the DNS Poisoning performed by the Chinese Great Firewall (the famously terrible GFW). To prevent this alteration, I compiled and configured DNSCrypt on my RPi and the IP of t.usyncapp.com is now resolved perfectly. That might be useful for others so I will write a tutorial in the next days. Thanks again to dms2013 and RomanZ for their help.
  2. In fact the root DNS in China redirect to wrong IPs for "non harmonized" servers (such as btsync trackers it seems). My hosts is as follows cat /etc/hosts::1 raspbmc localhost6.localdomain6 localhost6127.0.1.1 raspbmc127.0.0.1 localhost::1 localhost ip6-localhost ip6-loopbackfe00::0 ip6-localnetff00::0 ip6-mcastprefixff02::1 ip6-allnodesff02::2 ip6-allrouters# btsync tracker and relay IP54.225.92.50 t.usyncapp.com54.225.196.38 t.usyncapp.com54.225.100.8 t.usyncapp.com54.225.196.38 t.usyncapp.com67.215.231.242 r.usyncapp.com67.215.229.106 r.usyncapp.com23.21.106.161 syncapp.bittorrent.comI don't see any problem in my /etc/hosts (but I don't understand too much the ipv6 stuff). Do you see anything wrong? On my linux I am sure btsync get the tracker IP from /etc/hosts but I am wondering whether btsync for ARM uses DNS service to connect to tracker. If it is the case it would explain why modifying /etc/hosts on RPi does not have any effect on btsync.
  3. I edited resolv.conf to use google DNS (8.8.8.8 and 8.8.4.4), the tracker IP is now sometimes 37.61.54.158 sometimes 59.24.3.173. Moreover this is what I get with nslookup. pi@raspbmc:~$ nslookup t.usyncapp.comServer: 8.8.8.8Address: 8.8.8.8#53Non-authoritative answer:Name: t.usyncapp.comAddress: 59.24.3.173pi@raspbmc:~$ nslookup t.usyncapp.comServer: 8.8.8.8Address: 8.8.8.8#53Non-authoritative answer:Name: t.usyncapp.comAddress: 37.61.54.158
  4. After updating btsync to 1.2.92 and an apt-get upgrade of the RPi, I see some improvements: I get access to your share (hello file contents the world) and I even see a peer connected to the same shared directory. But tracker IP in the log is always the wrong address 59.24.3.173. Really weird...
  5. Your are right, the IP does not seem to be a tracker, moreover I cannot ping it. My /etc/hosts forces the following IPs: $ cat /etc/hosts# btsync tracker and relay IP54.225.92.50 t.usyncapp.com54.225.196.38 t.usyncapp.com54.225.100.8 t.usyncapp.com54.225.196.38 t.usyncapp.com67.215.231.242 r.usyncapp.com67.215.229.106 r.usyncapp.comA ping to t.usyncapp.com lead to a working IP $ ping t.usyncapp.comPING t.usyncapp.com (54.225.92.50) 56(84) bytes of data.64 bytes from t.usyncapp.com (54.225.92.50): icmp_req=1 ttl=35 time=298 ms64 bytes from t.usyncapp.com (54.225.92.50): icmp_req=2 ttl=35 time=292 ms^C--- t.usyncapp.com ping statistics ---2 packets transmitted, 2 received, 0% packet loss, time 1001msrtt min/avg/max/mdev = 292.746/295.641/298.537/2.946 msI did a test, in case /etc/hosts does not force any t.usyncapp.com IP a ping to t.usyncapp.com points to 59.24.3.173 (the wrong IP I see in my sync.log). So what we should understand is why btsync does not point to the IP which are forced in the /etc/hosts? Is there any DNS cache in btsync? I rebooted the Raspberry Pi but it does not change anything. Very strange issue...
  6. I think you are right a part of the problem comes from my firewall on the raspberry pi. I flushed the iptables rules and the logs looks better: ...Got 2 relay ips[20140321 22:59:58.171] ip 67.215.231.242:3000[20140321 22:59:58.171] ip 67.215.229.106:3000[20140321 22:59:58.197] Got 1 tracker ips[20140321 22:59:58.197] ip 59.24.3.173:3000[20140321 22:59:58.197] Got 1 tracker ips[20140321 22:59:58.197] ip 59.24.3.173:3000[20140321 22:59:58.222] Got 1 tracker ips[20140321 22:59:58.223] ip 59.24.3.173:3000[20140321 22:59:58.248] Got 1 tracker ips[20140321 22:59:58.248] ip 59.24.3.173:3000[20140321 22:59:58.248] Got 1 tracker ips[20140321 22:59:58.249] ip 59.24.3.173:3000[20140321 22:59:59.090] Sending broadcast ping for share E___D[20140321 22:59:59.091] Requesting peers from tracker 59.24.3.173:3000 via UDP...$ sudo iptables -LChain INPUT (policy ACCEPT)target prot opt source destination Chain FORWARD (policy ACCEPT)target prot opt source destination Chain OUTPUT (policy ACCEPT)target prot opt source destination I have completed the hosts file with some redirections, but I doubt the mechanism can handle multiple IP for a singe host. I added your the external share and pre-defined host, but it does not sync... In sync.log it gives this strange message: ...[20140322 00:41:40.097] Sending broadcast ping for share 14xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxssx65[20140322 00:41:40.098] Send ping to peer (0000000000000000000000000000000000000000) for share 14xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxssx65:[20140322 00:41:40.098] ping 0.0.0.0:0 directly[20140322 00:41:40.098] ping 0.0.0.0:0 via relay...
  7. I disabled the firewall and activated UPnP. I can see that the port 8082 is opened in the UPnP status webpage of the router ID App Description External Port Protocol Internal Port IP Address Status2 BitTorrent Sync (TCP) 8082 TCP 8082 192.168.1.110 Enabled3 BitTorrent Sync (UDP) 8082 UDP 8082 192.168.1.110 EnabledI activated the logs with debug.txt and get the error message "Failed to get tracker ips". ...Found peer for folder /btsync/testmg 0___8 192.168.1.105:8086 direct:1Got ping (broadcast: 1) from peer 192.168.1.105:8086 (0___8) for share 5___EFound peer for folder /btsync/testbts 0___8 192.168.1.105:8086 direct:1Failed to get tracker ipsSending broadcast ping for share E___D...My other PC (running linux) is behind the same router (its IP is 192.168.1.105), it can sync with clients outside the LAN. My RPi (192.168.1.110) can only sync with local PC 192.168.1.105. Both box are running btsync and are syncing btsync-keys directory from vrypan.
  8. Hi dms2013, UPnP is not enabled on the router. The device with which I am syncing is provided by vrypan (https://github.com/vrypan/btsync-keys) and I am synching btsync-keys directory. I noticed connection sometimes drop so I will add some IPs in the hosts. Nevertheless my PC get the sync very quickly (not even 1 min after btsync starts) whereas my Raspberry Pi have been on for 3 days already and still nothing (I can also see it from the log where I get the "Unable to map port with NAT-PMP" error message). Any ideas?
  9. Hello I am facing a strange issue, I have BTSync running on a PC and and on a Raspberry Pi and I am behind a router with firewall activated: #1 PC running linux 3.13.6-1-ARCH with BitTorrent Sync 1.2.92 Connected via Wifi to router Listening port is set to 8086, this port is forwarded on my router (TCP/UDP) As I am in China I force tracker and relay IPs in /etc/hosts $ cat /etc/hosts...54.225.92.50 t.usyncapp.com67.215.231.242 r.usyncapp.com...BTSync is running as --nodaemon /usr/bin/btsync --config /home/prosciutboy/.config/btsync/btsync.conf --nodaemon Results -> LAN access is working fine -> It can access outside world and sync with other clients #2 Raspberry Pi running raspbian (Linux raspbmc 3.10.24) with BitTorrent Sync 1.2.67 Connected via Ethernet to router The listening port is 8082, this port is forwarded on my router (TCP/UDP) Tracker and relay IPs are referenced in /etc/hosts Port 8082 is opened in the firewall (port 3000 also but I don't think it is needed): $ tail /etc/network/if-up.d/secure-rmc iptables -A INPUT -s $NETMASK -i $IFACE -j ACCEPT iptables -A INPUT -i $IFACE -j DROP # added for btsync iptables -A INPUT -p tcp --dport 8082 -i $IFACE -j ACCEPT iptables -A INPUT -p udp --dport 8082 -i $IFACE -j ACCEPT iptables -A INPUT -p udp --dport 3000 -i $IFACE -j ACCEPTfi$ sudo iptables --listChain INPUT (policy ACCEPT)target prot opt source destination ACCEPT all -- 192.168.1.0/24 anywhere DROP all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere tcp dpt:8082ACCEPT udp -- anywhere anywhere udp dpt:8082ACCEPT udp -- anywhere anywhere udp dpt:3000BTSync is running as daemon but nodaemon gives the same results /usr/bin/btsync --config /home/pi/.btsync/config.json Results: -> LAN access is working fine -> Sync with outside world is failing $ cat .btsync/sync.logtotal physical memory -1 max disk cache 2097152Using IP address 192.168.1.110Loading config file version 1.2.67Loaded folder /media/3a1d320b-c949-46dc-aa95-ed0414721543/video/doc/palettesLoaded folder /media/3a1d320b-c949-46dc-aa95-ed0414721543/video/MoviesLoaded folder /media/3a1d320b-c949-46dc-aa95-ed0414721543/btsync/testmtgoxLoaded folder /home/pi/cloud/testbtsNAT-PMP: Unable to map port with NAT-PMP.Incoming connection from 192.168.1.102:64790...On my PC and Raspberry, the btsync config files have the same content (only "listening port" and "storage path" differs). I do not understand why I get the error "NAT-PMP: Unable to map port with NAT-PMP" and why I cannot sync with the clients outside the LAN with the Raspberry Pi. Thanks in advance for your help !