Linux Firewalls


Block a specific IP

iptables -A INPUT IP.ADD.RE.SS -j DROP

Block a subnet of IP

To block a range of IPs use the following:

iptables -A INPUT -s IPA.DDR.ESS.0/24 -j DROP

Save Changes

Note: Any changes made using these commands will be lost if the server is rebooted, or if IPTABLES is restarted. You must save your changes to make the permanent.
service iptables save
By admin on December 2, 2016 | Security | A comment?

How to test and patch your server for the Shellshock exploit

To test your system to see if it is vulnerable to the ShellShock exploit, run the following command from the command line:

env check='Not vulnerable' x='() { :;}; check=Vulnerable' bash -c 'echo $check'

If the reply from the command says “Vulnerable”, you should patch it immediately! The fix is actually quite simple and only takes a minute or so.


CentOS, Fedora, Redhat

Log into your server as root

yum update -y


Debian, Ubuntu, Mint

sudo apt-get update && sudo apt-get install --only-upgrade bash

That’s it! You can re-run the test command to verify your server has been successfully patched.


By admin on September 26, 2014 | Linux, Security | A comment?