Disabling the Web server?

Introduce yourself to us and other members here, or share your own product reviews, suggestions, and tips and tricks of using QNAP products.
Locked
p-p-s
New here
Posts: 8
Joined: Sun Sep 03, 2017 4:57 pm

Disabling the Web server?

Post by p-p-s »

The Security Counselor app advises "Disable Web Server if not required to enhance system security and mitigate cyber attacks." Am I not locking my own admin access out when disabling the Web server? I know there is also SSH, but even if possible, it does not feel realistic to do all administration on the command line.

Clicking the security check result "Web Server is enabled" in Security Counselor opens Control Panel > Applications > Web Server, where indeed "Enable Web Server" is checked. The Web server functionality which I am using is the QNAP admin interface and rarely File Station and Linux Station. Are these unaffected when I uncheck "Enable Web Server"?
p-p-s
New here
Posts: 8
Joined: Sun Sep 03, 2017 4:57 pm

Re: Disabling the Web server?

Post by p-p-s »

PaulAtreidis wrote: Fri Aug 12, 2022 4:33 pm No, after disabling you are no longer able to run a website from the NAS.
Hi Paul,
Thanks for your fast response!
Not sure I understand your answer. And probably this is my fault, because I put two questions instead of one and also used double negation in the query. So, my bad, the "No" is not clear to me and I am not sure whether "a website" includes the built-in admin Web site. Please can you rephrase?
-Peter
dosborne
Experience counts
Posts: 1811
Joined: Tue May 29, 2018 3:02 am
Location: Ottawa, Ontario, Canada

Re: Disabling the Web server?

Post by dosborne »

In other words.....

The Admin GUI is not tied to the Web Server per se. It is a separate function.
QNAP TS-563-16G 5x10TB Seagate Ironwolf HDD Raid-5 NIC: 2x1GB 1x10GbE
QNAP TS-231P-US 2x18TB Seagate Exos HDD Raid-1
[Deadbolt and General Ransomware Detection, Prevention, Recovery & MORE]
User avatar
OneCD
Guru
Posts: 12144
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Disabling the Web server?

Post by OneCD »

p-p-s wrote: Fri Aug 12, 2022 4:06 pm Are these unaffected when I uncheck "Enable Web Server"?
Correct. Image

QTS actually has two distinct and separate web-servers: the first manages the web UI so you can administer your NAS, the second is for those who want to create a local website and serve web pages from their NAS. Most people will probably never use the second one. And the first can't be disabled.

Whenever QNAP mention "web server", they're always talking about the second integrated web-server. ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
jaysona
Been there, done that
Posts: 854
Joined: Tue Dec 02, 2008 11:26 am
Location: Somewhere in the Great White North

Re: Disabling the Web server?

Post by jaysona »

p-p-s wrote: Fri Aug 12, 2022 5:42 pm ....
Not sure I understand your answer. And probably this is my fault, because I put two questions instead of one and also used double negation in the query. So, my bad, the "No" is not clear to me and I am not sure whether "a website" includes the built-in admin Web site. Please can you rephrase?
-Peter
QNAP's QTS has two distinct "web servers" that serve (pun partially intended) two very distinct purposes;

The first web server is:
  • thttpd (tiny/turbo/throttling HTTP server)
This is the webserver that is used for the QTS Admin webpage, and all of the QNAP (crap) apps (which have been consistency exploited for the past 6+ years) which are typically accessible via tcp port 8080 and tcp 443 (via stunnel).

For the curious here, the thttpd server is managed by the .sh file /etc/init.d/thttpd.sh and the .cgi-bin binaries it serves are listed in /etc/thttpd.conf


The second web server is:
  • Apache
This is the "web server" that the QNAP Security Counselor is referring to. This server is also lower risk for gaining unauthorized access to the NAS. There are security risks with this Apache server as well though. QNAP has utterly decimated the Apache confirmation and security model, which means websites (Wordpress, Drupal, etc) can be easily exploited which could make certain website files and possibly some other NAS system directories accessible.

For the curious here, the Apache server is managed by the .sh file /etc/init.d/Qthttpd.sh and the config files (mostly overwritten on re-boot) are located in /etc/config/apache/

The TLS connections actually are not handled by either httpd server, TLS connections are manged and handled by stunnel (another one of QNAPs stunningly stupid security moves) which is managed by /etc/init.d/stunnel.sh and the config files are in /etc/config/stunnel/


That said, the biggest risk for any QNAP system is making tcp 8080/433 accessible from the Internet. If the QTS Admin webpage is accessible from the Internet, the NAS will eventually be compromised and there will be tears.
RAID is not a Back-up!

H/W: QNAP TVS-871 (i7-4790. 16GB) (Plex server) / TVS-EC1080 (32Gig ECC) - VM host & seedbox
H/W: Asustor AS6604T (8GB) / Asustor AS7010T (16GB) (media storage)
H/W: TS-219 Pro / TS-509 Pro
O/S: Slackware 14.2 / MS Windows 7-64 (x5)
Router1: Asus RT-AC86U - Asuswrt-Merlin - 386.7_2
Router2: Asus RT-AC68U - Asuswrt-Merlin - 386.7_2
Router3: Linksys WRT1900AC - DD-WRT v3.0-r46816 std
Router4: Asus RT-AC66U - FreshTomato v2021.10.15

