推荐用 hash:net,不要用 hash:ip。后者会在添加网段时转为添加网段里每一个ip。

ipset create cn hash:net
ipset add cn
ipset add cn

ipset create macbl hash:mac

Network scan

apt install nmap

# ping scan
nmap -sP -PI
  • -sP : This option tells Nmap to only perform a ping scan (host discovery), then print out the available hosts that responded to the scan. This is also known as ping scan.
  • -PI : This open tells Nmap that we are sending ICMP echo requests

禁用 IPV6

Preferring IPv4 over IPV6 addresses

vi /etc/gai.conf

Uncomment the last below lines:

#    For sites which use site-local IPv4 addresses behind NAT there is
#    the problem that even if IPv4 addresses are preferred they do not
#    have the same scope and are therefore not sorted first.  To change
#    this use only these rules:
scopev4 ::ffff:  2
scopev4 ::ffff:    2
scopev4 ::ffff:       14

Last update: 2020-09-02 07:41:45 UTC