By default, SSH runs on port 22, and most scripts attack that port by brute force to attempt to gain access to your server. One way to stop script kiddies from brute forcing your SSH server so often is by changing the default port that OpenSSH uses. You must remember this port number and change all your connections that use SSH to the new port number. Continue reading “Change Default SSH Port Number”
I have run into a few times when I needed to turn off or on the Windows Firewall via command line or script. It is actually very simple to do!
To Turn Off:
NetSh Advfirewall set allprofiles state off
To Turn On:
NetSh Advfirewall set allrprofiles state on
To check the status of Windows Firewall:
Netsh Advfirewall show allprofiles
You can replace “allprofiles” with public, domain, or private and you can manipulate just that one profile. I used this in creating a script to test the firewall settings of a remote server. That way if I messed up the config, it would turn itself back off after a minute and I was able to reconnect to it. You can view that script on my other post Testing Windows Firewall Settings Safely From Remote Machine.
A while back I got me a new crisp Windows Server. By default, the Firewall was turned off and of course I wanted to turn it on for security reasons. But what happens if I lose my connection to a server a few hundred miles away? How would I disable the firewall if I can’t connect to it anymore? I decided to write a script!
The function of the script is to enable the firewall for the public internet, wait 2 minutes, then disable it again. Here is my script:
Netsh Advfirewall set public state on
Netsh Advfirewall set public state off
Save those lines as a batch file, then run it as Administrator. Keep in mind to use this at your own risk! It saved me, but never know about you! An explanation of the commands can be found on my other post Turn Windows Firewall Off or On By Command Line Or Script.
Do you have Google anything installed on your phone? Computer? Tablet? If so, chances are Google knows – and records – everywhere you have been!
Google will save this data if you have these two settings turned on:
- Location Reporting
- Location history
Now your thinking, if I have the option to turn this on or off why would it even be on? There are many things Google uses (and collects) this data for. Ever searched for a pizza place like “Papa Johns” and Google somehow magically showed the results for your location rather than some random place in the world? Google uses your location data to narrow down the results.
Maybe you use Google Now. Google now HIGHLY integrates with your location data. In fact, every so many minutes, it scans for your location and reports it so you can get interesting cards on your Google Now interface.
Google offers step by step instructions on how to remove all your location history and how to turn it off. You can find the instructions to turn off Location History by clicking HERE.
Now comes the fun part – you can actually see where all Google knows you have been by ensureing you are logged in to your main Google account, and clicking the following address:
Here are a couple example screenshots (click to enlarge):
So you decide, is it worth leaving this on for the cool features that Google offers? I love the features of Google Now, but it is a little scary to see just how often Google tracks your location for this feature.