Add a logging rule in firewall rules

This commit is contained in:
Chai Feng 2018-12-01 12:31:59 +08:00
parent d4fbb6685c
commit 8e9a7c20f5
No known key found for this signature in database
GPG Key ID: 2DCD9A24E523FFD2

4
Vagrantfile vendored
View File

@ -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/
}