Post QLocker Attack - Secure NAS Setup questions

Don't miss a thing. Post your questions and discussion about other uncategorized NAS features here.
Post Reply
Bitrudeuk
Starting out
Posts: 13
Joined: Fri Aug 06, 2021 5:30 am

Post QLocker Attack - Secure NAS Setup questions

Post by Bitrudeuk »

Hi all,

Long time surfer since buying my NAS back in 2019, time to be a contributor after much reading and digesting, as I still have some questions please :?:

So after being hit by Qlocker earlier in the year :ashamed: , I have taken steps to beef up my security, though would appreciate some additional help to make sure i'm water tight going forwards? :wink:

I bought myself a Asus RT-AX88U to replace my ageing BIPAC Billion router and have installed Asuswrt-Merlin 386.3 on it and now have Windscribe VPN running on it too. It's fully locked down, with no open ports!

My NAS is a TS-251+, running QTS 4.5.4.1741. I have the QUFirewall, Malware and Security Counselor installed and I also added Windscribe to the NAS via QVPN. I removed most of the additional programs that I don't and wouldn't use, though noticed certain ones like the Multimedia Console keep coming back? I have minimserver 2.0.12 and Plex Media Server 1.23.6 additionally installed. I have switched the admin account to a second account and have also locked down file access on the NAS to admin only.

I have then switched off all Network and File services suggested by the Security Counselor and anything else listed on the QNAP site for strengthening the NAS security. I have access via HTTPS and a random port and did set up a Cert via Let's Encrypt and myqnapcloud, though switched this off after reading various threads on here suggested that myqnapcloud could be a backdoor into the system and having to open ports on my router, for Let's Encrypt to renew certs, seemed counter productive to locking the place down? This leaves me with an issue of accessing via the local IP address, which is showing as unsecure? Whilst I appreciate I am in theory on a local home network and running a VPN and therefore "secure", I would still prefer access to be via a "secure" means, or is this as good as it gets? Also, in the future I may want to have access to my NAS from outside of my LAN, so may well have to do this via myqnapcloud and be as safe as I can be, as I am unsure how to use SSH etc?

My current aim is to be able to access my music whilst at home on my Bose system via the minimserver and to be able to access my other media via Plex when at home and away. The long term plan is to have a VPN tunnel between two RT-AX88U routers at two different properties, but for the time being, I just want to be secure whilst at home and can then start working out my next steps to linking both households?

Despite my above efforts, the QUFirewall continues to block around 50 packets an hour, down from 2,000 an hour since disabling Multimedia Console last night. Are these blocked packets a sign that something is still open to the WAN, or is this to be expected and the firewall is just doing it's job (I think the former)? I no longer have anyone trying to access the NAS via brute force attacks (for now), like was happening at the time of the Qlocker attack, though I am not entirely convinced I am "off grid" quite yet?

Thankfully in the attack I only lost my music, which was backed up. I am yet to remove the locked files from the drive and am wondering if instead of just removing the locked music files and re-uploading the backed up ones, I should preform a re-format of the drives? Or can I be content that the QLocker and any other issues were removed by the Malware remover?? I run a Malwate and Antivirus scan each night, as well as a Restart and Firmware check.

I've tried to provide as much info as I can think of, but i'm sure I will have missed something you might need to help me out, so please fire away :wink:

Can anyone think of something that I might have missed, that has left a door open or how I might make it so I don't have any blocked packets going forwards? How do I set up a secure connection without opening any ports, that might become compromised? And should I start from scratch? :S :'

Thanks in advance

Bit
User avatar
dolbyman
Guru
Posts: 35215
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Post QLocker Attack - Secure NAS Setup questions

Post by dolbyman »

1. Do not forward ANY ports from WAN to your QNAP (make sure upnp is disabled on the router)
2. Setup a VPN server on your router (a commercial annonymizer client VPN is not for remote access)
3. Remove Qfirewall and stop malware remover as it's not needed or even useful
4. ignore SSL as it's not needed or working when accessing your NAS via internal private IP's (vs. FQDN)


Was the NAS started from scratch (clean drives and autostart cleanup) after the infection ?
Bitrudeuk
Starting out
Posts: 13
Joined: Fri Aug 06, 2021 5:30 am

Re: Post QLocker Attack - Secure NAS Setup questions

Post by Bitrudeuk »

dolbyman wrote: Sat Aug 07, 2021 2:08 am 1. Do not forward ANY ports from WAN to your QNAP (make sure upnp is disabled on the router)
2. Setup a VPN server on your router (a commercial annonymizer client VPN is not for remote access)
3. Remove Qfirewall and stop malware remover as it's not needed or even useful
4. ignore SSL as it's not needed or working when accessing your NAS via internal private IP's (vs. FQDN)


