当我在我的服务器上运行nmap <host> ,它说以下端口是打开的,但是我的iptables没有明确允许它们的规则。
135/tcp filtered msrpc 139/tcp filtered netbios-ssn 445/tcp filtered microsoft-ds
这是一个运行postfix邮件服务器的debian web服务器。
我没有看到什么特别是在允许这些端口的iptables。
*nat # Allow openvpn connections (nat) -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE COMMIT *filter # This will allow all loopback (lo0) traffic and drop all traffic to 127/8 # that does not use lo0 -A INPUT -i lo -j ACCEPT -A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT # This accepts all already established connections -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # This allows all outbound traffic -A OUTPUT -j ACCEPT # This will allow HTTP and HTTPS connections from anywhere, this are the normal # ports used for a web server -A INPUT -p tcp --dport 80 -j ACCEPT -A INPUT -p tcp --dport 443 -j ACCEPT # Allow SSH connections -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT # Allow bittorrent/rtorrent ports, from ~/.rtorrent.rc -A INPUT -p tcp --dport 8071:8079 -j ACCEPT -A INPUT -p udp --dport 6881 -j ACCEPT # Allow tor (the onion router) connections for relay node -A INPUT -p tcp --dport 9001 -j ACCEPT -A INPUT -p tcp --dport 9030 -j ACCEPT # Allow mx connections -A INPUT -p tcp --dport 25 -j ACCEPT -A INPUT -p tcp --dport 587 -j ACCEPT # Allow ICMP ping -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT # Allow openvpn connections -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -s 10.8.0.0/24 -j ACCEPT -A INPUT -p udp --dport 53 -j ACCEPT -A INPUT -p tcp --dport 53 -j ACCEPT -A INPUT -p udp --dport 1194 -j ACCEPT -A INPUT -p tcp --dport 1194 -j ACCEPT # Keep this last line # Reject all other inbound traffic -A INPUT -j REJECT -A FORWARD -j REJECT COMMIT
如果我的iptables.rules文件不允许他们这些扫描如何? 我正在运行这些服务? 我如何阻止他们?
您的Internet服务提供商正在过滤这些端口上的出站stream量。 这是住宅互联网连接非常普遍的。 该块会影响Windows NetBIOS和CIFSstream量,旨在阻止客户浏览其安全性较差的邻居计算机上的文件。