fix ip allow

This commit is contained in:
Robin Appelman 2022-07-25 23:20:05 +02:00
commit 598144ee7d
2 changed files with 6 additions and 2 deletions

View file

@ -116,7 +116,7 @@
ProtectProc = "noaccess";
SystemCallFilter = ["@system-service" "~@resources" "~@privileged"];
IPAddressDeny = "any";
IPAddressAllow = "192.168.0.0/16";
IPAddressAllow = ["192.168.0.0/16" "localhost"];
PrivateUsers = true;
ProcSubset = "pid";
};

View file

@ -87,9 +87,13 @@ async fn main() -> Result<(), MainError> {
let mut mqtt_options = MqttOptions::new("wifi-exporter", host, 1883);
mqtt_options.set_keep_alive(Duration::from_secs(5));
mqtt_options.set_credentials(user, pass);
println!("mqtt enabled");
Some(mqtt_options)
}
_ => None,
_ => {
println!("mqtt disabled");
None
}
};
if interfaces.is_empty() {