Accessing NetBox via VPN - URL rewrite issue

39 views
Skip to first unread message

xav....@gmail.com

unread,
Oct 14, 2020, 11:59:20 AM10/14/20
to NetBox
I guess this issue isn't strictly a NetBox one and more of the VPN with external IP 194.51.x.x.
I'm having a strange issue with a Pulse Secure device I'm using to access NetBox from outside the company network.
I have set up the web page access from the Pulse Secure side, and it connects to NetBox fine. But when I want to go to a device in a rack, it doesn't work as it uses NetBox's internal FQDN and that is not re-written by the VPN.
Interestingly, clicking on "add device" links in empty rack slots works. It's just when devices are present that it doesn't (and their images don't show as the URL to those isn't re-written either).

If anyone has come across this and found a fix or workaround, that would be great. I'm on NetBox v2.9.3.

Image for illustration with mouse pointer over device showing target URL bottom left which is the internal FQDN one and not the re-written one to make it available from my remote VPN connection.
2020-10-14 15_51_19-Window.png

Radim Kabeláč

unread,
Jan 5, 2021, 6:38:16 PM1/5/21
to NetBox
Hi,
you need to configure well your proxy server.
I found that I have a bad conf NGINX:
So i change in NGINX:
             proxy_set_header X-Forwarded-Host $server_name;   to    proxy_set_header X-Forwarded-Host $http_host;
              and add to server_name ALL  possible server names (we have 3 and dont use IP).

http://nginx.org/en/docs/http/server_names.html

Dne středa 14. října 2020 v 17:59:20 UTC+2 uživatel xav....@gmail.com napsal:
Reply all
Reply to author
Forward
0 new messages