XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    How do I/should I disable the local webserver

    Scheduled Pinned Locked Moved Solved XCP-ng
    11 Posts 4 Posters 1.1k Views 5 Watching
    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.
    • olivierlambertO Offline
      olivierlambert Vates 🪐 Co-Founder CEO
      last edited by olivierlambert

      Hi,

      Until XO Lite in XCP-ng 8.3, there's absolutely nothing to inject on the web page that could cause any harm (also because nobody is actually using this page after initial install/deploy). I'll be happy to learn otherwise if it's the case 🙂

      But still, yes you can disable it, let me ask @stormi about it, I forgot myself 😄

      yarozY stormiS 2 Replies Last reply Reply Quote 1
      • yarozY Offline
        yaroz @olivierlambert
        last edited by

        @olivierlambert There is a login form to spin up an instance of XO.. not sure if something can be injected there... but that was another bullet point on their list as well... the password field doesn't have autocompletion turned off. Both are low priority items, and I know the autocompletion css tag doesn't work across the board with all browsers.

        1 Reply Last reply Reply Quote 0
        • olivierlambertO Offline
          olivierlambert Vates 🪐 Co-Founder CEO
          last edited by olivierlambert

          XO is NOT hosted in the Dom0, it's isolated in a dedicated VM, so it's out of the scope of XCP-ng vuln scan.

          1 Reply Last reply Reply Quote 0
          • stormiS Offline
            stormi Vates 🪐 XCP-ng Team @olivierlambert
            last edited by stormi

            @olivierlambert said in How do I/should I disable the local webserver:

            But still, yes you can disable it, let me ask @stormi about it, I forgot myself 😄

            So, there's no parameter to disable the web page, but there's a way to break it on purpose:

            1. Create a new /etc/xapi.conf.d/disable-webserver.conf file, with the following contents:
            web-dir = /var/disableweb
            
            1. mkdir /var/disableweb

            2. xe-toolstack-restart

            The web server will then answer with a HTTP 404 error because it can't find index.html

            yarozY A 2 Replies Last reply Reply Quote 3
            • yarozY Offline
              yaroz @stormi
              last edited by

              @stormi Thank you for the instructions. It works great on most of our servers, but on one of them, we can no longer connect via xo. It gives a connection refused (ECONNREFUSED). I commented out the line in the conf file, and restarted the toolstack, and it connected fine... uncommented, and it went back to the connection refused. Other servers at other sites all work fine. Just this one is giving fits.

              stormiS 1 Reply Last reply Reply Quote 0
              • stormiS Offline
                stormi Vates 🪐 XCP-ng Team @yaroz
                last edited by

                @yaroz Make sure the directory defined in this configuration file does exist on the system (no typo, or omission to create /var/disableweb?), else XAPI will abort, seeing that it does not exist.

                yarozY 1 Reply Last reply Reply Quote 0
                • yarozY Offline
                  yaroz @stormi
                  last edited by

                  @stormi Thank you very much. I didn't even look at the directory name while I was troubleshooting. It was /var/disablweb.. missed an e. All set now.

                  1 Reply Last reply Reply Quote 1
                  • olivierlambertO olivierlambert marked this topic as a question on
                  • olivierlambertO olivierlambert has marked this topic as solved on
                  • J Offline
                    jorgeag68
                    last edited by jorgeag68

                    I was trying the process described by @stormi to disable the web page on XCP-NG 7.6.0 (could not upgrade yet 🙂 ) and it doesn't seem to be working.

                    I got no errors but the web page is still visible.

                    1 Reply Last reply Reply Quote 0
                    • olivierlambertO Offline
                      olivierlambert Vates 🪐 Co-Founder CEO
                      last edited by

                      XCP-ng 7.6? Wow, you should really upgrade ASAP, it's not secure to use it!

                      J 1 Reply Last reply Reply Quote 0
                      • J Offline
                        jorgeag68 @olivierlambert
                        last edited by

                        @olivierlambert Thank you. We'll be looking into it when we upgrade the hardware.

                        1 Reply Last reply Reply Quote 0
                        • stormiS stormi forked this topic on
                        • First post
                          Last post