this post was submitted on 07 Sep 2023
17 points (90.5% liked)

Selfhosted

40246 readers
1014 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I just installed a mesh WiFi network in addition to my ISP-provided router that could barely reach upstairs. I had some locally hosted services set up as per Mediabox. All containers were set up with my machine IP(?) 192.xxx.x.xx and were working great inside my network, which is all I wanted to do while I'm learning. I noticed today that if I connect via the other, mesh WiFi network that this IP can't be accessed, despite it being the same machine. What's going on?

All advice much appreciated as I am (obviously) a self hosting novice!

you are viewing a single comment's thread
view the rest of the comments
[–] med@sh.itjust.works 3 points 1 year ago (1 children)

Can you give us some more details about how your network, mesh and machines are setup?

Are you trying to access the containers from the machine they’re running on, or from a different machine?

Is the container host moving between different AP’s, or is it on ethernet?

What IP address do you get when connected to the different access points? Does it change?

Are your access points in Access Point only mode, or are they acting as routers? What brand/model?

How are the mesh access points connected - powerline, ethernet, wifi meshing?

[–] 1111@lemmy.world 2 points 1 year ago (1 children)

Sure thing! I'll answer everything as best I can.

The machine is a single laptop running Mint. All the docker containers are being served from this machine, and during this testing I was trying to access them all from that same machine. I observed the containers were up and running properly with docker stats cmd and I saw they were accessible over the original IP when using the ISP WiFi.

The access points are TP Link Deco, it's 3 units, the first of which is connected via ethernet to my ISP provided router (Virgin Media Superhub). I believe they are WiFi meshing. I can't tell too much more about how they work 'under the hood' as the setup was very... 'consumer friendly' and didn't cover much technical detail

When I connect to this network and run ifconfig it looks like the IP changes in the last few digits. I thought if I used that IP with appropriate ports I might be able to view my servers, but that was not the case.

[–] med@sh.itjust.works 2 points 1 year ago* (last edited 1 year ago) (1 children)

If you’re starting the mediabox setup on the isp network, it’s doing local natting with iptables, based on the IP that it resolves from the hostname. Probably would need to shut down and re-up to walk between the deco’s and the isp wifi domains.

I agree with the other comments, looks like you might be in a double NAT scenario - fortunately for you, I think I know how to fix it, seeing as we’re both running deco’s!

You want to go into the smartphone app, go to ‘More’ at the bottom right, (as opposed to ‘Network’), Advanced > Operation Mode > Access point.

Be aware this will cause a disruption, and anything connected to them will need to be reconnected so it gets dhcp/ip addressing from the isp router rather than the deco.

The other alternative is, if they’re already in AP mode, it might be recognizing the deco SSID as a separate network to your ISP’s router, and randomizing your mac address (for anonymity across airports and hotels and such). Then, with your original mac address holding the first IP in lease, your ‘new’ mac address gets a different one. Check your mac with ip link too when connected to the two different networks, and see if you can find an option to set it manually for both networks, or just use your default one for those networks.

I’d love to hear how you get on, I’ve been putting off building this exact solution (mediabox) from scratch, had no idea there was a project set up to run it all

[–] 1111@lemmy.world 1 points 1 year ago (1 children)

Hi!

The hostname thing is weird. I was able to navigate to the hostname in my browser which successfully showed the mediabox landing page (I believe this is 'Homer'), but all the links on there were pointing to the machine IP. If I changed the address to be hostname:32400, maybe it would have worked, but I didn't try that. I guess homer should route to a machine IP not a localhost so as when you land there from another device it properly routes to the machine which can serve the apps.

Aside: Do you (or anyone reading!) know how you do that thing where you alias your machine IP to an arbitrary name? I'm sure I did it once upon a time with 'bonjour'(?), but I don't recall any more than that.

Anyway, turning the deco's onto access point mode solved everything :)

Regarding mediabox - there seems to be a few good projects like this, they are actually incredible and super helpful for a learning perspective. I started with YAMS which actually has miles better documentation and is super helpful for setting up the services. Mediabox seems to assume you know a bit more about how the *arrs work. It sets up the containers and the folder structures really nicely, but for a novice like myself it took some time to get all the applications configured.

It's been a fun project though!

[–] med@sh.itjust.works 1 points 1 year ago* (last edited 1 year ago)

Sweet! Yeah, I’m guessing that the iptables-mangle and landing page link setup relies on getting that IP before populating the page, and that it’s not reactive to changing IP address. It might have worked if you were disconnecting networking all together, and joining a different network, but with the wonky way wifi roaming actually works, the mediabox management scripts probably never noticed there was a need to re-trigger.

You’re looking for mdns! Depends on which distro you’re on. For apt based stuff like mint, look for mdns (used to be libnss-mdns on raspberry pis, guessing it’s the same for mint? It’ll install avahi zeroconf stuff if it’s not there already. Check the service is running, then ping $HOSTNAME.local - replace with whatever your host name is.