gluon-next-node: convert pregenerated ebtables rules to Lua code
This commit is contained in:
parent
0953c9befb
commit
9367c1ffe7
@ -30,7 +30,6 @@ endef
|
||||
|
||||
define Package/gluon-next-node/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(GLUON_GENERATE) ./generate/* $(1)/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,gluon-next-node))
|
||||
|
@ -0,0 +1,17 @@
|
||||
local site = require 'gluon.site_config'
|
||||
local next_node = site.next_node
|
||||
|
||||
rule('FORWARD --logical-out br-client -o bat0 -d ' .. next_node.mac .. ' -j DROP')
|
||||
rule('OUTPUT --logical-out br-client -o bat0 -d ' .. next_node.mac .. ' -j DROP')
|
||||
rule('FORWARD --logical-out br-client -o bat0 -s ' .. next_node.mac .. ' -j DROP')
|
||||
rule('OUTPUT --logical-out br-client -o bat0 -s ' .. next_node.mac .. ' -j DROP')
|
||||
|
||||
rule('FORWARD --logical-out br-client -o bat0 -p IPv4 --ip-destination ' .. next_node.ip4 .. ' -j DROP')
|
||||
rule('OUTPUT --logical-out br-client -o bat0 -p IPv4 --ip-destination ' .. next_node.ip4 .. ' -j DROP')
|
||||
rule('FORWARD --logical-out br-client -o bat0 -p IPv4 --ip-source ' .. next_node.ip4 .. ' -j DROP')
|
||||
rule('OUTPUT --logical-out br-client -o bat0 -p IPv4 --ip-source ' .. next_node.ip4 .. ' -j DROP')
|
||||
|
||||
rule('FORWARD --logical-out br-client -o bat0 -p IPv6 --ip6-destination ' .. next_node.ip6 .. ' -j DROP')
|
||||
rule('OUTPUT --logical-out br-client -o bat0 -p IPv6 --ip6-destination ' .. next_node.ip6 .. ' -j DROP')
|
||||
rule('FORWARD --logical-out br-client -o bat0 -p IPv6 --ip6-source ' .. next_node.ip6 .. ' -j DROP')
|
||||
rule('OUTPUT --logical-out br-client -o bat0 -p IPv6 --ip6-source ' .. next_node.ip6 .. ' -j DROP')
|
@ -1,14 +0,0 @@
|
||||
rule 'FORWARD --logical-out br-client -o bat0 -d @next_node.mac@ -j DROP'
|
||||
rule 'OUTPUT --logical-out br-client -o bat0 -d @next_node.mac@ -j DROP'
|
||||
rule 'FORWARD --logical-out br-client -o bat0 -s @next_node.mac@ -j DROP'
|
||||
rule 'OUTPUT --logical-out br-client -o bat0 -s @next_node.mac@ -j DROP'
|
||||
|
||||
rule 'FORWARD --logical-out br-client -o bat0 -p IPv4 --ip-destination @next_node.ip4@ -j DROP'
|
||||
rule 'OUTPUT --logical-out br-client -o bat0 -p IPv4 --ip-destination @next_node.ip4@ -j DROP'
|
||||
rule 'FORWARD --logical-out br-client -o bat0 -p IPv4 --ip-source @next_node.ip4@ -j DROP'
|
||||
rule 'OUTPUT --logical-out br-client -o bat0 -p IPv4 --ip-source @next_node.ip4@ -j DROP'
|
||||
|
||||
rule 'FORWARD --logical-out br-client -o bat0 -p IPv6 --ip6-destination @next_node.ip6@ -j DROP'
|
||||
rule 'OUTPUT --logical-out br-client -o bat0 -p IPv6 --ip6-destination @next_node.ip6@ -j DROP'
|
||||
rule 'FORWARD --logical-out br-client -o bat0 -p IPv6 --ip6-source @next_node.ip6@ -j DROP'
|
||||
rule 'OUTPUT --logical-out br-client -o bat0 -p IPv6 --ip6-source @next_node.ip6@ -j DROP'
|
Loading…
Reference in New Issue
Block a user