Adding a second virtual host to my VM would work, but breaks some goals I realize I didn't mention. The VM is meant to model a Linode VM that hosts my public presence, including the backend for an open-source Android "Scrabble" clone I've been maintaining for a couple of decades. I try to keep my local VM as close to it as possible so I can test things there first.
So I want to add new LAN hosts without touching the existing one. Regardless, what I hoped to do is outside the scope of non-expert use of OpenWRT. Which is ok. Russell's summary of OpenWRT building makes sense. I think of OpenWRT as being about allowing Linux beginners to run a router, but it's at least as much about making the most of really cheap hardware. It's possible I'd be better off running something much closer to the Debian I know well on a Raspberry Pi-class device with a couple of NICs, or a PC Engines board. I can live without a GUI for firewall configuration. Thanks! --Eric > Message: 8 > Date: Fri, 11 Dec 2020 17:29:06 -0800 > From: Russell Senior <[email protected]> > To: "Portland Linux/Unix Group" <[email protected]> > Subject: Re: [PLUG] OpenWRT and http routing by host > Message-ID: > <cahp3wfpiagsnagvso9qvrd8xmg6ivjhoqkn2zjz9gtexvhw...@mail.gmail.com> > Content-Type: text/plain; charset="UTF-8" > > On Fri, Dec 11, 2020 at 4:05 PM Eric House <[email protected]> wrote: > > > > There seems to be a lot of OpenWRT expertise on this list. Having > > failed to find an answer by googling, I'm posting with crossed > > fingers. > > > > At home I run a webserver for goofing around. I've only had one domain > > hosted there and so OpenWRT needed only to forward all traffic on 80 > > and 443 to the VM for that domain. Now I want to add a second domain. > > Rather than add a second server config to nginx on the VM I want > > OpenWRT to forward to a different LAN host based on the domain > > targeted by incoming http{,s} traffic. > > OpenWrt is only going to see an IP address, so it doesn't know how to > port forward any differently, unless you have multiple IP addresses, > which would be unusual. I'd sink the effort into learning nginx > configuration of a second domain on the same server if I were you. Or, > as Tomas suggests, configure it to proxy to connection to a different > local server. > > > [...] And given that OpenWRT doesn't seem to handle upgrades very > > well once you have non-stock packages involved I'm not confident the > > setup will remain trouble-free. > > Bear in mind that OpenWrt is designed to fit into the storage space > equivalent to a handful of floppy disks, running a modern kernel and > userspace. In order to optimize the space it has, it does normally > make a lot of that storage space immutable, which makes in-place > upgrades difficult. However, if you have a set of packages you want, > you can either build it from source, or use the ImageBuilder (I have > less experience with the latter, I tend to build whole firmwares from > source) to integrate your packages into the squashfs integrating your > own configuration, and then you can turn out your own versions as > often as you like, trading off your compile time and configuration > maintenance effort. > > There are some OpenWrt tricks to building exactly what you want, > .config stubs to start from, a files overlay that gets integrated into > your firmware so it works on first boot with no post installation > twiddling. > > -- > Russell Senior > [email protected] My g-bike can trounce your e-bike! _______________________________________________ PLUG: https://pdxlinux.org PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
