Snap versions of router / gateway based software

Sitting in isolation thinking, it would be really cool to have an ubuntu based router / gateway. I never trust the software on “normal” routers even ones that cost hundreds of pounds. And the Ubuntu Core / Snap ecosystem sounds perfect! However i’m not sure if it’s just me but there seems a lack of router based software that’s snapped and ready to go.

Pluses would be

  • Ubuntu is actually supported and receives security updates.
  • Confinement from core and snaps should hopefully reduce the router getting pwned.
  • All the great update features of snaps (rollback, updates etc)
  • Ability to add new capabilities with more snaps :slight_smile:

Some requirements for this would be

  • NAT routing
  • DHCP server
  • DNS server
  • Some kind of configurable firewall
  • VLAN segmentation ability
  • QoS for traffic prioritisation

I’m sure there’s features i’ve missed, and this is probably quite a vague idea, but it’s something I think would be really cool, and allow me to create my own reliable router / gateway.

Interested to hear what others think.

3 Likes

I would totally love an appliance to do this. It would likely replace my aging openwrt netgear box.

The problem I have is what hardware to get. Something which has multiple GbE physical ethernet ports would be a must (for my use case) - at the minimum two. So I could attach one to my cable modem and one to the rest of the network. I appreciate others might need more interfaces, but I think two is the minimum viable product.

I guess one could use a raspberry pi with a supported USB ethernet adapter, as a real base MVP. Did you have a hardware target in mind?

1 Like

for firewalling on Ubuntu Core we do have UFW in the store, that should help with NAT and general firewalling …
there is a network-manager snap with which you could achieve a few of the other tasks (DNS/DHCP) …

Personally I’d like something with a nice pretty web UI :smiley:

3 Likes

I was thinking the same hardware wise, the only thing I can find that has two ethernet ports built in is something ITX size, but that could be a bit too large / power hungry :thinking:

The Orange Pi R1 is designed exactly for this.

The sell them on Ali Express. https://www.aliexpress.com/item/32827494728.html Would need a kernel, but I know @ogra has done this for other devices in the range before :slight_smile:

2 Likes

yikes that’s cheap! I’ll take 10!

There was - once upon a time - an OpenWRT proof of concept snap. I never tried it, personally, this was ~3-4 years ago. Maybe we could resurrect or be inspired by the code that was used to make it. https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/openwrt/+ref/master

I suspect a lot has changed in those 3 years. If it’s possible to get OpenWRT (or LeDe or whatever is the current best choice - I don’t know) prototyped, tested and published, that would be a good starting point, maybe?

Nowadays is just OpenWRT left; they joined back.

As for the hardware: I saw this the other day and I thought that it would really make a great choice for something like this:
https://www.cnx-software.com/2020/01/16/nanopi-r2s-dual-gigabit-ethernet-sbc-router-is-powered-by-rockchip-rk3328-soc/

That even works with FriendlyCore: http://wiki.friendlyarm.com/wiki/index.php/NanoPi_R2S#Work_with_FriendlyCore
a Ubuntu Core ¿fork?

However it does not integrate WiFi…

no, a mis-named self-brewed ubuntu classic from an Ubuntu Base tarball… (that naming has already caused quite a lot of issues …)

Well, that’s really misleading, yes…

What about this @ogra? How “hard” would it be to get proper Ubuntu Core support for devices like those?

Thanks!

Typically the rockchip devices are having basic support upstream (or in the ubuntu kernel tree) with just needing proper config options set … if this is the case bringing up an initial basic image for such a board is a matter of an afternoon for an experienced person and perhaps in max a week of afternoons for someone less experienced :slight_smile:

here are some rockchip gadgets that could serve as templates:

https://github.com/ogra1/rock64-gadget

https://github.com/ogra1/nanopc-t4-gadget-snap

https://github.com/ogra1/tinkerboard-gadget