
写入指定IP数据到指定文件到简单shell脚本
写入指定IP数据到指定文件到简单shell脚本
1
2
3
4
5
6
7
8
#!/bin/bash
#cloudflare ip
cfipv4=$(curl https://www.cloudflare.com/ips-v4 | tr '\n' )
cfipv6=$(curl https://www.cloudflare.com/ips-v6 | tr '\n' )
cat << EOF > /etc/demo/rule/cloudflare-cidr.txt
$cfipv4
$cfipv6
EOF
结果如下
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
173.245.48.0/20
103.21.244.0/22
103.22.200.0/22
103.31.4.0/22
141.101.64.0/18
108.162.192.0/18
190.93.240.0/20
188.114.96.0/20
197.234.240.0/22
198.41.128.0/17
162.158.0.0/15
104.16.0.0/13
104.24.0.0/14
172.64.0.0/13
131.0.72.0/22
2400:cb00::/32
2606:4700::/32
2803:f800::/32
2405:b500::/32
2405:8100::/32
2a06:98c0::/29
2c0f:f248::/32
💘 相关文章
- Configure nginx to only allow cloudflare's IP to connect to the server shell script
- 两种自动添加 ip 白名单到cloudflare的脚本
- shell脚本批量生成连续数字
- 亲测可用debian 9添加多ip实例的方法
- 一键自动安装Resilio Sync脚本 for centos
- 一款实时监控网络IP质量的python脚本
- MySQL8 method to restrict the connection of the intranet IP segment
- 一键安装最新版或者指定版本的nodejs
- IP段到底有多少个IP?/56是多少个IP?IPv6盒IPv4度IP网段地址表示数大全
- nginx: [emerg] Solution to unknown directive "set_real_ip_from"