Problems with Proxy implementation

NethServer Version: NethSecurity 8-24.10.0-ns.1.5.1
Module: proxy

hi all!

i’ve set up the same exact proxy i had on my nethserver 7, imported the correct certificates as it should be, now when i test the proxy i get an nginx error 502 for some reasons i can’t understand how to fix.

how can i help you help me trying to figure out why the same exact proxy used in the nethserver 7 doesn’t work on nethsecurity 8? it’s a really simple implementation that should be almost plug and play but i don’t understand what breaks stuff. i’m not in production and i’m just in a test inviroment at the moment

another useful piece of information:
both the Nethsec and the server i need to reach are in the same DMZ
the nethsec has just one LAN setup
this setup was working fine on nethserver 7

Usually the 502 bad gateway error means that the server at the destination URL doesn’t respond.

Is the destination reachable from the nethsec? You could check using curl:

curl 192.168.0.10:2345

yes i can reach through curl the destination server which is on the same exact subnet of my nethsec.

another useful piece of information:
both the Nethsec and the server i need to reach are in the same DMZ
the nethsec has just one LAN setup
this setup was working fine on nethserver 7

Maybe you need to setup a DNS A record for the domain name to point to the NethSec IP?

ok forgot to mention that, yes i’d done that too

Does it mean there’s just one network interface? NethSecurity needs at least 2 network interfaces, see System requirements — NethSecurity documentation

It’s also possible to use NS8 as reverse proxy. In that case traefik is used, see Proxy — NS8 documentation

i understand, we don’t actually have 2 networks, on the old nethserver it was possible to use just 1 LAN port configured on one network

1 Like

You could use NS8 traefik as reverse proxy, it works with just 1 LAN port.
If you just need a reverse proxy, maybe some nginx container/VM could also do the job.

1 Like

ok this sounds cool to me, just a maybe dumb question but… how do i install traefik in my NS8?

Traefik is a preinstalled core app so it’s already there in “Settings/HTTP routes”, see Proxy — NS8 documentation

ok so i need to install the NethSERVER, i can’t use it in nethsecurity got it

1 Like