關於 PHP, Linux, Open Source 及個人生活記載的網誌。
RSS icon
  • 用 iptables 阻擋 ip

    Posted on June 21st, 2006 Sam Tang No comments

    假如要阻擋某個 ip 存取 Linux 伺服器,可以用以下指令:

    iptables -A INPUT -s ip_address -j DROP

    這時 ip_address 便不可以存取伺服器,要禁止連線到 ip_address,可以這樣:

    iptables -A OUTPUT -d ip_address -j DROP


    Leave a reply

    *
    To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
    Click to hear an audio file of the anti-spam word