Intention of this query is I badly needed testing the below iptables rules.
===================================================
I want to block port scan(tcp/udp) so that anyone doing port scan should be blocked for mu router gateway.
I have the following rules:
iptables -A INPUT -m recent --name portscan --rcheck --seconds 500 -j DROP
iptables -A FORWARD -m recent --name portscan --rcheck --seconds 500 -j DROP
iptables -A INPUT -m recent --name portscan --remove
iptables -A FORWARD -m recent --name portscan --remove
iptables -A INPUT -p tcp -m tcp --dport 139 -m recent --name portscan --set -j DROP
iptables -A FORWARD -p tcp -m tcp --dport 139 -m recent --name portscan --set -j DROP
But I badly need of testing the above rules.
I tried with nmap but same result is getting for enable and disable for this port scan. output of nmap is below:
[root@xconf technicolor]# nmap 192.168.5.177
Starting Nmap 6.40 (
http://nmap.org ) at 2017-10-12 07:30 EDT
Nmap scan report for 192.168.5.177
Host is up (0.020s latency).
Not shown: 994 filtered ports
PORT STATE SERVICE
20/tcp closed ftp-data
21/tcp closed ftp
22/tcp closed ssh
161/tcp closed snmp
990/tcp closed ftps
8080/tcp open http-proxy
Nmap done: 1 IP address (1 host up) scanned in 17.87 seconds
Appreciate a helping hand.Thank you in advance.