Installing and setting up on RPi 4

I have got my Rpi 4 b I'd like to install OpenWrt and set it up as firewall/router.

I already got snapshot from here:

I downloaded and flashed SD with rpi-4-ext4-factory.img.gz image. It boots and all, but I have a bit of a problem here.

My idea is to connect via my Nokia 8110 4G. USB tethering, not WIFI-share. And then have this connection shared to other devices via Ethernet. But now I run into problem because OpenWrt doesn't seem to see OOB my 8110 nor WIFI hotspot if I set one up.

My plan is also set up separated LAN that is not connected to outside. I have Linksys SD2008 switch here to use for this.

so my setup would look a like this:

8110 | <--(USB tethering) --> | Rpi | <-- (Ethernet) --> | ETH-switch | <-- WAN share -->
..........................................................................................| <-- LAN -->

LAN and WAN share doesn't live in the same network and only RPi gets IP from the phone. Then RPi would run DHCP for the devices that are connecting WAN share but not for the LAN.

LAN IPs will be static.

What would be my battle plan to tackle this?

Thanks in advance!

you probably need to install various USB kmods to get the tethering. I don't know which.

then create 2 VLANs in your switch, one for the regular lan and one for the isolated lan... and add two OpenWrt interfaces one for each VLAN. set firewall zones... voila.

I need some magic to do that ...

Any idea where to look for those USB kmods?

Yeah, you're not going to get vlans from that switch. You want something that's a smart managed switch. Like a tp-link sg108e or similar.

I truly have no idea which usb kmods you need. Never looked into what's needed for tethering. It's an RPi though, just download all the kmods, since they expire the next time a snapshot is made anyway. Then install all the kmod-usb-net series... and pray :wink:

No. I don't WANT any hardware ... unless you have some spare laying around and want to send it over :slight_smile:

This switch is fine enough when I just get this RPi up and running, but this is rather new setup I'm trying to do here. This is the reason I'm asking for guidance from people who might have some more information and experience ... especially it was my first time to boot RPi just before I wrote my initial post.

Umm .. this is rather comforting that I need some religious practices while I'm setting up RPi ... Any particular gods I might address for this?

Yes, but you want isolated VLANS (one LAN that is separate and has no access to internet or the other LAN) so this requires some different hardware. For example you could get a USB ethernet dongle and set up this LAN as a totally separate network.

address the gods of Nokia and pray that they haven't used some proprietary tethering thing.

You mean USB-eth that I plug into RPi? And then let RPi do the magic for me?

So far worked without hassle with every toynix distros I have tried so far.

Right. The "magic" is just putting two groups of machines into separate layer 2 (ethernet) networks so they can't talk to each other. you can do this with separate wires, or with one wire and separate VLANS.

Here are your options to get 2 separated LANs:

  1. Add a USB Ethernet. Connect your switch to this, connect only isolated LAN clients to this switch... Then connect the built-in ethernet to another switch and connect all the non-isolated clients to THAT switch... Total additional cost over what you have today: 1 USB Ethernet + one more switch

  2. Buy a VLAN capable switch, put two vlans, one for isolated guys, one for non-isolated guys... Connect up RPi built in ethernet to this switch... Total cost: one more smart switch (note that you can still use your "dumb" switch to add more ports on one of the networks.)

I think you see why I say you want the smart switch. It's less hardware and more flexible, because as soon as you want yet another LAN... you just add another VLAN not buy another switch.

1 Like


Me so stupido! You make perfect sense now that I see the light from the fog I was wandering!

Of course I want that VLAN capable switch ... Now it all makes sense. I have to get one such thingie ASAP and get those kmods in. What did you mean "they expire" next time the snapshot is done?

Still not very familiar with the inner psychosis of Rpi ... does this mean I have to re install them every time? Or something like this? And where was that I found these kmods?

Also popped into my mind that isn't WIFI working still OOB with this snapshot I have? Cannot test until next week though.

Thanks for slapping me out of my madness about the switch!

happy to help!

the part about kmod is that they only work with the particular kernel that they were compiled for. when you have a new snapshot there's all new kernel and kernel modules. eventually the RPI 4 will be included in a official release. at that point the kernel modules will be frozen for that release kernel and be available forever.

Was just thinking that when I get this thing working ... why would I update the kernel to new snapshot before the official release is out? I'm not seeing much reason to do that.

I'll get back to this if something comes up next week when I get change to get this thing forward. First thing is to get that USB tethering done and then I just wait until I get the switch and do the boogie!

Thanks again and have a wonderful week!

One more thing just to make sure I got his right ...

I can download those kmods to the SD card I have and then use opgk to install them, since I don't have working connection on my RPi yet?

And how do I download all of them? Is there some "all kmods" package somewhere? Get this thing forward tomorrow and thought to ask in advance :smiley:


that's right, you can keep them there to install as needed, no need to actually install everything.

If you go to the download page here:

there is a link for "kmods" which then links to a bunch of directories for various snapshots.

kmods for the recent snapshot are here:

you could download all of them by using wget recursively or some other downloader bot

Make sure you're using the associated snapshot, which is:

or if you want the squashfs version:

Much obliged!

I'll start this later today when get other installation and whatnot out of the way! And thank you for holding my hand while I try to learn riding this bike!

So far no luck.

For my surprise Ethernet doesn't work ... couldn't figure why and I'm on limited time on this one, so at this point I'm not able to get my RPi online. I'd need usb-modeswitch and for this I was going to connect via eth0 ... Fast search and such didn't help so I'll leave this here if someone has some tips how one gets eth0 up and running with dhcp ...

As far as I know, this shouldn't happen. when you run ip addr show what does it say?

lots of people have set this up and have Ethernet working... whether it has correct network settings is another story.

I'll have to check tomorrow, maybe.

Dunno. I even downloaded snapshot again and flashed SD and nothing. Everything works just fine with laptop that runs Pop!_OS ... Just plug in and that's it.

I thought that it should work OOB, but something is wrong.

Da fuq?

I have replied to this ... Let's try again ...

This is after the boot .

I tried with Raspbian Buster and it sure works ... Interesting this.

Me no know how reply ... Tagging thau!

Everything looks normal here... I'm not sure what your concern is. In OpenWrt the LAN is turned into an ethernet bridge, with eth0 part of the bridge ('br-lan'). Later if you configure the wlan0 it will be added to the bridge so that br-lan represents both the eth0 and the wlan0 put together.