Router's IP 192.168.1.1 was changed to DNS address

Hello,

Total noob here. Just installed openwrt 21.02.7 to a netgear R6900v2. Tethered an android to the USB3.0 port to share internet. After rebooting, everything worked except that I cannot login 192.168.1.1 anymore. Error was ' taken too long to respond' and it asked to check DNS and proxy. From the wifi details of my iphone that connected to this router, I noticed that the router address was not 192.168.1.1 anymore. it's 192.168.51.33, same as the DNS server address. If tethering was stopped, I could login into router using 192.168.1.1.

How could I change the router' IP back to 192.168.1.1?

Sorry if I used wrong or inaccurate terminology here.
Thanks in advance.

Welcome to the community!

Are you saying this occurred immediately after flashing?

  • Are you saying that you are connected to WiFi?
  • What DNS server?

Forgive me if the questions seem odd, OpenWrt doesn't have WiFi on by default, so I'm merely clarifying if these events occurred immediately after flashing to OpenWrt.

  • Also, you discussed tethering - but you never explain if you installed the required packages, etc.
  • Additionally, are you seeing these errors on a phone or a client plugged in by Ethernet?
  • Did you make any configs to the OpenWrt?
  • If so, please show your configs

I have reasons to believe that you're connected to your tethered phone, not your router.

3 Likes

"Are you saying this occurred immediately after flashing?" No, only when usb tethering was enabled. before usb tethering or after tethering was stopped, no such problem.

"Are you saying that you are connected to WiFi? "Yes, my iphone was connected to router's wifi named link2 (I set country code and password).

"What DNS server?" On iphone's Wi-Fi page, it shows ipv4 address including router address and DNS server.

"but you never explain if you installed the required packages, etc." I installed: kmod-usb-net-rndis
iptables-mod-ipopt iptables kmod-ipt-core kmod-ipt-ipopt kmod-ipt-nat kmod-ipt-offload kmod-nf-ipt
kmod-nf-nat (some were already installed I noticed during the package install process).

"Additionally, are you seeing these errors on a phone or a client plugged in by Ethernet?" Yes, I connected my laptop via Ethernet, same problem. The laptop could access internet by the way. The default gateway address (I believe this should be the router's address (192.168.1.1)?) was 182.168.51.33. Also tried ssh into the router using Putty and failed.

"Did you make any configs to the OpenWrt? " I followed this guide https://openwrt.org/docs/guide-user/network/wan/smartphone.usb.tethering. And this https://www.reddit.com/r/openwrt/comments/z6myl5/full_guide_to_setting_up_a_tethered_usb/.

"If so, please show your configs: " Sorry could you be more specific? I can provide screenshots.

my iphone was connected to router's wifi named link2 (I set country code and password). The android phone's hotspot sharing was turned off. Could you explain why the iphone was connected to the android?

You need to show your configs as asked by @lleachii earlier. Specifically, the content of

/etc/config/network
/etc/config/firewall

No screenshots please.

Why "21.02.7" is installed?

let's also see the output of the following:

ubus call system board
2 Likes
"kernel": "5.4.238",
        "hostname": "Link1",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "Netgear R6800",
        "board_name": "netgear,r6800",
        "release": {
                "distribution": "OpenWrt",
                "version": "21.02.7",
                "revision": "r16847-f8282da11e",
                "target": "ramips/mt7621",
                "description": "OpenWrt 21.02.7 r16847-f8282da11e"


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 packet_steering '1'
        option ula_prefix 'fd02:c202:793d::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'
        list ports 'wan'
        list ports 'usb0'

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 'wan'
        option device 'wan'
        option proto 'dhcp'
        option type 'bridge'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'
        option type 'bridge'

config interface 'wwan'
        option proto 'dhcp'

config interface 'usbtether'
        option proto 'dhcp'
        option device 'usb0'

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

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        option masq '1'
        list device 'usb0'

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 'wwan'
        list network 'usbtether'

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'

Openwrt 22 and later versions use nftables that may cause more issues for me .

What makes you say that?

Do you have custom rules defined too?

1 Like

Yes. I followed above guide (link in previous reply) and added this:

iptables -t mangle -I POSTROUTING -o usb0 -j TTL --ttl-set 65

There are quite a few things wrong with the config here...

First... why are all the ports in the br-lan bridge? The wan should not be here for sure, and chances are that the usb0 port shouldn't be either (since that's likely the tethering).

The option type bridge does not belong in either of the wan/wan6 interfaces:

Masquerading should not be enabld on the lan zone, and the usb0 device doesn't belong here. And you need to add the lan network back to this zone.

Fix all of those thigns, restart the router, and then try again.

5 Likes

Thanks a lot. Followed your instructions and it worked. Really appreciated it!

1 Like

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