1

Using nmap to scan open ports. iptables default policy affects other rules?

view story
linux-howto

http://serverfault.com – I'm trying to find out why changing my default iptables policy is affecting what nmap sees when it scans my host. Consider the following iptables setup: iptables -F iptables -A INPUT -p tcp -s 10.1.0.0/20 --dport 22 -j ACCEPT iptables -P INPUT ACCEPT iptables -P FORWARD DROP iptables -P OUTPUT ACCEPT iptables -A INPUT -i lo -j ACCEPT iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT Let's nmap it using nmap -p - 10.1.0.157: Nmap scan report for 10.1.0.157 Host is up (0.00059s latency). Not shown: 65531 closed ports PORT STATE SERVICE 22/tcp open ssh 111/tcp ope (HowTos)