this post was submitted on 20 Feb 2026
15 points (94.1% liked)

Selfhosted

56749 readers
262 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.

  7. No low-effort posts. This is subjective and will largely be determined by the community member reports.

Resources:

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

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Hi, c/selfhosted! This is my first post on Fediverse and I am glad to be making it here.

I recently got fed up with having to use Tailscale to access my server at home and decided to expose it publicly. A friend recommended segregating the server into a dedicated VLAN. My router's stock firmware does not allow that, so I flashed OpenWrt on it (I am amazed how simple and easy the process was).

Getting the router to actually assign an IP address to the server was quite a headache (with no prior experience using OpenWrt), but I managed to do it at the end with a help from a tutorial video on YouTube.

Now, everything is working perfectly fine and as I'd expect, except that all requests' IP addresses are set to the router's IP address (192.168.3.1), so I am unable to use proper rate limiting and especially fail2ban.

I was hoping someone here would have an experience with this situation and help me.


Edit: Solved thanks to @PotatoesFall@discuss.tchncs.de.

I messed around with the port-forward settings with no luck in the past. Instead, disabling the “Masquerade” option in the firewall settings for the server’s VLAN worked.

you are viewing a single comment's thread
view the rest of the comments
[–] talkingpumpkin@lemmy.world 1 points 1 day ago (1 children)

Getting the router to actually assign an IP address to the server

You would typically want to use static ip addresses for servers (because if you use DHCP the IP is gonna change sooner or later, and it's gonna be a pain in the butt).

IIRC dnsmasq is configured to assign IPs from .100 upwards (unless you changed that), so you can use any of the IPs up to .99 without issue (you can also assign a DNS name to the IP, of course).

all requests’ IP addresses are set to the router’s IP address (192.168.3.1), so I am unable to use proper rate limiting and especially fail2ban.

Sounds like you are using masquerade and need DNAT instead. No idea how to configure that in openwrt - sorry.

[–] tal@lemmy.today 2 points 1 day ago (1 children)

You would typically want to use static ip addresses for servers (because if you use DHCP the IP is gonna change sooner or later, and it’s gonna be a pain in the butt).

In this case, he controls the local DHCP server, which is gonna be running on the OpenWRT box, so he can set it to always assign whatever he wants to a given MAC.

[–] mic_check_one_two@lemmy.dbzer0.com 3 points 1 day ago* (last edited 1 day ago)

Yeah, this is my preferred way of doing it. That way I always have a nice compiled list of IP addresses, and if I ever need to change any of them, I have them all in a single menu instead of needing to access each device individually. Just let the server use DHCP, then assign it a static IP in your DHCP server.