aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index a35916a..bf8248d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -4,7 +4,9 @@ mod consul;
mod consul_actor;
mod igd_actor;
mod diplonat;
+mod fw;
+use iptables;
use log::*;
use diplonat::Diplonat;
@@ -12,7 +14,10 @@ use diplonat::Diplonat;
async fn main() {
pretty_env_logger::init();
info!("Starting Diplonat");
-
+
+ let ipt = iptables::new(false).unwrap();
+ fw::setup(&ipt).expect("iptables setup failed");
+
let mut diplo = Diplonat::new().await.expect("Setup failed");
diplo.listen().await.expect("A runtime error occured");
}