Was the NAS started from scratch (clean drives and autostart cleanup) after the infection ?
Cheers dolbyman

NAS has not been started from scratch since infection.. So probably should right?

1 - UPNP is disabled anywhere and everywhere! No ports are forwarded anywhere that I am aware of, unless the NAS has done it behind my back?
2 - Noted, thanks. I shall have a read up of how to do that! In my naivety I though that I would be able to set up a tunnel with Windscribe... I am guessing that once I have my own VPN server set up, there is no need for the commercial VPN as everything would go via the new server?
3 - Noted
4 - I only have to worry when I want to access from outside right, further down the line, but not before 2 is done properly!

Right, guess I will be starting from scratch over the weekend and then reading about Point 2 a lot! :wink:

Cheers
User avatar
dolbyman
Guru
Posts: 35215
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Post QLocker Attack - Secure NAS Setup questions

Post by dolbyman »

NAS should be started from scratch .. you have no idea what leftover programs/backdoors would be left.

1. Only upnp would be "behind your back". If that is off it should be ok
2. No, with all sorts of sponsored Influencers and Social Media constantly talking about VPN as the best thing since sliced bread (it's just for anonymization or country unblocking .. I would never use it for banking etc.) many people immediately think of those when hearing VPN
4. That is the thing .. NEVER access your NAS from WAN (not even till 2. is done). a VPN creates a tunnel that is encrypted .. there is no need for any SSL cert then. If you are worried about SSL when accessing anything from WAN, you are doing it wrong.
Bitrudeuk
Starting out
Posts: 13
Joined: Fri Aug 06, 2021 5:30 am

Re: Post QLocker Attack - Secure NAS Setup questions

Post by Bitrudeuk »

Great thank you.

I'll inform the wife i'll be "busy" this weekend!

I'll probably keep the VPN for the country unblocking stuff and restricting advertising, but did indeed see it as a security measure as well. I stupidly linked it to being able to remote access via "VPN", like I do with the token work issue! School boy error...

4 - Got you, I will only ever be at the end of the VPN tunnel I create, if everything has gone according to plan! Or do I set up the server for both internet and local traffic? That's still secure right?

I guess I will have to set up a split tunnel on the router if I do both connections, one for say using the commercial VPN for Netflix and whatever else I want to put via the commercial VPN and then everything else through the VPN sever I create for security?

Thanks again
Bitrudeuk
Starting out
Posts: 13
Joined: Fri Aug 06, 2021 5:30 am

Re: Post QLocker Attack - Secure NAS Setup questions

Post by Bitrudeuk »

Ok, so I think I have my server up and running...

Do I need to do anything else? Should I upload the client file that is generated from the router, so that the NAS's default gateway is the home VPN server I just created?

Cheers
User avatar
dolbyman
Guru
Posts: 35215
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Post QLocker Attack - Secure NAS Setup questions

Post by dolbyman »

The NAS has to do nothing to be accessed by the VPN. That client file is for your clients .. not your NAS.
Bitrudeuk
Starting out
Posts: 13
Joined: Fri Aug 06, 2021 5:30 am

Re: Post QLocker Attack - Secure NAS Setup questions

Post by Bitrudeuk »

Got you, though how does running the VPN server make any difference in protecting the NAS day to day, if I am not connecting from outside? I thought I had it understood, but now i'm confused again... Sorry
User avatar
dolbyman
Guru
Posts: 35215
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Post QLocker Attack - Secure NAS Setup questions

Post by dolbyman »

Day to day your NAS is protected by your router firewall + the fact that it is behind a NAT

Without port forwarding or an existing connection initiated by NAT, your NAS will not be reachable from WAN.

https://en.wikipedia.org/wiki/Network_a ... ranslation
Bitrudeuk
Starting out
Posts: 13
Joined: Fri Aug 06, 2021 5:30 am

Re: Post QLocker Attack - Secure NAS Setup questions

Post by Bitrudeuk »

Ok thanks that makes sense, so in theory I am as tight as I can be! And once I reset the NAS from scratch and shut it all down again, everything should be fine...
User avatar
dolbyman
Guru
Posts: 35215
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Post QLocker Attack - Secure NAS Setup questions

Post by dolbyman »

for random outside attacks, certainly
Bitrudeuk
Starting out
Posts: 13
Joined: Fri Aug 06, 2021 5:30 am

Re: Post QLocker Attack - Secure NAS Setup questions

Post by Bitrudeuk »

dolbyman, I just wanted to say thank you. I've managed to set up my own OpenVPN server and remotely access my NAS and the Plex server running on it, without opening any ports!
Post Reply

Return to “Miscellaneous”