Misc: Popcorn Hour A-110/WN-100, Pinnacle Show Center 250HD, Roku SoundBridge Radio (all retired)
Ditched QNAP units: TS-269 Pro / TS-253 Pro (8GB) / TS-509 Pro / TS-569 Pro / TS-853 Pro (8GB)
TS-670 Pro x2 (i7-3770s 16GB) / TS-870 Pro (i7-3770 16GB) / TVS-871 (i7-4790s 16GB)
p-p-s
New here
Posts: 8
Joined: Sun Sep 03, 2017 4:57 pm

Re: Disabling the Web server?

Post by p-p-s »

Thanks @dosborne and @OneCD . Now it is clear. I probably started the user workload Web server (the Apache HTTP server) once for some testing and forgot (or my sons did). I turned it off.

@QNAP: if you are reading this, it would be worth putting a small hint at Control Panel > Applications > Web Server close to the "Enable Web Server" checkbox saying that by unchecking the checkbox here, the system Web server for administration, File Station, Linux Station and the other QNAP apps will not be affected. There is already an info "i" at that spot. When clicked, it displays "You can refer to the following instructions to check the version and information..." Put the comment that admin UI and QNAP apps will not be affected by closing this user workload Web server in front of it.

Topic closed.

@Jaysona, thanks for the detailed remarks on the two httpd and the stunnel.sh. Indeed raising questions. Being tiny, i.e. functions greatly limited to the needed ones, being completely separate from the user workload Web server and not being a mainstream product, are three aspects which are good for security and the throttling is good for limiting the resource footprint. But if thttpd is not done well in itself and not patched fast enough when vulnerabilties become known... Anyway, you are probably right that the admin UI should never be exposed directly to the Internet. If the Apache httpd needs to be accessible from the Internet, working with dedicated low priviledge users is key as well as working with the virtual switches to completely separate the access from the Internet on an IP of its own - and in addition a perimeter firewall.
dosborne
Experience counts
Posts: 1811
Joined: Tue May 29, 2018 3:02 am
Location: Ottawa, Ontario, Canada

Re: Disabling the Web server?

Post by dosborne »

As far as I am aware, QNAP never references the admin console / GUI as having anything to do with the Web Server (Apache) and as it runs completely separate, I'd actually think it would make it more confusing for less knowledgeable people to be warned about something that doesn't really apply :) As the web server is disabled by default, most people would actually be using the GUI to enable it :) and the list of affected functions would be huge. I've seen a combined system like that in 30 years, and for good reason, it would be impossible to manage.

A huge warning notice would be in order if both functions (admin and user web services) were tied to the same process as any configuration change to one system would affect both. Restarts, maintenance etc.but, they aren't so no issue.

Not trying to cut down your ideas (and no, this is not a QNAP reporting forum, just a community of users), but personally, don't think it necessary these days.
QNAP TS-563-16G 5x10TB Seagate Ironwolf HDD Raid-5 NIC: 2x1GB 1x10GbE
QNAP TS-231P-US 2x18TB Seagate Exos HDD Raid-1
[Deadbolt and General Ransomware Detection, Prevention, Recovery & MORE]
User avatar
jaysona
Been there, done that
Posts: 854
Joined: Tue Dec 02, 2008 11:26 am
Location: Somewhere in the Great White North

Re: Disabling the Web server?

Post by jaysona »

p-p-s wrote: Sun Aug 14, 2022 1:27 am ....
@QNAP: if you are reading this, it would be worth putting a small hint at Control Panel > Applications > Web Server close to the "Enable Web Server" checkbox saying that by unchecking the checkbox here, the system Web server for administration, File Station, Linux Station and the other QNAP apps will not be affected.
....
QNAP is not reading this, anyone that has any input and oversight of product design is not reading this.

This is what you need to do to contact QNAP:
viewtopic.php?f=24&t=161411
RAID is not a Back-up!

H/W: QNAP TVS-871 (i7-4790. 16GB) (Plex server) / TVS-EC1080 (32Gig ECC) - VM host & seedbox
H/W: Asustor AS6604T (8GB) / Asustor AS7010T (16GB) (media storage)
H/W: TS-219 Pro / TS-509 Pro
O/S: Slackware 14.2 / MS Windows 7-64 (x5)
Router1: Asus RT-AC86U - Asuswrt-Merlin - 386.7_2
Router2: Asus RT-AC68U - Asuswrt-Merlin - 386.7_2
Router3: Linksys WRT1900AC - DD-WRT v3.0-r46816 std
Router4: Asus RT-AC66U - FreshTomato v2021.10.15

Misc: Popcorn Hour A-110/WN-100, Pinnacle Show Center 250HD, Roku SoundBridge Radio (all retired)
Ditched QNAP units: TS-269 Pro / TS-253 Pro (8GB) / TS-509 Pro / TS-569 Pro / TS-853 Pro (8GB)
TS-670 Pro x2 (i7-3770s 16GB) / TS-870 Pro (i7-3770 16GB) / TVS-871 (i7-4790s 16GB)
Locked

Return to “Users' Corner”