From 8e9a7c20f585f308030069713e209b0116da4440 Mon Sep 17 00:00:00 2001 From: Chai Feng Date: Sat, 1 Dec 2018 12:31:59 +0800 Subject: [PATCH] Add a logging rule in firewall rules --- Vagrantfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 19858b3..91fb7f1 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -40,7 +40,9 @@ Vagrant.configure('2') do |config| sed -i -e 's,192\.168\.0\.0/16,#{ip_prefix}.128/28,' /etc/ufw/after.rules - ufw reload + systemctl restart ufw + + iptables -I DOCKER-USER 4 -p udp -j LOG --log-prefix '[UFW DOCKER] ' [[ -L /usr/local/bin/ufw-docker ]] || ln -s /vagrant/ufw-docker /usr/local/bin/ }