Can't ping WAN from SSH

Hi,

I am very green when talking about network so please bare with me.

While trying to install Zerotier on my GL.inet router, I find out it does not connect to the server. Looking around and trying to find the issue, I found out that I can't ping openwrt.org when I SSH in my router.

If i connect my laptop or iphone to the router and try to ping openwrt.org it works flawlessly, I can also easily install zerotier and get it working on a client connected on my router (phone, tablet etc...)

It looks like command accessing WAN on the router does not reach internet

Anyone would be kind enough to help me solve this issue ?

can you ping 8.8.8.8

no, I have 100% packet loss

It looks like your router works as a DUMB AP.

Please run the following commands (copy-paste the whole block) and paste the output 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; \
uci export network; uci export dhcp; uci export firewall; \
ip -4 addr ; ip -4 ro li tab all ; ip -4 ru; \
ls -l  /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/* ; head -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/*

Not sure this is important to know but when this router is connected to wifi as a repeater it works OK but if It is connect to internet through tethering on 4G that's when the problem occurs.

root@GL-MT1300:~# ubus call system board; \
> uci export network; uci export dhcp; uci export firewall; \
> ip -4 addr ; ip -4 ro li tab all ; ip -4 ru; \
> ls -l  /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/* ; head -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/*
{
        "kernel": "4.14.241",
        "hostname": "GL-MT1300",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "GL-MT1300",
        "board_name": "gl-mt1300",
        "release": {
                "distribution": "OpenWrt",
                "version": "19.07.8",
                "revision": "r11364-ef56c85848",
                "target": "ramips/mt76x8",
                "description": "OpenWrt 19.07.8 r11364-ef56c85848"
        }
}
package network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'ddab:5722:5f0e::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option netmask '255.255.255.0'
        option hostname 'GL-MT1300-12f'
        option ipaddr '192.168.8.1'
        option multicast_to_unicast '0'
        option ip6assign '64'
        option ip6hint '0000'
        option ip6ifaceid '::1'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'
        option hostname 'GL-MT1300-12f'
        option ipv6 '0'

config interface 'wan6'
        option proto 'dhcpv6'
        option ifname '@wan'
        option disabled '1'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 6t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 6t'

config interface 'guest'
        option ifname 'guest'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.9.1'
        option netmask '255.255.255.0'
        option bridge_empty '1'
        option ip6prefix 'ddab:5722:5f0e::/48'
        option ip6assign '64'
        option ip6hint '0001'
        option ip6ifaceid '::1'

config device 'wan_dev'
        option name 'eth0.2'
        option macaddr '94:83:c4:11:a1:2f'

config device 'lan_dev'
        option name 'eth0.1'
        option macaddr '94:83:c4:11:a1:30'

config interface 'wwan'
        option proto 'dhcp'
        option metric '20'

config interface 'tethering'
        option proto 'dhcp'
        option ifname 'eth1'
        option metric '30'
        option disabled '0'

package dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option nonwildcard '1'
        option localservice '1'
        option resolvfile '/tmp/resolv.conf.auto'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option force '1'
        list dns 'ddab:5722:5f0e:0000:0000:0000:0000:0001'
        option ra_management '1'
        option dhcpv6 'disabled'
        option ra 'disabled'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

config dhcp 'guest'
        option interface 'guest'
        option start '100'
        option leasetime '12h'
        option limit '150'
        list dns 'ddab:5722:5f0e:0001:0000:0000:0000:0001'
        option dhcpv6 'disabled'
        option ra 'disabled'

config domain 'localhost'
        option name 'console.gl-inet.com'
        option ip '192.168.8.1'

config host 'dca632ddb7ee'
        option mac 'dc:a6:32:dd:b7:ee'
        option ip '192.168.8.192'
        option name 'raspberrypi'

config host '000420E7C41D'
        option mac '00:04:20:E7:C4:1D'
        option ip '192.168.8.240'

config host '60019473e3c2'
        option mac '60:01:94:73:e3:c2'
        option ip '192.168.8.249'

config host '503237bb31d6'
        option mac '50:32:37:bb:31:d6'
        option ip '192.168.8.245'

config host '9c8ecd240bd4'
        option mac '9c:8e:cd:24:0b:d4'
        option ip '192.168.8.202'

config host '9c8ecd212739'
        option mac '9c:8e:cd:21:27:39'
        option ip '192.168.8.204'

config host 'B827ebc129eb'
        option mac 'B8:27:eb:c1:29:eb'
        option ip '192.168.8.125'

package firewall

config defaults
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option flow_offloading '1'
        option flow_offloading_hw '1'
        option synflood_protect '1'

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

config zone
        option name 'wan'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        option input 'DROP'
        option network 'wan wan6 wwan tethering'
        option masq6 '1'

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

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 src_ip 'fc00::/6'
        option dest_ip 'fc00::/6'
        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'
        option enabled '0'

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 include
        option path '/etc/firewall.user'
        option reload '1'

config include 'glfw'
        option type 'script'
        option path '/usr/bin/glfw.sh'
        option reload '1'

config zone 'guestzone'
        option name 'guestzone'
        option network 'guest'
        option forward 'REJECT'
        option output 'ACCEPT'
        option input 'REJECT'

config forwarding 'guestzone_fwd'
        option src 'guestzone'
        option dest 'wan'
        option enabled '1'

config rule 'guestzone_dhcp'
        option name 'guestzone_DHCP'
        option src 'guestzone'
        option target 'ACCEPT'
        option proto 'udp'
        option dest_port '67-68'

config rule 'guestzone_dns'
        option name 'guestzone_DNS'
        option src 'guestzone'
        option target 'ACCEPT'
        option proto 'tcp udp'
        option dest_port '53'

config rule 'sambasharewan'
        option src 'wan'
        option dest_port '137 138 139 445'
        option dest_proto 'tcpudp'
        option target 'DROP'

config rule 'sambasharelan'
        option src 'lan'
        option dest_port '137 138 139 445'
        option dest_proto 'tcpudp'
        option target 'ACCEPT'

config redirect
        option target 'DNAT'
        option name 'Hs4'
        option src 'wan'
        option dest 'lan'
        option proto 'tcp udp'
        option src_dport '51525'
        option dest_ip '192.168.8.192'
        option dest_port '51525'
        option enabled '1'
        option gl '1'

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

config include 'glqos'
        option type 'script'
        option path '/usr/sbin/glqos.sh'
        option reload '1'

config zone 'vpn_zone'
        option name 'zerotier'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option device 'zt+'
        option masq '1'
        option mtu_fix '1'
        option forward 'ACCEPT'

config forwarding
        option dest 'zerotier'
        option src 'lan'

config forwarding
        option dest 'lan'
        option src 'zerotier'

config rule
        option src_port '9993'
        option src '*'
        option name 'zerotier'
        option dest '*'
        option target 'ACCEPT'

config include 'nat6'
        option path '/etc/firewall.nat6'
        option reload '1'

config rule 'glipv6_guest_dhcp'
        option name 'Allow-DHCP-IPV6'
        option src 'guestzone'
        option target 'ACCEPT'
        option proto 'udp'
        option dest_port '547:548'
        option family 'ipv6'

config rule 'glipv6_guest_icmp'
        option name 'Allow-ICMP-IPV6'
        option src 'guestzone'
        option target 'ACCEPT'
        option proto 'icmp'
        option dest_port '58'
        option family 'ipv6'

config nat
        option src_port '9993'
        list proto 'tcp'
        list proto 'udp'
        option name 'test zerotier'
        option src_ip '192.168.8.1'
        option dest_ip '192.168.8.1'
        option dest_port '9993'
        option src 'wan'
        option target 'ACCEPT'

config rule
        list proto 'icmp'
        option name 'AAA'
        list src_ip '192.168.8.1'
        option dest 'wan'
        option target 'ACCEPT'
        list dest_ip '172.20.10.1'

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
37: br-guest: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    inet 192.168.9.1/24 brd 192.168.9.255 scope global br-guest
       valid_lft forever preferred_lft forever
38: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    inet 192.168.8.1/24 brd 192.168.8.255 scope global br-lan
       valid_lft forever preferred_lft forever
45: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    inet 172.20.10.2/28 brd 172.20.10.15 scope global eth1
       valid_lft forever preferred_lft forever
default via 172.20.10.1 dev eth1 table 51 proto static src 172.20.10.2 metric 30
172.20.10.0/28 dev eth1 table 51 proto static scope link metric 30
192.168.8.0/24 dev br-lan table 51 proto kernel scope link src 192.168.8.1
default via 172.20.10.1 dev eth1 table 52 proto static src 172.20.10.2 metric 30
172.20.10.0/28 dev eth1 table 52 proto static scope link metric 30
192.168.8.0/24 dev br-lan table 52 proto kernel scope link src 192.168.8.1
default via 172.20.10.1 dev eth1 proto static src 172.20.10.2 metric 30
172.20.10.0/28 dev eth1 proto static scope link metric 30
192.168.8.0/24 dev br-lan proto kernel scope link src 192.168.8.1
192.168.9.0/24 dev br-guest proto kernel scope link src 192.168.9.1 linkdown
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
broadcast 172.20.10.0 dev eth1 table local proto kernel scope link src 172.20.10.2
local 172.20.10.2 dev eth1 table local proto kernel scope host src 172.20.10.2
broadcast 172.20.10.15 dev eth1 table local proto kernel scope link src 172.20.10.2
broadcast 192.168.8.0 dev br-lan table local proto kernel scope link src 192.168.8.1
local 192.168.8.1 dev br-lan table local proto kernel scope host src 192.168.8.1
broadcast 192.168.8.255 dev br-lan table local proto kernel scope link src 192.168.8.1
broadcast 192.168.9.0 dev br-guest table local proto kernel scope link src 192.168.9.1 linkdown
local 192.168.9.1 dev br-guest table local proto kernel scope host src 192.168.9.1
broadcast 192.168.9.255 dev br-guest table local proto kernel scope link src 192.168.9.1 linkdown
0:      from all lookup local
51:     from all fwmark 0x100000/0x100000 lookup 51
52:     from all fwmark 0x80000/0x80000 lookup 52
2061:   from all fwmark 0x3d00/0x3f00 blackhole
2062:   from all fwmark 0x3e00/0x3f00 unreachable
32766:  from all lookup main
32767:  from all lookup default
ls: /tmp/resolv.*/*: No such file or directory
-rw-r--r--    1 root     root            45 Dec  9 17:24 /etc/resolv.conf
-rw-r--r--    1 root     root            32 Dec  9 17:23 /tmp/resolv.conf
-rw-r--r--    1 root     root            45 Dec  9 17:24 /tmp/resolv.conf.auto
==> /etc/resolv.conf <==
# Interface tethering
nameserver 172.20.10.1

==> /tmp/resolv.conf <==
search lan
nameserver 127.0.0.1

==> /tmp/resolv.conf.auto <==
# Interface tethering
nameserver 172.20.10.1
head: /tmp/resolv.*/*: No such file or directory
root@GL-MT1300:~#

Old and unsupported.

Why are there 3 routing tables with the same default route?

Which program is adding these rules?

1- "version": "19.07.8", this is a GL.inet router running it's original up to date firmware, I guess that the image was built with an old version

2,3 and 4 I have unfortunatly no idea why these 3 routing tables have the same default route, I have not add or create manual routing table, I guess it is the GL.inet that creates them when it connect over tethered 4g ???

5 I am also guessing that these rules were created by the Gl.inet

sorry I am not of great help in answering, I am a complete newbie

Since your device is running gl-inet’s highly customized version of OpenWrt, you have two options:

  1. ask for support using gl-inet’s support channels/forums
  2. install the official up-to-date openwrt firmware. This would be 22.03.2 as of today, and you should be able to find it here:
    https://firmware-selector.openwrt.org
2 Likes