Is it possible to set up the modem/router for NAT reversal/loopback?

krbk
krbk Posts: 4
I have some self-hosted servers that I've set up with a reverse proxy. It's accessible outside the WiFi network (e.g. on mobile data) but on the WiFi network the site won't load. Some research led to the solution which is to turn on NAT reversal/loopback/hairpinning which has to be done on the router.

I have the Hitron CODA-4680.

I would prefer if I didn't have to buy another router that supports this just for this one feature.

Answers

  • G225 code IRSGE
    G225 code IRSGE Posts: 3,951 ✭✭

    The Hitron CODA-4680 router does not support NAT loopback/hairpinning. This means that you won't be able to enable this feature directly on your current router.

    However, there are a few workarounds you can consider:

    1. Bridge Mode: Put your Hitron router in bridge mode and use a separate router that supports NAT loopback/hairpinning.
    2. VPN: Use a VPN to connect to your web server when you're on the home network.
    3. Hosts File: Modify the hosts file on your devices to point to the internal IP address of your server when you're on the local network.

    @Whizz could confirm this explanation.

  • krbk
    krbk Posts: 4
    Thanks for the answer @G225 code IRSGE. I've been doing a lot of reading and your answers are in line with what I've read. I also saw something about using a split DNS, do you know anything about that as a potential solution?

    I mainly wanted a solution for my phone (android) which would need to be rooted to edit the hosts file. The problem is with an app (immich) that uses a single web/ip address to access the server. For that another workaround is to log out and change the address, but I'm looking for convenience.

    I've used a VPN and that definitely worked, but again this isn't an ideal solution for me.

    With using another router, do you know how I can find out whether a router supports NAT loopback before buying it? It's not something that's explicitly advertised as far as I can tell. TP-Link supposedly supports NAT loopback on many SOHO routers (https://community.tp-link.com/en/business/forum/topic/652270?replyId=1310302) but I have no idea how to know if a router is a SOHO router or not.

    Again, thanks for the response. It's good to hear directly from someone what the options are instead of piecing together what I can from many different websites.
  • G225 code IRSGE
    G225 code IRSGE Posts: 3,951 ✭✭
    edited December 3

     split DNS I don't no sorry!

    SOHO for "Small Office/Home Office".

    TP-Link model here: Help with NAT Loopback/Hairpinning - Home Network Community

    Many models but NAT hairpinning is not free!

    Cisco ISR 4000 Series

    Cisco ISR 4300 Series

    Old: Cisco 1800 Series

    For this kind of thing, it would be better to register on one or more router company forums and ask the question. What you are looking for is quite specialized so you need more professional opinions.