Can't connect to ssh/luci

This is not the first time this problem appears, I'm using Xiaomi 3G
When trying to connect via ssh:
ssh: connect to host 192.168.1.1 port 22: No route to host
Still, I have access to internet, just can't connect to the router.
Year ago I solved this problem by using openwrt's wiki to manually configure connection in network manager, but now I can't find that article. IIRC I changed IP address or DNS. Can someone help me to find that article or what would be solution to this? Failsafe mode does nothing for me.

What IP address, network mask, and gateway are configured on your computer?

2 Likes

All set on automatic.

Do you use Windows or some kind of Linux?

1 Like

Can you confirm that your PC is connected directly to that router?

Could you double check the IP of the router form your PC?

In Windows, form CMD:

ipconfig | findstr "Default Gateway" 

In Linux, form Terminal:

ip r | grep default
1 Like

And which values does the DHCP server assign to that machine?

1 Like

Yeah, I'm using arch linux.
default via 100.126.0.1 dev eno1 proto dhcp metric 100

That seems like a carrier-grade NAT IP. Are you sure your ISP device isn't issuing that?

2 Likes

Well, for start, can you see if you can access the router at this IP address? (and then next step would be to see how you got it in the first place).

1 Like

It looks like you connected uplink cable in the LAN interface.

2 Likes

It is possible, I know for certain that when I plug lan cable in different machines and then launch a browser, it redirects any link to the login page of ISP site, then asks to wait 10 minute because they applying settings.

Can't access, it just trying to load page forever, same with ssh.

Then make sure you have the uplink connected to the WAN port (or whatever it's called).

Though, the fact the router got IP form ISP suggests that your LAN interface is probably set to DHCP client. Which means you will likely need another router in order to access it and set it to static IP.

2 Likes

Everything connected right. Otherwise I wouldn't be to able access internet right now. I also have ISP's router with their own firmware and standard 192.168.1.1 can be accessed from it.

If everything is connected right, then why aren't you able to access the router? An where did this IP come form?

You may want to elaborate a bit about your physical setup. It could help.

You may disconnect internet cable form the OpenWrt router and re-invoke ip r | grep default. See what IP you will get this time.

Or you could connect the ISP router to the OpenWrt router's LAN port, see what IP OpenWrt router is getting (by checking the other router's clients, or using an IP scanner on 192.168.1.0 netowrk. Then you use that IP to access the OpenWrt rouer and set the IP to static (e.g. 192.168.1.2).

1 Like

Incorrect.

This is a problem:

  • you need to renumber your OpenWrt LAN (e.g. change router to 192.168.2.1) - for routing reasons, they cant have the same numbering scheme
  • you need to fix that you're being issued an IP from the ISP device and not OpenWrt - check your connections

Also, feel free to use one post to reply to multiple persons - we can all see.

1 Like

This happened after I started using new ISP and set l2tp connection on my xiaomi router. My cables are connected in the right ports, I used this router with another ISP before.
Blue Wan > uplink. White > lan cable.

This shows the same result.

How can I do this exactly? I'm going to attach pictures with info from the ISP's router, maybe they'll help to clear this situation.

That is you ISP's router. I stated:

I'm suggesting you only connect the laptop to the OpenWrt, get connectivity and renumber your device.

You do see that your OpenWrt has an IP of 192.168.1.65, correct? It's also clear that you've somehow connected to the ISP router's LAN, not the OpenWrt. You need to fix this.

You've connected your PC directly to the Internet. This is why you can only use one PC at a time, there's no routing going on. Your router is only acting as a switch.

Unplug the modem from the setup entirely, then have your PC get a new DHCP address it should then let you log into the router.

The modem must be connected to the special WAN port on the router not one of the LAN ports. Then the router stays at 192.168.1.1 but it gives you a route to the Internet. This will show on the OpenWrt main status page as your IPv4 uplink.

1 Like

That's the problem, I can't get connectivity that way. When I'm trying to do this, ssh shows that network is unreachable and ip r | grep default shows nothing.

I'm sorry, that was my xiaomi router connected to the isp's router, you can disregard that.

You must be right, because I can now plug uplink directly into computer and it works. Hm, that's strange.

How to exactly make a new DHCP?