Commit 7671826b authored by nanahira's avatar nanahira

dont whitelist toomuch things

parent 53a26324
......@@ -13,7 +13,7 @@ redistribute local deny
reflect-kernel-metric true
local-port-readwrite 33123
{% for subnet in routeLists.mycard %}
{% for subnet in routeLists.whitelisted %}
in {{subnet}} allow
{% endfor %}
in deny
......
......@@ -163,6 +163,7 @@ class InventoryBuilder {
this.routeLists = YAML.parse(fs.readFileSync(path.join('lists', 'result.yaml'), 'utf8'));
// 所有内网网段
this.routeLists.mycard = ['10.198.0.0/16', '10.200.0.0/15', '172.16.0.0/12'];
this.routeLists.whitelisted = ['10.198.0.0/16']
for (const h in this.hosts) {
const host = this.hosts[h];
for (const c of host.subnets) {
......@@ -170,6 +171,7 @@ class InventoryBuilder {
continue;
}
this.routeLists.mycard.push(c);
this.routeLists.whitelisted.push(c);
}
}
const vars = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment