Hello,

I have a question about tinc for android.

I got this working on my 4.1 tablet my 2.37 x10 pro but on my 4.4.2 acer e700 I cannot get it to work.

When I start tinc it connects to my server at home.

The tap0 device on the phone is up and gets assigned the proper IP.

When I run a ping to my home system and run a tcpdump on the tinc network at home and on my phone I see the the home system receiving and also answering.

(.11 is the phone .1 is my home server)

root@acer_e39:/usr/local/etc/tinc/dandy_net # tcpdump -n -i tap0
20:50:50.983057 IP6 fe80::a092:4683:3b03:f362.546 > ff02::1:2.547: dhcp6 solicit
20:50:55.121648 arp who-has 192.168.233.1 tell 192.168.233.11
20:50:55.122600 arp reply 192.168.233.1 is-at 16:2f:4e:e2:5f:51
20:50:55.122652 IP 192.168.233.11 > 192.168.233.1: ICMP echo request, id 24, seq 1, length 64
20:50:55.259035 IP 192.168.233.1 > 192.168.233.11: ICMP echo reply, id 24, seq 1, length 64
20:50:56.125187 IP 192.168.233.11 > 192.168.233.1: ICMP echo request, id 24, seq 2, length 64
20:50:56.253012 IP 192.168.233.1 > 192.168.233.11: ICMP echo reply, id 24, seq 2, length 64

So the reply does arrive on my phone but the ping command is not seeing it.

Also when I telnet to an other ip at port 80 on my home net it also get routed via the tinc network and arrives at my webserver at home and a reply is send and also apears on the tap0 device (at home and on the phone) but telnet never receives it.

Iptables -L -n looks like it does not block anyhing (though I am used to reading iptable-save output but I do not have iptables-save on my phone.)
Flushing iptables does not help either.

Selinux is not enabled.

I think I got everything setup correctly since in my experience with tinc on linux systems once you see packets on the tinc interface things work.

I do not think routing is the problem since ping really send packets to the other side en the answers arrive at tap0.

Anyway I suspect tinc works fine and it has something to do with android.

Any suggestions, hints or tips are welcome.

Regards,

Hans de Groot




--
1|root@acer_e39:/usr/local/etc/tinc/dandy_net/hosts # iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain bw_FORWARD (0 references)
target     prot opt source               destination

Chain bw_INPUT (0 references)
target     prot opt source               destination

Chain bw_OUTPUT (0 references)
target     prot opt source               destination

Chain bw_costly_ccmni0 (0 references)
target     prot opt source               destination
bw_penalty_box  all  --  0.0.0.0/0            0.0.0.0/0
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            ! quota ccmni0: 1007899331082 bytes  reject-with icmp-port-unreachable

Chain bw_costly_shared (0 references)
target     prot opt source               destination

Chain bw_happy_box (0 references)
target     prot opt source               destination

Chain bw_penalty_box (1 references)
target     prot opt source               destination

Chain firewall (0 references)
target     prot opt source               destination

Chain fw_FORWARD (0 references)
target     prot opt source               destination

Chain fw_INPUT (0 references)
target     prot opt source               destination

Chain fw_OUTPUT (0 references)
target     prot opt source               destination

Chain mobile (0 references)
target     prot opt source               destination

Chain natctrl_FORWARD (0 references)
target     prot opt source               destination

Chain natctrl_tether_counters (0 references)
target     prot opt source               destination

Chain oem_fwd (0 references)
target     prot opt source               destination

Chain oem_out (0 references)
target     prot opt source               destination

Chain st_filter_OUTPUT (0 references)
target     prot opt source               destination

Chain wifi (0 references)
target     prot opt source               destination

----------------------------



Hosts:
e700 is my phone, koffie is my server at home
e700: (tincd 1.0.21)
-----
Cipher = blowfish
Compression = 1
Digest = sha1
IndirectData = yes
Port = 655
Subnet = 192.168.233.11/32
TCPonly = yes

-----BEGIN RSA PUBLIC KEY-----
-----END RSA PUBLIC KEY-----

koffie: (tincd 1.0.23)
Address = ****.*******.nl
Cipher = blowfish
Compression = 1
Digest = sha1
IndirectData = Yes
Port = 655
PMTUDiscovery = yes
Subnet = 192.168.233.0/24
Subnet = 192.168.233.1/32
Subnet = 192.168.0.0/24
Subnet = 192.168.1.0/24
TCPonly = yes
-----BEGIN RSA PUBLIC KEY-----
-----END RSA PUBLIC KEY-----

tinc.conf
AddressFamily = ipv4
Name = e700
ConnectTo = koffie
Device =/dev/tun
DeviceType = tap
Interface = tap0
Hostnames = No
Mode = router
KeyExpire = 3600
PingInterval = 10
PingTimeout = 10
ScriptsInterpreter = /system/bin/sh

tinc-up
ifconfig $INTERFACE 192.168.233.11
route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.233.1
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.233.1

(I did try with the echo 1 > /proc/sys/net/ipv4/conf/$INTERFACE/rp_filter line but that did not help)

ifconfig:
ccmni0    Link encap:Ethernet  HWaddr 6E:49:20:F9:86:BF
          inet addr:10.56.86.196  Mask:255.0.0.0
          UP RUNNING NOARP  MTU:1500  Metric:1
          RX packets:325845 errors:0 dropped:0 overruns:0 frame:0
          TX packets:277353 errors:182 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:302269310 (288.2 MiB)  TX bytes:38991014 (37.1 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:96537 errors:0 dropped:0 overruns:0 frame:0
          TX packets:96537 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:426937185 (407.1 MiB)  TX bytes:426937185 (407.1 MiB)

tap0      Link encap:Ethernet  HWaddr 16:2F:4E:E2:5F:AE
          inet addr:192.168.233.11  Bcast:192.168.233.255  Mask:255.255.255.0
          inet6 addr: fe80::142f:4eff:fee2:5fae/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:167 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:45622 (44.5 KiB)  TX bytes:804 (804.0 B)

wlan0     Link encap:Ethernet  HWaddr 54:14:73:1A:00:41
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:687567 errors:0 dropped:0 overruns:0 frame:0
          TX packets:457654 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:656003791 (625.6 MiB)  TX bytes:61799604 (58.9 MiB)

130|root@acer_e39:/usr/local/etc/tinc/dandy_net # route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.56.86.196    0.0.0.0         UG    0      0        0 ccmni0
10.56.86.196    *               255.255.255.255 UH    0      0        0 ccmni0
192.168.0.0     192.168.233.1   255.255.255.0   UG    0      0        0 tap0
192.168.1.0     192.168.233.1   255.255.255.0   UG    0      0        0 tap0
192.168.233.0   *               255.255.255.0   U     0      0        0 tap0








_______________________________________________
tinc mailing list
[email protected]
http://www.tinc-vpn.org/cgi-bin/mailman/listinfo/tinc

Reply via email to