Simple and flexible firewall for Linux server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
855 B

  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com')
  4. # Load ~/.VagrantFile if exist, permit local config provider
  5. vagrantfile = File.join("#{Dir.home}", '.VagrantFile')
  6. load File.expand_path(vagrantfile) if File.exists?(vagrantfile)
  7. Vagrant.configure('2') do |config|
  8. config.vm.synced_folder "./", "/vagrant", type: "rsync", rsync__exclude: [ '.vagrant', '.git' ]
  9. config.ssh.shell="/bin/sh"
  10. $install = <<SCRIPT
  11. DEBIAN_FRONTEND=noninteractive apt-get -yq install iptables
  12. ln -fs /vagrant/minifirewall /etc/init.d/minifirewall
  13. ln -fs /vagrant/minifirewall.conf /etc/default/minifirewall
  14. SCRIPT
  15. config.vm.define "minifirewall" do |node|
  16. node.vm.hostname = "minifirewall"
  17. node.vm.box = "debian/stretch64"
  18. config.vm.provision "install", type: "shell", :inline => $install
  19. end
  20. end