Lost Access to Main Router

Greetings to All,

I am new to OpenWrt. Please bear with my 'noob' inquiries.
Current flashed WRT1900ACS using below firmware.

openwrt-18.06 branch (git-19.020.41695-6f6641d) / OpenWrt 18.06.2 r7676-cddd7b4c77

Current config:

Main router is D-Link DIR-850L stock firmware from ISP with IP address 192.168.1.1 (from landlord room).

My router is WRT1900ACS with WAN IP 192.168.1.131 (DHCP leased from Main router).
I set my router LAN IP as 192.168.2.1 static IP and 192.168.1.1 as gateway.

I connected landlord's router (D-Link 850L) to my router's (WRT1900ACS) internet port.

Internet is working fine as usual, but I cannot access the main router (D-Link 850L) webUI now (192.168.1.1) for whatever reason.

Tried to ping/nslookup main router (192.168.1.1) and the result shows that 192.168.1.1 is owned by OpenWrt.lan which is confusing. I know 192.168.1.1 is the main router (D-Link 850L).

C:\Windows\System32>nslookup 192.168.1.1
Server: OpenWrt.lan

Am I missing some configuration here?

Thanks in advanced.

When your WAN is DHCP you should not set a gateway or DNS in the LAN section. The gateway will be configured automatically. If you want to use different DNS servers set them in the WAN section.

Are there any other OpenWrt devices on your network?

1 Like

Some stale entry from the default configuration.
Please post the following:
uci show network; uci show dhcp; cat /etc/hosts; cat /etc/ethers;

Thanks @mk24 for the reply.

I removed the 192.168.1.1 in LAN gateway section of my OpenWrt router and left it blank, but I still cant access main router:

Same error.

# 404 Not Found
The requested URL /cgi-bin/luci was not found on this server.

This is the only OpenWrt.

Thanks @trendy for the reply.

Please refer to below.

**uci show network**
network.loopback=interface
network.loopback.ifname='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.globals.ula_prefix='fdab:67df:fa5f::/48'
network.lan=interface
network.lan.type='bridge'
network.lan.ifname='eth0.1'
network.lan.proto='static'
network.lan.ipaddr='192.168.2.1'
network.lan.netmask='255.255.255.0'
network.lan.ip6assign='60'
network.lan.dns='1.1.1.1 1.0.0.1'
network.wan=interface
network.wan.proto='dhcp'
network.wan.type='bridge'
network.wan.ifname='eth0.1 eth1.2'
network.wan6=interface
network.wan6.ifname='eth1.2'
network.wan6.proto='dhcpv6'
network.(@)switch[0]=switch
network.(@)switch[0].name='switch0'
network.(@)switch[0].reset='1'
network.(@)switch[0].enable_vlan='1'
network.(@)switch_vlan[0]=switch_vlan
network.(@)switch_vlan[0].device='switch0'
network.(@)switch_vlan[0].vlan='1'
network.(@)switch_vlan[0].ports='0 1 2 3 5t'
network.(@)switch_vlan[1]=switch_vlan
network.(@)switch_vlan[1].device='switch0'
network.(@)switch_vlan[1].vlan='2'
network.(@)switch_vlan[1].ports='4 6t' 

**uci show dhcp**
dhcp.(@)dnsmasq[0]=dnsmasq
dhcp.(@)dnsmasq[0].domainneeded='1'
dhcp.(@)dnsmasq[0].localise_queries='1'
dhcp.(@)dnsmasq[0].rebind_protection='1'
dhcp.(@)dnsmasq[0].rebind_localhost='1'
dhcp.(@)dnsmasq[0].local='/lan/'
dhcp.(@)dnsmasq[0].domain='lan'
dhcp.(@)dnsmasq[0].expandhosts='1'
dhcp.(@)dnsmasq[0].readethers='1'
dhcp.(@)dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.(@)dnsmasq[0].resolvfile='/tmp/resolv.conf.auto'
dhcp.(@)dnsmasq[0].nonwildcard='1'
dhcp.(@)dnsmasq[0].localservice='1'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.dhcpv6='server'
dhcp.lan.ra='server'
dhcp.lan.ra_management='1'
dhcp.lan.start='100'
dhcp.lan.limit='150'
dhcp.lan.leasetime='12h'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='1'
dhcp.odhcpd=odhcpd
dhcp.odhcpd.maindhcp='0'
dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'
dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'
dhcp.odhcpd.loglevel='4'


**cat /etc/hosts**
127.0.0.1 localhost

::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


**cat /etc/ethers**
Lookup man 5 ethers for syntax documentation

Examples :
       02:00:11:22:33:44       OpenWrt.lan
       02:00:11:22:33:44       192.168.1.1

@trendy Please include the following (including the grafik) or similar in your requests for configs.
Saves me quite some time :wink:

Please use "Preformatted text </>" for logs, scripts, configs and general console output.
![grafik|355x48](upload://7mmYm0XJBsUL0tVh1aYBxnqxY0S.png)

Thanks.

2 Likes

Your browser wants to redirect to LuCI because at some time in the past you have accessed an OpenWrt router at 192.168.1.1. Now you are reaching the neighbor's router upstream, but since it is not OpenWrt, the LuCI page does not exist. But the 404 error means that you did reach a web server.

The solution is to clear the browser cache.

Will try @tmomas, I was hoping that users took the introductory tour with discobot. Otherwise I am pointing it out as well.

Back to the problem, I think it is here:

network.lan.type='bridge'
network.lan.ifname='eth0.1'
network.wan.type='bridge'
network.wan.ifname='eth0.1 eth1.2'

You have basically bridged the two lans.
I don't want to imagine what else is wrong there, so better restore factory defaults, change immediately the LAN interface IP into something else not conflicting with your landlord's router and then connect it upstream to his router. It will work just like that.

Was literally pulling my hair out. Been going through multiple reset to clear the issue for a few days now.

Browser clear Cache did the trick.

Am back to business, Thanks Everyone for your efforts. @trendy @mk24.

Do fix what @trendy noted. The only interface in wan should be eth1.2 which is the link to the WAN port and the main router.

1 Like

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