Wifi and Lan working perfectly but no internet connection in router itself

Hello I am using Openwrt snapshot on Linksys WHW01 v1. It is a router with 2 lan connections only and no WAN port. After installing openwrt the performance is great on WLAN as well as Lan. But the openwrt software on router itself has no internet connection. Because of this I am unable to download or update the list of packages or use any feature of openwrt.

I am getting this error when trying to update package list:

Failed to send request: Operation not permitted
Failed to send request: Operation not permitted
Failed to send request: Operation not permitted
Failed to send request: Operation not permitted
Failed to send request: Operation not permitted
Failed to send request: Operation not permitted
Failed to send request: Operation not permitted
Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/targets/ipq40xx/generic/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/base/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/targets/ipq40xx/generic/kmods/5.15.116-1-d54147bdd60f84718d6232fa14505a9d/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/luci/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/routing/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/telephony/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

When trying to ping openwrt.org from diagnostics tab I am getting this error:

ping: bad address 'openwrt.org'

I have tried disabling firewall as well as DNSmasq but still results are same.

Also I am unable to access to the Luci interface or ssh if the clients have internet connection.

Her is my default network config:

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 'fd4e:73e5:d5d2::/48'

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

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'
        list dns '1.1.1.1'
        list dns '1.0.0.1'

Here is my firewall config:

                                     
config defaults                             
        option input 'REJECT'                   
        option output 'ACCEPT'                 
        option forward 'REJECT'                 
        option flow_offloading '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'                       
        list network 'wan'                      
        list network 'wan6'                  
        option input 'REJECT'                   
        option output 'ACCEPT'              
        option forward 'REJECT'             
        option mtu_fix '1'                      
                                               
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'  

Please help me fix this so that I can install modules like adblock and use them because now adblock is also giving error because of no inter connection on router itself.

there's no default gw ?

2 Likes

You need to tell your device where it gets its internet connection from. Do you have another router that is responsible for the upstream connection? If yes, how are the devices connected and what's its IP address?

As @frollic just pointed out, you haven't defined a default gateway.

2 Likes

This are the default configs with which the the router booted after installing openwrt. I added only the DNS.

Even after adding, the router is not getting internet connection:

This my new network config:

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 'fd4e:73e5:d5d2::/48'

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

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'
        list dns '1.1.1.1'
        list dns '1.0.0.1'
        option gateway '10.105.254.254'
        option broadcast '192.168.1.255'

I think my router is currently working like a Dumb AP is it possible to get adblock working on it or I need double NAT?

This IP combo won't work, without routing.

Depends on your down stream router, and which config it'll allow you to make.

You either want to disable or customize it's DHCP, or be able to add firewall rules for the outgoing traffic.

1 Like

The gateway cannot be on a different IP segment, the router would not know how to reach it.

If it is acting as a dumb AP, why don't you configure it as a proper dumb AP?

1 Like