cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple subnets with nginx

2E0VEB
Dabbler
Posts: 11
Registered: ‎07-07-2024

Multiple subnets with nginx

Bit of a weird one this.

 

Had a reason to change from a /24 to /16 on my local network.

 

I run a number of services locally which i use nginx to reverse proxy.

 

This worked absolutely fine until the change.

 

Locally i can still access these services through the local ip address/path.

 

Using another network, i can access these services with sub.domain.tld.

 

However, internally, i cannot. I can ping them, they all resolve to my static ip no problem.

 

Spent many hours trying to tweak settings - everything else works absolutely no problem, but this is a niggle for me and doesn't help with testing to ensure these services work from outside my network.

 

I had wondered if this was something to do with nginx not liking to route traffic across subnets but i'm reading more about hairpin nat and wonder if anyone knows if this is relevant or has any other thoughts?

 

I run pihole so i *could* setup some local DNS records BUT not all these services are accessible from a simple IP, they require a path. For example http*://192.168.3.1/servicename.

 

*These services are all exposed to the web as https with valid certificates - which i can still generate.

 

I've tested using a vpn and can access these no problem.

 

Ran out of ideas so if anyone has any thoughts, they'd be appreciated!

 

Thanks