I used to be a customer of popular cloud backup service Livedrive. The upload and download speeds were nothing to shout about and one annoyance was having to pay extra to add a NAS drive to your account, but there is a workaround!
All you need to do is add a symbolic link to your NAS drive from your computer. Think of a symbolic link as a fancy shortcut, the only difference being it masks the destination instead of taking you straight there – you’ll see what I mean when you read on.
Imagine you have a Windows computer with your NAS drive with the root of the drive already mapped to Z:, you have a folder on your NAS called MyFiles and would be able to browse to Z:\MyFiles to see whatever is stored there. Next imagine we have a folder called C:\Backup which is already uploading to your Livedrive account, using the following command we will make C:\Backup\MyFiles lead to your NAS and in turn be included with your Livedrive backup.
mklink /d "C:\Backup\MyFiles" "Z:\MyFiles"
For me, this worked absolutely fine and I had a couple of TB uploaded without ever being caught out. I’ve since jumped ship to Amazon Drive, whilst it is more expensive per year I’ve got it running from multiple computers and the upload and download speed always tops out my connection, so I can’t complain!
- Use the above guide at your own risk – I won’t be held liable if anything happens to your Livedrive account, files or anything else because of this!
- This doesn’t work with Dropbox or Google Drive – sorry
- You only need to run the command once, after that the link will be remembered
- To remove the link just delete it as you would any other file or folder
Recently I created a script that uses the Bad Bots database where a list of bad bots is retrieved and then parsed into iptable firewall rules to prevent further access from known bad hosts.
More information can be found at GitHub here.
There may come a time in your nerdy life where you want your computer to automatically log in at boot or whenever anybody signs out, this can be especially useful if you are running software that needs a user to be constantly logged in.
For example, I run CCTV software on my computer via a user called Console, the software displays live camera feeds on a second screen at my desk, the same signal is fed via a splitter through network cables eventually reaching various screens dotted around my house.
The setup requires my Console user to be constantly logged in, be it when the system boots or after I have finished checking my emails or being nerdy.
It is fairly straight forward to get going, in my case on Windows 10 Pro I ran the built-in netplwiz(.exe) utility and added one string value to the registry.
Part 1: Configuring automatic login at boot
- Run netplwiz(.exe) and uncheck the box saying Users must enter a username and password to use this computer.
- Press OK then enter the username and password you want the computer to automatically login as and press OK again
That’s the first part completed, so now whenever you boot your computer it will automatically sign in as the user account you have set.
Part 2: Configure automatic login when signing out/switching user
The next part involves adding a regsitry key with a string value, once this was done I found it worked straight away without having to reboot my machine.
- Open regedit(.exe) and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Right click on Winlogon and select New > String Value
- For the value name enter ForceAutoLogon, double click the line you just added and enter the value date to 1
That’s it! Now when you sign out it will automatically sign back in to the user account set in first step.
- If you want to log in as a different user, hold the shift key whilst locking your account, you’ll then see the normal Windows login screen
- You can do step 1 via the registry if you want, but why over complicate things!
The following commands can be used to install Webmin 1.610 on CentOS 5.8. Make sure you’re logged in as root and then follow the steps below.
Select a temporary directory to save the download to. We will only use the downloaded file once so it’s pointless keeping it.. free up space and put it in /tmp!
Begin the download of Webmin using wget:
Install Webmin by unpacking the archive:
rpm -Uvh webmin-1.610-1.noarch.rpm
Done! You can now login to your fresh installation of Webmin by heading to http://hostname-or-ipaddress:10000 using the root username and password.
- If you don’t have a server to try this on I’d recommend DigitalOcean hands down – virtual servers start from $5 a month
Recently I began to see an increase in malicious login attempts to my servers from bots (ie. automated attempts to login via FTP, POP/IMAP, SSH and so on) which gave me an idea for a new side-project on NerdTools known as the Bad Bots Intrusion & Spam Detection database.
After a few hours of developing a database was generating before my eyes of all the bad bots and their failed attempts, which then got me thinking, aside from using the database with a firewall can this be intergrated with WordPress to stop spam before its even posted?
A few more hours developing and I have now created two plugins which are listed in the WordPress extension directory. One is called NerdTools Bad Bots Spam Reporter which cleverly and annonymously reports the IP address of an author whenever a comment is classed as spam, and the other is called NerdTools Bad Bots Spam Defender which again annonymously screens every authors IP address against the database and if a match is found it won’t allow the comment to be saved.
Going a little deeper into the reporting plugin; when a comment is classed as spam the authors IP address is reported to the database but it won’t be entered straight away, our system will wait and see if any patterns form, if so it will then be entered and further comments will not be allowed.
It may seem madness having two seperate plugins to work as one but I didn’t want to force people into reporting comments if they don’t want to and vice versa with the defending plugin.
In terms of infrastructure the database is hosted on a high performance SSD server which has memcache enabled. Future plans include clustered servers for even greater performance.
Not bad for a few hours work!
For a while now I’ve used a cheap SunLuxy H.264 DVR as the heart of the CoopCam project and initially couldn’t get a direct link to the camera stream so had to screen captured the bog standard web interface using VLC and break the feed down into separate streams but recently after a fair bit of trial and error I discovered a much easier solution!
I had researched on and off for months, went through masses of trial and error with various software and ultimately found no solution but after being inspired again I headed to the DVR’s web interface to start from scratch. I stumbled across source code in a file called /js/view2.js that constructs an RTMP:// address to show live camera feeds through the web interfaces flash player – See snippet of code below:
dvr_viewer.ConnectRTMP(index, "rtmp://" + location.host, "ch" + index + "_" + (dvr_type=="main"?"0":"1") + ".264");
After removing the jargon the link came out as rtmp://dvraddress:port/ch#_#.264 with the first number being the channel you want to connect to (starting at 0) and the second being the stream (substream being 1 and main being 0)
I headed to VLC player, selected Open Network Stream and entered the following:
Broken down you can see my DVR is on the local network as 192.168.0.100 at port 81 and that I wanted to view channel 1’s main stream, low and behold after a few seconds the camera started to play!
- To convert the stream to something more useful you could use rtmpdump and ffmpeg on Linux systems – I’ll write another guide about that shortly
- If you do something wrong and overload the DVR then you’ll hear a beep as the box reboots
- If this works for you please comment your DVR make and model
Whenever I deploy a new server I always ensure that any flaws which I’ve picked up from my few years of server experience are fixed, leaving the new server as secure as can be and ready for use.
Below are a few tips for keeping your server as secure as can be:
- Have a secure root password – Use something random and at least 8 characters long
- Use non-default ports – Change the default port for services commonly targeted by bots or attackers such as SSH
- Check your logs – Look for authentication failures and put the related IPs in a block or reject rule using iptables
- Process users – Make sure processes have their own users and aren’t ran as root
More tips will be added once I remember them!