I spent all day today trying to get the routing to work correctly between Tailscale, Nginx and Adguard.

Basically I wanted to be able to be able to use **http://immich.network ** to route to 192.168.1.2:9000

I wanted to share the steps I took so people don’t have to go through what I did.

First a few things Local Server IP: 192.168.1.2

  1. I installed Ngnix and Adguard, in a Docker Containers, and gave Adguard IPs 3000, 3001 instead of 80 and 443 because Ngnix took it.
  2. I went to my router and made it use the DNS: 192.168.1.2
  3. I configured Proxy Host in Ngnix … immich.network => 192.168.1.2:9000
  4. I configured DNS rewrite in Adguard … *.network => 192.168.1.2

At this point I was able to use http://immich.network finally. I installed Tailscale to be able to access when I’m outside but http://immich.network didn’t work.

These helped me https://tailscale.com/kb/1019/subnets + https://tailscale.com/kb/1054/dns?q=global+nameserver

  1. I created a subnet… tailscale up --advertise-routes=192.168.1.0/24
  2. I approved it on Tailscale login

At this point I was able to access home server using its local IP 192.168.1.2 but I couldn’t get http://immich.network to work.

  1. I created a nameserver dns with split DNS but I used my local ip… 192.168.1.2 => network

Finally everything is working… I have a feeling that I’m doing it wrong but I’m too tired and it’s finally working.

  • Mir@programming.devOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    I’m glad that the steps helped you, sorry I only saw your comment now because I wasn’t very active here for a while.

    I came back because I was moving from Windows to Linux so I had to redo some stuff, I’m glad I wrote the steps, by helping other I ended up helping myself

    • LifeBandit666@feddit.uk
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      9 hours ago

      What’s amusing is I’m long time stoner. As such, I have a shit memory. I do not remember writing this comment. Nor do I remember even struggling with this. I do know that I had a bunch of .crypt domains for a while.

      So your comment is hilarious because I frequently find my own comments when I’m struggling through that thing I once did that I don’t remember, documenting what I did.

      I do it to help others, I call it “leaving breadcrumbs for those further back on the path” but those breadcrumbs are great when a server dies and you have to re set it up.

      Kudos for being a great guy and leaving breadcrumbs. Karma likes to remind you that you’re a wonderful person sometimes, so just enjoy it, and don’t let the bastards grind you down.

      Rereading my own comment, I do this, I thank people hoping they’re still active at some point. I really do believe in thanking those that help me, even if they may not see it until 10 months later, if at all. You must have been the post that slotted it all into place.