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