Skip Navigation
Port forward to different IP based on destination address in opnsense

cross-posted from: https://lemmy.world/post/14180956

> Hello all you lovely people! > > I'm trying to figure out if I can port forward to different servers based on the destination domain. > > I have a domain with a wildcard cert and I'd like to be able to route all traffic headed towards "1.domain.com" to a server I'm calling "1". I'd still like traffic headed to domain.com to go to where it's currently going, we can call this server "0", and to be able to have a 2.domain.com or 3 or 4 in the future. > > I thought that having a port forward rule with: > interface: WAN > Protocol: any > source: any destination: a url alias including 1.domain.com > redirect target ip: local ip > > Would work, but it doesn't seem to. Any tips?

14
Port forward to different IP based on destination address

Hello all you lovely people!

I'm trying to figure out if I can port forward to different servers based on the destination domain.

I have a domain with a wildcard cert and I'd like to be able to route all traffic headed towards "1.domain.com" to a server I'm calling "1". I'd still like traffic headed to domain.com to go to where it's currently going, we can call this server "0", and to be able to have a 2.domain.com or 3 or 4 in the future.

I thought that having a port forward rule with: interface: WAN Protocol: any source: any destination: a url alias including 1.domain.com redirect target ip: local ip

Would work, but it doesn't seem to. Any tips?

1
Something about The Finals
  • Possibly, but more likely the computer was just in need of some cleaning.

    My friend plays Helldivers 2 on his laptop with integrated graphics on medium and hits 30fps. Any CPU from the last 8 years should be enough.

    For the finals, yeah maybe you need something more powerful than that, but not by much. A 2070 is a fantastic GPU, it would be pretty weird to have a GPU from 2018 but a CPU from way earlier.

  • Determine shutdown cause in OPNSense
  • Final Update: it's the hardware, I think it was overheating in general, but also the SSD seems to have been dying and the ram wasn't particularly reliable, possibly due to the heat.

    Good lesson not to buy the cheapest thing from AliExpress! My new box is working great.

  • Determine shutdown cause in OPNSense
  • UPDATE: It crashed again today, and I was able to pull some logs and check the temperature at the time of the crash. (91 degrees which dropped to 71 degrees right before crashing?

    From system log

    <13>1 2024-03-13T18:30:44-04:00 OPNsense.my.home opnsense 44846 - [meta sequenceId="1192"] /usr/local/etc/rc.newwanipv6: No IP change detected (current: IPV6ADDRESSREDACTED, interface: wan)
    <13>1 2024-03-13T18:30:53-04:00 OPNsense.my.home opnsense 60522 - [meta sequenceId="1193"] /usr/local/etc/rc.newwanipv6: No IP change detected (current: IPV6ADDRESSREDACTED, interface: wan)
    <45>1 2024-03-13T22:12:44-04:00 OPNsense.my.home syslog-ng 10182 - [meta sequenceId="1"] syslog-ng starting up; version='4.6.0'
    <13>1 2024-03-13T22:12:45-04:00 OPNsense.my.home kernel - - [meta sequenceId="2"] ---<<BOOT>>---
    <13>1 2024-03-13T22:12:45-04:00 OPNsense.my.home kernel - - [meta sequenceId="138"] WARNING: / was not properly dismounted
    

    From dmesg

    arp: 192.168.1.61 moved from someMAC to anotherMAC on igc1
    arp: 192.168.1.61 moved from anotherMAC to someMAC on igc1
    WARNING: / was not properly dismounted
    WARNING: /: mount pending error: blocks 40 files 4
    

    I mean, I'm not saying that errors on the drive are the CAUSE of the problem, more likely a symptom, but it does look like it just straight up crashed, right?

  • Determine shutdown cause in OPNSense

    Hi all, I've got a cheap Celeron box running OPNSense and it's been pretty good so far, but I found twice that the device turned off at some point while I was at work, and I have been unable to figure out what's causing it.

    The only change was that I enabled Monit to see if I could figure out what was causing crowdsec to stop sometimes but never ended up configuring anything. I've only been running it for a couple months though, so it's possible that that is not related.

    I know that on a Mac (based on freebsd, right?) you can determine whether the shutdown reason was a hard shutdown, regular shutdown, or the power cable being unplugged. Is it possible to do that with OPNSense? I'd like to narrow it down to software or hardware ideally.

    3
    Determine shutdown cause

    Hi all, I've got a cheap Celeron box running OPNSense and it's been pretty good so far, but I found twice that the device turned off at some point while I was at work, and I have been unable to figure out what's causing it.

    The only change was that I enabled Monit to see if I could figure out what was causing crowdsec to stop sometimes but never ended up configuring anything. I've only been running it for a couple months though, so it's possible that that is not related.

    I know that on a Mac (based on freebsd, right?) you can determine whether the shutdown reason was a hard shutdown, regular shutdown, or the power cable being unplugged. Is it possible to do that with OPNSense? I'd like to narrow it down to software or hardware ideally.

    0
    What Are Some Things You Regret Buying or Bought but Never Used?
  • Wow! My sister got me a pack at Christmas 2 years ago since she remembered me loving them as a kid, and they were just as I remembered. I wonder what changed in 2 years, or if you just got a bad batch.

    That sounds awful!

  • Installing a hardware firewall/DHCP/Wireguard Server
  • Just wanted to update everyone that the wireless router does turn into a 5 port unmanaged switch when changed to AP mode, and that the topology of Modem -> AP's WAN (this is now a Lan port because it's a switch) -> devices is working great!

  • Is apple now reading my keyboard inputs?
  • I think they're referring to this https://lemmy.world/post/9384633

    Though from my reading of it it seems like they got a pretty clear explanation on the top post about what was going on, it doesn't sound like OP's situation.

    I'm very anti-apple, but PeroBasta's post doesn't seem like apple is doing anything weird.

  • Installing a hardware firewall/DHCP/Wireguard Server
  • Cool, that's exactly what my plan is currently. I will eventually run all the cables but I want to drop in this firewall and start learning it in the meantime.

    I may even go the route of some managed switches and WANs that do support multiple SSIDs on different VLANs, but first I want to get comfortable with my new single network.

  • InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)DO
    doctorzeromd @lemmy.world
    Posts 4
    Comments 32