OPNsense Forum

English Forums => 18.7 Legacy Series => Topic started by: wfx3 on November 19, 2018, 12:29:53 am

Title: android adb rules firing inconsistently
Post by: wfx3 on November 19, 2018, 12:29:53 am
my first time working with android adb and i can't figure out why the LAN firewall rule to port 5555 is firing inconsistently.  the 2.220 host (tinkerboard) is behind a gateway (ddwrt).  any ideas why the second and third packets below would skip the rule entirely?

Code: [Select]
$ ifconfig | grep inet
inet 192.168.1.232 netmask 0xffffff00 broadcast 192.168.1.255
$ adb connect 192.168.2.220         
failed to connect to 192.168.2.220:5555
$ ping 192.168.2.220
PING 192.168.2.220 (192.168.2.220): 56 data bytes
64 bytes from 192.168.2.220: icmp_seq=0 ttl=63 time=10.513 ms
64 bytes from 192.168.2.220: icmp_seq=1 ttl=63 time=8.080 ms

__timestamp__11/18/18 17:55:5411/18/18 17:55:5411/18/18 17:55:53
ack190817746190817746
action[pass][block][block]
anchorname
datalen000
dir[in][in][in]
dst192.168.2.220192.168.2.220192.168.2.220
dstport555555555555
ecn
id005636
interfaceigb2igb2igb2
ipflagsDFDFnone
labelUSER_RULE: allow LAN to tinkerboardUSER_RULE: default block IPv4 LANUSER_RULE: default block IPv4 LAN
length644040
offset000
proto666
protonametcptcptcp
reasonmatchmatchmatch
ridentifier000
rulenr122124124
seq39013041843330648330
src192.168.1.232192.168.1.232192.168.1.232
srcport499654991049910
subrulenr
tcpflagsSRAA
tcpopts
tos0x00x00x0
ttl646464
urp6553520582058
version444
Title: Re: android adb rules firing inconsistently
Post by: wfx3 on November 19, 2018, 04:06:48 pm
i am thinking this is an asymmetric routing issue, because the gateway (ddwrt) is on the internal LAN interface. 

there is this article https://www.netgate.com/docs/pfsense/firewall/troubleshooting-blocked-log-entries-due-to-asymmetric-routing.html (https://www.netgate.com/docs/pfsense/firewall/troubleshooting-blocked-log-entries-due-to-asymmetric-routing.html) under "gateway set when it should not be set" which talks about the ill effects of pfsense. 

i am not sure how the adb protocol works though.  the DF flag in some of the blocked packets makes me think there is some fragmentation/MTU issue.