How to install nmap on CentOS

nmap (Network Mapper) is a free and open source utility. Here, we will use it to see the ports open on your Centos server.

Install nmap on centos server
yum install nmap

To check if nmap installed:
nmap localhost

To check nmap version
# nmap --version

Scan For Unused IP Address
# nmap -T4 -sP 192.168.0.0/24 && egrep "00:00:00:00:00:00" /proc/net/arp

Get Info About Remote Host Ports And OS Detection
# nmap -sS -P0 -sV -O 192.168.1.1

Get List of Servers With A Specific Port Open (change -p value to your desire)
# nmap -sT -p 80 -oG - 192.168.0.* | grep open

Scan Network for Rogue APs
# nmap -A -p1-85,113,443,8080-8100 -T4 --min-hostgroup 50 --max-rtt-timeout 2000 --initial-rtt-timeout 300 --max-retries 3 --host-timeout 20m --max-scan-delay 1000 -oA wapscan 192.168.1.1/8

Find All Active IP Addresses In A Network
# nmap -sP 192.168.0.*

Use A Decoy IP While Scanning Ports
# sudo nmap -sS targetIP -D fakeIP

Check how Many Linux And Windows Devices On Your Network
# sudo nmap -F -O 192.168.0.1-255 | grep "Running: " > /tmp/os; echo "$(cat /tmp/os | grep Linux | wc -l) Linux device(s)"; echo "$(cat /tmp/os | grep Windows | wc -l) Window(s) devices"

UDP Scanning
# sudo nmap -sU -P0 -T Aggressive -F targetIP

To scan a range of IP addresses
# nmap 192.168.1.1-50

To scan an entire subnet
# nmap 192.168.1.0/24

Ping only scan
# nmap -sP 192.168.1.1

TCP SYN scan
# nmap -sS 192.168.1.1

UDP scan
# nmap -sU 192.168.1.1

IP protocol scan
# nmap -sO 192.168.1.1

Scan port 80, 25, 443, and 110
# nmap -p 80,25,443,110 192.168.1.1

Scan port ranges 1024-2048
# nmap -p 1024-2048 192.168.1.1

Operating system detection
# nmap -O --osscan-guess 192.168.1.1

Tagged with: , ,
Posted in Networking, Security, Tips - Tricks

How to remove wordpress version

On a default WordPress install, WordPress automatically outputs the current WordPress version number into the “” of your website in what’s called a “meta” tag. While this is helpful for various statistics, it can create a security risk to your WordPress site.

If you are running the most up to date version of WordPress, which we recommend you do, then you do not have to worry about this tutorial at all. But if for some reason you are not, then it is in your best interest to follow this tutorial.

Add the following code to your WordPress theme’s functions.php

function remove_wp_version() { return ''; }
add_filter('the_generator', 'remove_wp_version');

Using this method to remove the WordPress version, you will remove completely remove your WordPress version number from both your head file and RSS feeds.

Tagged with: ,
Posted in Wordpress