Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何拒绝除 ip 192.168.0.36 以外的所有人访问服务器的 80 端口?
我做错了什么:
iptables -A INPUT -p tcp —dport 80 !-s 192.168.0.36 -j 删除
错误的论点—dport=(
—dport
你可以这样尝试:-
iptables -A INPUT -p tcp --dport 80 -s 192.168.0.36 -j ACCEPT iptables -A INPUT -p tcp --dport 80 -j DROP