diff --git a/package/lean/n2n_v2/files/n2n_v2.config b/package/lean/n2n_v2/files/n2n_v2.config index 929c08866..b35c523c4 100644 --- a/package/lean/n2n_v2/files/n2n_v2.config +++ b/package/lean/n2n_v2/files/n2n_v2.config @@ -14,6 +14,7 @@ config edge config supernode option enabled '0' option port '1235' + option subnet '10.0.0.0-10.0.0.0/24' config route option enabled '0' diff --git a/package/lean/n2n_v2/files/n2n_v2.init b/package/lean/n2n_v2/files/n2n_v2.init index 4ecd8c7ad..1135d889a 100755 --- a/package/lean/n2n_v2/files/n2n_v2.init +++ b/package/lean/n2n_v2/files/n2n_v2.init @@ -41,7 +41,8 @@ start_instance() { config_get_bool enabled "$cfg" 'enabled' '0' [ "$enabled" = "0" ] && return 1 config_get port "$cfg" 'port' - /usr/bin/supernode -p $port & + config_get subnet "$cfg" 'subnet' + /usr/bin/supernode -p $port -a $subnet & iptables -I INPUT -p udp --dport $port -j ACCEPT -m comment --comment 'n2n supernode port' ;; route)