feat(yate): add snmp monitoring
This commit is contained in:
parent
d7c5c4c0f6
commit
6524dfc30e
@ -40,6 +40,7 @@
|
||||
enable = true;
|
||||
ruleset = let
|
||||
tcpPorts = lib.concatStringsSep ", " (map toString config.networking.firewall.allowedTCPPorts);
|
||||
udpPorts = lib.concatStringsSep ", " (map toString config.networking.firewall.allowedUDPPorts);
|
||||
in ''
|
||||
table inet filter {
|
||||
chain input {
|
||||
@ -55,6 +56,7 @@
|
||||
|
||||
tcp dport 22 accept
|
||||
tcp dport { ${tcpPorts} } accept
|
||||
udp dport { ${udpPorts} } accept
|
||||
|
||||
ip saddr { 10.42.10.6, 217.10.68.150 } accept
|
||||
ip6 saddr { 2a01:4f8:1c0c:8221::6, 2001:ab7::0/64 } accept
|
||||
|
@ -15,9 +15,15 @@
|
||||
ysipchan.general = {
|
||||
ignorevia = "yes";
|
||||
};
|
||||
ysnmpagent = {
|
||||
general.port = 161;
|
||||
snmp_v2.ro_community = "yate";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedUDPPorts = [ 161 ];
|
||||
|
||||
sops.secrets.sipgate_password = {
|
||||
owner = "yate";
|
||||
restartUnits = [ "yate.service" ];
|
||||
|
@ -96,6 +96,7 @@
|
||||
enable = true;
|
||||
ruleset = let
|
||||
tcpPorts = lib.concatStringsSep ", " (map toString config.networking.firewall.allowedTCPPorts);
|
||||
udpPorts = lib.concatStringsSep ", " (map toString config.networking.firewall.allowedUDPPorts);
|
||||
in ''
|
||||
table inet filter {
|
||||
chain input {
|
||||
@ -112,6 +113,7 @@
|
||||
|
||||
tcp dport 22 accept
|
||||
tcp dport { ${tcpPorts} } accept
|
||||
udp dport { ${udpPorts} } accept
|
||||
|
||||
iif {vlan132, vlan133} accept
|
||||
|
||||
|
@ -70,8 +70,14 @@
|
||||
# default = "yes";
|
||||
#};
|
||||
};
|
||||
ysnmpagent = {
|
||||
general.port = 161;
|
||||
snmp_v2.ro_community = "yate";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedUDPPorts = [ 161 ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
(writers.makePythonWriter python39 python39.pkgs "/bin/dect_claim" { libraries = [ python39.pkgs.python-yate ]; } (builtins.readFile ./dect_claim.py))
|
||||
(runCommand "yintro.slin" {} ''
|
||||
|
Loading…
Reference in New Issue
Block a user