I'm under CG-NAT and DHCP but port forwarding worked, why? - eviltoast

After learning about CG-NAT and DHCP, in hindsight I’m wondering why it worked. I got a few ideas why but could someone explain?

Was it because it was all within LAN, and not remotely from outside LAN? So anything within LAN will work even under CG-NAT?

Was it because it was just the PC and the router, and doing something like sshing into PC from phone would’ve not worked? I.e, device-to-device wouldn’t work but device-to-router does?

Was it because I have both ipv4 and ipv6 (according to wifi settings on my phone), and ipv6 isn’t affected by CG-NAT?

I can’t remember exactly what the issue DHCP brings for port forwarding, remote access, ssh, etc. is but I feel like there was something and the solution was static IP or DDNS. Might’ve been a selfhosting thing? idk

  • ADB-UK@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    It is possible your router supports hair-pinning or (NAT loopback).

    When it detects you are trying to access the external IP address (even if it is cg-nat) it is smart enough to router the data basin internally and some are smart enough to apply firewall rules as well…