• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

How can I edit the default 404 page?

Scheduled Pinned Locked Moved webGUI
5 Posts 3 Posters 358 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    GeorgePatches
    last edited by Jul 8, 2024, 6:39 PM

    I'm running CE 2.7.2 and I'm getting dinged by Tenable scans at for Tenable plugin 106374. The detection report says the nginx server is using the default 404 page. What directory is this located in so I may tweak it ever so slightly?

    G 1 Reply Last reply Jul 9, 2024, 1:37 PM Reply Quote 0
    • G
      Gertjan @GeorgePatches
      last edited by Gertjan Jul 9, 2024, 1:39 PM Jul 9, 2024, 1:37 PM

      @GeorgePatches

      This : NGINX default error page ?

      These warning (40x) and error (50x) pages can be 'user' designed if you run a public website.
      But for a router firewall local WebGUI ? The only one ghaving access is the admin, a real network pro, who isn't doing things that shouldn't be done.

      The pfSense GUI can't be compared to public web site.

      Normally, and this is neither ™ nor © and not ®, only the LAN interface should be accessed by the admin devices, and other devices if the admin trusts these devices.
      All the other devices : that's why a LAN2 or OPT2 exists. On OPT2, the 'public' (the plugins, whatever) can't have access to the pfSense GUI.
      A plan B could be : firewall rules on the LAN interface that allow webGUI access (port 443 and 80 TCP) to a limit set of the LAN network IPs.

      edit : forgot about plan Z :
      The nginx config file is created by pfSense before it starts.
      So edit the pfSense file that creates this nginx config file, and add your own 'page 40x' details ^^

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      1 Reply Last reply Reply Quote 0
      • A
        AndyRH
        last edited by Jul 9, 2024, 1:47 PM

        The description states it could leak server information. Determine if it does leak server information, then determine if that information is useful server information for a hacker.
        Once you have the facts make the team reporting it as a problem defend their position. The result of that conversation should point you down the correct path. Either blocking access to the WebUI or a note that the finding is acceptable with or without risk.

        One should always remember "Best Practice" is an excellent starting point, but it is not always the ending point.

        o||||o
        7100-1u

        1 Reply Last reply Reply Quote 0
        • G
          GeorgePatches
          last edited by GeorgePatches Jul 9, 2024, 3:47 PM Jul 9, 2024, 3:11 PM

          You guys are applying logic to this issue, that's not how this particular game is played. We are currently engaged in the biggest fight we can have about they way vuls are handled (because the current system is "silly"), but in the mean time if I can make a one liner change and make this finding go away, that's what makes my life the easiest.

          @Gertjan said in How can I edit the default 404 page?:

          edit : forgot about plan Z :
          The nginx config file is created by pfSense before it starts.
          So edit the pfSense file that creates this nginx config file, and add your own 'page 40x' details ^^

          If you could point me to where that is, I'd appreciate the help. 🙂

          EDIT: nevermind, my manager wants me to file the exception.

          G 1 Reply Last reply Jul 13, 2024, 8:58 AM Reply Quote 0
          • G
            Gertjan @GeorgePatches
            last edited by Gertjan Jul 13, 2024, 9:01 AM Jul 13, 2024, 8:58 AM

            @GeorgePatches said in How can I edit the default 404 page?:

            If you could point me to where that is, I'd appreciate the help. 🙂

            I'll show you how to find the way to find the file :

            I presume you have some ideas about where the nginx config file is located, as it is the same as any other device out there that contains a web server :

            /var/etc/nginx-webConfigurator.conf

            That file is full with unique words = perfect grep-food, pick one of them. I chose 'fastcgi_intercept_errors'.
            Now, the sledgehammer solution to locate the file you're looking for : check /etc/ and /usr/ :

            [24.03-RELEASE][root@pfSense.bhf.tld]/etc: grep -R 'fastcgi_intercept_errors'  *
            inc/system.inc:         $intercept_errors = "\t\t\tfastcgi_intercept_errors on;\n";
            

            In /usr/ you'll find :

            Binary file local/sbin/nginx matches
            local/share/vim/vimfiles/syntax/nginx.vim:syn keyword ngxDirective contained fastcgi_intercept_errors
            

            which also contain the word 'fastcgi_intercept_errors' for reasons I don't need to explain ^^

            So /etc/inc/system.inc is your candidate.

            You'll find the function system_generate_nginx_config() where the nginx config file is build.

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            1 Reply Last reply Reply Quote 0
            5 out of 5
            • First post
              5/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received