OPNsense Forum

English Forums => Web Proxy Filtering and Caching => Topic started by: cclloyd on November 14, 2018, 02:46:03 am

Title: Nginx Proxy not working?
Post by: cclloyd on November 14, 2018, 02:46:03 am
Here are my settings: https://imgur.com/a/2aa6CRY

I'm trying to use the nginx plugin to add a few proxy addresses to my network.  For example, I want to proxy `nzb.example.com:80` to `10.0.1.11:6789`, but with the above settings, when I go to nzb.example.com, it times out when trying to connect.

Any advice on configuring this plugin?
Title: Re: Nginx Proxy not working?
Post by: fabian on November 14, 2018, 11:53:22 pm
The configuration looks almost ok but you have to add the upstream in the location and what probably caused the issue is some kind of a host firewall or routing issue. Please check that with tcpdump.
Title: Re: Nginx Proxy not working?
Post by: cclloyd on November 15, 2018, 01:23:30 am
Ok I added the upstream server to the location.  I still can't connect.  I doubt its a firewall issue because I'm accessing it on LAN, and ufw is disabled on the machine its trying to proxy to.

I am not familiar with tcpdump, but when I tried to access it in the ssh shell, I couldn't immediately see any useful information.

If it means anything, the page I'm trying to connect to is also protected by a .htpasswd file.
Title: Re: Nginx Proxy not working?
Post by: fabian on November 15, 2018, 05:34:31 pm
if curl -v http://example.com:3456/ from OPNsense is also not working, then you may get some more detailed information.

You can also run the packet capture from the web interface when you are using nginx. You can also use some server in the internet as an upstream server to check if your nginx server configuration works (you should get any site or an foreign error page from that server you have entered).