#Flush existing rules iptables -F # Set up default DROP rule for eth0 (Assuming eth0 is the Ethernet Port) iptables -P INPUT DROP # Allow existing connections to continue iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT # Accept everything from the 192.168.0.x network iptables -A INPUT -i eth0 -s 192.168.0.0/24 -j…
Continue readingTag: Linux Command
How to compress / zip a directory in Linux
To compress in tar.gz format: tar -cv /directory | gzip > archive.tar.gz To decompress the tar.gz file: tar -zxvf archive.tar.gz
Continue readingHow to change default SSH port 22 to something else
Internet connected Linux servers are always vulnerable to exploitation by the hackers/intruders. One of their common attack is through SSH. By default SSH servers are configured to listen to port 22 for SSH connection. Changing the port to something else will definitely add an additional measure in securing the server. How to Change Default SSH…
Continue readingDetermine if the storage is SSD or HDD – using linux command
You've purchased a Cloud server or a Virtual server. The server provider says it comes with an SSD (Solid State Drive). Now you definitely would like to verify whether the storage is indeed SSD or is it simple HDD (Hard Disk Drive). If you're server is running on any version of Linux OS (kernel version…
Continue reading