Cannot access port forwarding on router machine

This is simple task, but i cannot solve it, already asking on local community but has no clue.

Here my step :

  1. Reverse connected adb port to my openwrt router machine.

adb reverse tcp:5555 tcp:5555

  1. Try to access with my router
$ adb connect localhost:5555
connected to localhost:5555

The connection was successfully. The problem is when i try access with IP router

$ adb connect 192.168.1.1
unable to connect to 192.168.1.1:5555

I've setup port forwarding :

What i want is access the localhost:5555 of openwrt machine with my computer

C:\Users\cpanel>adb connect 192.168.1.1
cannot connect to 192.168.1.1:5555: No connection could be made because the target machine actively refused it. (10061)

Here my tcpdump log.

Click to open
$ tcpdump | grep 5555
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br-lan, link-type EN10MB (Ethernet), capture size 262144 bytes
02:50:58.136731 IP Optiplex.lan.64767 > LYNX.lan.5555: Flags [S], seq 4003234605, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
02:50:58.136846 IP LYNX.lan.5555 > Optiplex.lan.64767: Flags [R.], seq 0, ack 4003234606, win 0, length 0
02:50:58.645095 IP Optiplex.lan.64767 > LYNX.lan.5555: Flags [S], seq 4003234605, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
02:50:58.645197 IP LYNX.lan.5555 > Optiplex.lan.64767: Flags [R.], seq 0, ack 1, win 0, length 0
02:50:59.147603 IP Optiplex.lan.64767 > LYNX.lan.5555: Flags [S], seq 4003234605, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
02:50:59.147795 IP LYNX.lan.5555 > Optiplex.lan.64767: Flags [R.], seq 0, ack 1, win 0, length 0
02:50:59.650948 IP Optiplex.lan.64767 > LYNX.lan.5555: Flags [S], seq 4003234605, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
02:50:59.651135 IP LYNX.lan.5555 > Optiplex.lan.64767: Flags [R.], seq 0, ack 1, win 0, length 0
02:51:00.162578 IP Optiplex.lan.64767 > LYNX.lan.5555: Flags [S], seq 4003234605, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
02:51:00.162769 IP LYNX.lan.5555 > Optiplex.lan.64767: Flags [R.], seq 0, ack 1, win 0, length 0

What i miss ???

Do you have an adb service running on your router?

Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/firewall

Yes, already running.

# root @ LYNX in ~ [2:51:22] C:130
$ adb devices
List of devices attached
4785f6887d14    device
ubus call system board
{
        "kernel": "5.15.79",
        "hostname": "LYNX",
        "system": "ARMv8 Processor rev 4",
        "model": "FiberHome HG680P",
        "board_name": "amlogic,p212",
        "release": {
                "distribution": "OpenWrt",
                "version": "21.02-SNAPSHOT",
                "revision": "R2023.01.04",
                "target": "armvirt/64",
                "description": "OpenWrt 21.02-SNAPSHOT r0-73cbcca"
        }
}
cat /etc/config/network
config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd56:3543:a62d::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'docker'
        option device 'docker0'
        option proto 'none'
        option auto '0'

config device
        option type 'bridge'
        option name 'docker0'

config interface 'wan1'
        option proto 'dhcp'
        option device 'usb0'
cat /etc/config/firewall
config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option fullcone '1'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'

config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'wan'
        list network 'wan6'
        list network 'wan1'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

config rule
        option name 'Support-UDP-Traceroute'
        option src 'wan'
        option dest_port '33434:33689'
        option proto 'udp'
        option family 'ipv4'
        option target 'REJECT'
        option enabled 'false'

config include
        option path '/etc/firewall.user'

config include 'zerotier'
        option type 'script'
        option path '/etc/zerotier.reload'
        option reload '1'

config include 'passwall'
        option type 'script'
        option path '/var/etc/passwall.include'
        option reload '1'

config include 'passwall_server'
        option type 'script'
        option path '/var/etc/passwall_server.include'
        option reload '1'

config include 'shadowsocksr'
        option type 'script'
        option path '/var/etc/shadowsocksr.include'
        option reload '1'

config zone 'docker'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        option name 'docker'
        list network 'docker'

config include 'openclash'
        option type 'script'
        option path '/var/etc/openclash.include'
        option reload '1'

config redirect
        option target 'DNAT'
        option name 'ADB Tethering '
        option src_dport '5555'
        option dest_port '5555'
        option src 'wan'

This firmware is not provided by the official openwrt project. It comes from some other source - perhaps the vendor of the device you are using?

You’ll need to reach out to the vendor for help since this is not openwrt.

1 Like

Comes from this github https://github.com/lynxnexy/openwrt

Not openwrt ? hmm , i think this is still openwrt but unofficial, i want help setup a port forwarding.

That is clearly a significantly modified version of OpenWrt - the kernel version itself is not standard - 5.15 is first being incorporated for 23.05. And there are a ton of things in the firewall file that will materially affect its operation.

Please reach out to the maintainer of that very custom firmware.

1 Like

Thakyou for your explanation, i will reach out to the maintainer and in the other community platform.