Stuck trying to set up OpenWrt on RPi4

Due to some Problems the technicians encountered while setting up our house's fibre connection, I currently don't have a private Internet Connection. My Landlord kindly offered to allow me access to their wifi so that I can take part in online classes while waiting for the Problem to be resolved. The only point where a stable and fast connection to their wifi is possible is in our staircase.

My solution to this was to put a Raspberry Pi 4 with OpenWRT installed in the staircase and connect my PC with a Ethernet Cable, then use my PC as a Hotspot for all other devices.

I had a working OpenWRT Install that was accessible via Web Interface as well as via SSH. I managed to make it join the WiFi Network, but while trying to bridge the wifi connection to the ethernet port, I made a regrettable configuration mistake, locking myself out of the device.

I reflashed a clean image of OpenWRT to the Pi's SD Card, but now I can't connect to it at all anymore. When trying to connect via SSH, I get back ssh: connect to host 192.168.1.1 port 22: Connection refused . When trying to connect to the web interface, I get ERR_CONNECTION_REFUSED in Vivaldi (Chromium) and Firefox can’t establish a connection to the server at 192.168.1.1. in Firefox.

I've tried this from Linux as well as Windows based machines with the same results. I've tried manually setting up the IP config because I've read that DHCP being turned off might be the issue, but it did not help, though I might have made a mistake as I'm not very experienced with networking stuff.

I'd try accessing the Pi's Console directly, but I don't currently have access to a USB Keyboard, though I can order one if necessary, though I'd be happy if this is solvable without doing so.

If anyone has any Ideas how I might solve this, I'd be quite happy.

Hi, have you tries to ping it? What ip address have you set on your client machine? Did you set 192.168.1.1 as gateway, in the client itself?

1 Like

This is the IP configuration on the client machine:

image

I can succesfully ping 192.168.1.1:

PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.026 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.031 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.030 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.030 ms
^C
--- 192.168.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3055ms
rtt min/avg/max/mdev = 0.026/0.029/0.031/0.002 ms

Thank you for your reply. I wrote a reply to your post put accidentally posted it as a reply to the main thread.

You have set your computer to 192.168.1.1 which is conflicting with the openwrt default ip (which is the same). Change your computer to some other address in that subnet such as 192.168.1.2 and it should work.

1 Like

When trying this IP setup under Windows, I get this Error Message:

Interestingly, pinging 192.168.1.1 under Windows is unsuccesfull:

Pinging 192.168.1.1 with 32 bytes of data:
PING: transmit failed. General failure.
PING: transmit failed. General failure.
PING: transmit failed. General failure.
PING: transmit failed. General failure.

Ping statistics for 192.168.1.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

I've trried this, but still get the same error messages.

image

Seems like a windows problem. What happens if you set it to dhcp instead?

Under Windows, it tries identifying the network for some time, ultimately showing it as an unidentified network.

Under Linux, I get "Connecting", with periodic notifications telling me that "Connection failed - Activation of connection failed".

Edit: In both cases, nothing changes after the identifying/connecting process.

Unidentified network isn’t necessarily an issue. Does the computer get an IP address?

Under Linux, the wired connection just turns off after some time.

Under Window, the computer apparently has an IP (though only IPv6, see attached screenshot), but I can't ping 192.168.1.1 at all (see above post).

image

Is the pi directly connected by Ethernet to the computer? Are you running a completely default config on the pi?

The Pi is directly connected via a Cat5E cable. The Pi is running a fresh, unaltered OpenWRT Image.

Would taking the SD Card with the OpenWRT install out of the pi and editing the config via a PC be a posibility?

Sure. Go ahead and try editing on a pc. Probably best on Linux.

I'll also try looking this up in the documentation, but you wouldn't happen to know of the top of your head which files I'd have to edit to enable DHCP for eth0?

/etc/config/dhcp
/etc/config/network can also be useful to check.

Nice, thanks.

Took me a while to make the filesystem writable. What exactly would I have to change here to activate dhcp for the interface eth0?

Also, there doesn't appear to be a "network" file in /etc/config/.

Is there a /rom/etc/config folder and a network file in there?