用户工具

站点工具


linux:ipset

这是本文档旧的修订版!


ipset

IP sets are a framework inside the Linux kernel, which can be administered by the ipset utility.

Overview

Supported set types:

  • list:set
  • hash:ip,port,net
  • hash:ip,port,net
  • hash:ip,port,net
  • hash:ip,port,ip
  • hash:ip,port
  • hash:net,iface
  • hash:net,iface
  • hash:net,port
  • hash:net,port
  • hash:net,port
  • hash:net
  • hash:net
  • hash:net
  • hash:ip
  • bitmap:port
  • bitmap:ip,mac
  • bitmap:ip

Usage

Remove set:

ipset x [set-name]

create set:

ipset create [set-name] hash:ip [hashsize 1024 timeout 600]

List the entries of a named set or all sets:

ipset list [set-name]

Flush a named set or all sets:

ipset flush [set-name]

Test a entry exist:

ipset test [set-name] [entry]

Reference

linux/ipset.1500276307.txt.gz · 最后更改: 2023/12/03 10:24 (外部编辑)