Home
Sign Up
Sign In
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member
Sign In
V2EX
›
问与答
关于 ipset 4.5 批量加载 IP 段问题
qq674949301
·
Jul 2, 2015
· 1045 views
This topic created in 3959 days ago, the information mentioned may be changed or developed.
由于内核版本的限制,不能升级到ipset 到6.x版本,想批量加载IP段,原来写的一个脚本:
#!/bin/sh
# Copyright (C) 2015
OpenWrt.org
_input=/jffs/chnroute.txt
IPS=/usr/sbin/ipset
ipset -N gfwlist nethash
egrep -v "^#|^$" $_input | while IFS= read -r ip
do
$IPS -A gfwlist $ip
done
循环加载感觉效率太低了,有没有好的办法来批量加载呢?
使用环境:Tomato shibby
ipset
gfwlist
批量
2 replies
•
2015-07-02 18:15:33 +08:00
1
LazyZhu
Jul 2, 2015
ipset -R
http://people.netfilter.org/kadlec/ipset/ipset.man.html
2
qq674949301
OP
Jul 2, 2015 via Android
@
LazyZhu
如何写这个脚本!
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
1078 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 31ms ·
UTC 23:58
·
PVG 07:58
·
LAX 16:58
·
JFK 19:58
♥ Do have faith in what you're doing.
❯