diff --git a/nflux.toml b/nflux.toml index 065f1b1..941ab49 100644 --- a/nflux.toml +++ b/nflux.toml @@ -17,10 +17,10 @@ icmp_ping = "false" # Allow or deny ICMP ping requests [egress] # By the moment, working with physical interfaces (not virtual, like VPNs) enabled = "true" -interfaces = ["enp0s20f0u4"] -log_udp_connections = "false" # Do not log UDP packets -loc_tcp_connections = "true" # Log TCP packets -log_private_connections = "false" # Do not show private connections in the logs +interfaces = ["wlp2s0"] +log_udp_connections = "false" # Decide if udp packets should be logged +log_tcp_connections = "true" # Decide if tcp packets should be logged +log_private_connections = "true" # Log private connections (10.X, 172.X, 192.X...) not only external ips #[egress_rules] # TODO: filter outgoint traffic (block/deny) diff --git a/nflux/Cargo.toml b/nflux/Cargo.toml index d8b8c07..f622c08 100644 --- a/nflux/Cargo.toml +++ b/nflux/Cargo.toml @@ -18,7 +18,6 @@ toml = "0.8.19" bytes = "1.8.0" dns-lookup = "2.0.4" - [build-dependencies] cargo_metadata = { workspace = true } # TODO(https://github.com/rust-lang/cargo/issues/12375): this should be an artifact dependency, but diff --git a/nflux/src/egress.rs b/nflux/src/egress.rs index b139306..a35aa58 100644 --- a/nflux/src/egress.rs +++ b/nflux/src/egress.rs @@ -5,7 +5,7 @@ use aya::maps::MapData; use aya::maps::perf::{AsyncPerfEventArrayBuffer, PerfBufferError}; use aya::programs::{tc, SchedClassifier, TcAttachType}; use bytes::BytesMut; -use tracing::{debug, error, info, warn}; +use tracing::{error, info, warn}; use nflux_common::{convert_protocol, EgressEvent}; use crate::config::IsEnabled; use crate::utils::{is_private_ip, lookup_address}; diff --git a/nflux/src/logger.rs b/nflux/src/logger.rs index dc3dca9..1bf8a57 100644 --- a/nflux/src/logger.rs +++ b/nflux/src/logger.rs @@ -3,6 +3,7 @@ use tracing::Level; pub fn setup_logger(log_level: &str, format: &str) { // Match the log level + // TODO: validate log level let log_level = match log_level { "trace" => Level::TRACE, "debug" => Level::DEBUG,