Unable to access luci via URL

I have openwrt installed on a RPI4 and I have 3 devices (ios, android, windows) currently connected via wireless.

All can access the luci web gui via IP address
All can access the internet
But only one of them( android device) can access the luci web gui via url http://router.local or https://router.local
The router itself can ping the url

Here is my deivce and usb outputs

ubus call system board
{
"kernel": "5.15.167",
"hostname": "raspberrypi",
"system": "ARMv8 Processor rev 3",
"model": "Raspberry Pi 4 Model B Rev 1.5",
"board_name": "raspberrypi,4-model-b",
"rootfs_type": "ext4",
"release": {
"distribution": "OpenWrt",
"version": "23.05.5",
"revision": "r24106-10cc5fcd00",
"target": "bcm27xx/bcm2711",
"description": "OpenWrt 23.05.5 r24106-10cc5fcd00"
}
}

/etc/config/network

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.100.196'
        option gateway '192.168.100.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        list dns '192.168.100.196'
        list dns '1.1.1.1'
        list dns '8.8.4.4'

I cleared the browser cache
renew and release ipconfigs
restarted services
restarted devices

config defaults
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option synflood_protect '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 'wan6'

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 zone 'docker'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        option name 'docker'
        list network 'docker'

What else am I missing?

router.local? Where did you get that from?

We need to see the dhcp and system config files also.

try one of the following urls:

http://raspberrypi.lan  (most probable)

http://openwrt.lan

or

http://raspberrypi.local

http://openwrt.local

if one of the above link works then replace http with https for secure connection

1 Like
config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option domain 'local'
        option cachesize '1000'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option localservice '1'
        option ednspacket_max '1232'
        option local '/router.local/'
        option authoritative '1'
        option expandhosts '1'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'hybrid'
        option ra 'hybrid'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        option force '1'
        list dhcp_option '6,1.1.1.1'
        list dhcp_option '6,8.8.4.4'

config odhcpd 'odhcpd'
        option maindhcp '0'
config system
        option hostname 'router'
        option timezone 'AST4'
        option ttylogin '0'
        option log_size '64'
        option urandom_seed '0'
        option zonename 'America/Port of Spain'
        option log_proto 'udp'
        option conloglevel '8'
        option cronloglevel '5'

config timeserver 'ntp'
        list server '0.openwrt.pool.ntp.org'
        list server '1.openwrt.pool.ntp.org'
        list server '2.openwrt.pool.ntp.org'
        list server '3.openwrt.pool.ntp.org'

This worked for some reason. I'm not sure why....care to explain as I'm trying to set it to http://router.local

if you want to change the url then just change the hostname of the raspberrypi to router

1 Like

Dnsmasq put together the hostnames with the local definition and resolve that.

What you try to do is “option local ‘/local/‘“

And show in static leases as hostname+domain.

So if you try router.router.local, doest that work as expected?

1 Like

@porshuram I thought I did ...

config system
        option hostname 'router'
        option timezone 'AST4'

where else do I need to set the hostname?

try in luci.

again what is the hostname in

ubus call system board

try until this changes.

***** also try to restart the router if you change the hostname in /etc/config/system

Well now I'm confused as

system.@system[0]=system
system.@system[0].hostname='router'
system.@system[0].timezone='AST4'
system.@system[0].ttylogin='0'
system.@system[0].log_size='64'
system.@system[0].urandom_seed='0'
system.@system[0].log_proto='udp'
system.@system[0].conloglevel='8'
system.@system[0].cronloglevel='5'
ubus call system board
{
        "kernel": "5.15.167",
        "hostname": "router",
        "system": "ARMv8 Processor rev 3",
        "model": "Raspberry Pi 4 Model B Rev 1.5",
        "board_name": "raspberrypi,4-model-b",
        "rootfs_type": "ext4",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.5",
                "revision": "r24106-10cc5fcd00",
                "target": "bcm27xx/bcm2711",
                "description": "OpenWrt 23.05.5 r24106-10cc5fcd00"
        }
}

Is it because of the board name?

no.

did you add the line
option local '/router.local/'
in dnsmasq config?
if you did just revert back to original.

and reboot

1 Like

If you in dhcp config set both domain and local option to ‘local’ instead of default ‘lan’ and in system config set hostname to ‘router’ dnsmasq will do what you expect it to do.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.