V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
yzc27
V2EX  ›  Linux

关于 iptables 设置的小疑问

  •  
  •   yzc27 · May 31, 2017 · 2199 views
    This topic created in 3265 days ago, the information mentioned may be changed or developed.

    本人是 linux 初学者,在配置 iptables 时,发现两种情况:

    1.在最后一行加入 iptables -P INPUT DROP

    2.在最后一行加入 iptables -A INPUT -j DROP

    想问问各位大佬,这两种情况对现实结果有没什么不同的实质影响?

    2 replies    2017-05-31 14:23:28 +08:00
    ryd994
        2
    ryd994  
       May 31, 2017
    就直接结果而言,一样
    但是如果以后还想 append 呢? 2 就只能 insert 了
    1 如果遇到小白手贱先打了,或者 flush 了,就傻了
    我一直用 iptables.service 管理,大不了重启,所以是 1
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4078 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 05:08 · PVG 13:08 · LAX 22:08 · JFK 01:08
    ♥ Do have faith in what you're doing.