Skip to content

Commit

Permalink
Working with egress connections
Browse files Browse the repository at this point in the history
  • Loading branch information
containerscrew committed Jan 12, 2025
1 parent ab095c6 commit 5d8a1fa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions nflux.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion nflux/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion nflux/src/egress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 1 addition & 0 deletions nflux/src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5d8a1fa

Please sign in to comment.