aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--alma9/Vagrantfile2
-rw-r--r--debian11/Vagrantfile28
-rw-r--r--debian11/i2pd.conf240
-rw-r--r--dispffox/Vagrantfile10
-rw-r--r--disposable/Vagrantfile2
-rw-r--r--dns/Vagrantfile4
-rw-r--r--ephemeral/Vagrantfile22
-rw-r--r--freebsd13/Vagrantfile19
-rw-r--r--i2p/Vagrantfile8
-rw-r--r--kali/Vagrantfile2
-rw-r--r--openbsd/Vagrantfile12
-rw-r--r--vpn/Vagrantfile36
12 files changed, 65 insertions, 320 deletions
diff --git a/alma9/Vagrantfile b/alma9/Vagrantfile
index 1ff5ea2..785aaed 100644
--- a/alma9/Vagrantfile
+++ b/alma9/Vagrantfile
@@ -5,7 +5,7 @@ ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
Vagrant.require_version '>= 2.2.6'
Vagrant.configure('2') do |config|
config.vm.box = 'almalinux/9'
- config.vm.box_version = '9.2.20230513'
+ config.vm.box_version = '9.2.20231118'
config.vm.box_check_update = false
config.vm.hostname = 'virt-alma9'
diff --git a/debian11/Vagrantfile b/debian11/Vagrantfile
index 8ddee49..edf950e 100644
--- a/debian11/Vagrantfile
+++ b/debian11/Vagrantfile
@@ -5,7 +5,7 @@ ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
Vagrant.require_version '>= 2.2.6'
Vagrant.configure('2') do |config|
config.vm.box = 'generic/debian11'
- config.vm.box_version = '4.0.4'
+ config.vm.box_version = '4.3.12'
config.vm.box_check_update = false
config.vm.hostname = 'virt-deb11'
@@ -19,38 +19,18 @@ Vagrant.configure('2') do |config|
config.vm.graceful_halt_timeout = 60
config.ssh.connect_timeout = 15
- config.vm.network 'forwarded_port', guest: 7070, host: 7070, protocol: 'tcp', atuo_correct: true
- config.vm.network 'forwarded_port', guest: 4444, host: 4444, protocol: 'tcp', atuo_correct: true
- config.vm.network 'forwarded_port', guest: 4447, host: 4447, protocol: 'tcp', atuo_correct: true
-
- # shares
- # config.vm.synced_folder '.', '/vagrant', type: 'nfs', nfs_version: 4, nfs_udp: false
-
- config.vagrant.plugins = ['vagrant-reload', { 'vagrant-libvirt' => { 'version' => '^0.6.2' } }]
-
config.vm.provider 'libvirt' do |libvirt|
libvirt.default_prefix = 'deb11-'
libvirt.driver = 'kvm'
- libvirt.memory = '512'
- libvirt.cpus = 1
+ libvirt.memory = '2048'
+ libvirt.cpus = 2
libvirt.sound_type = nil
libvirt.qemuargs value: '-nographic'
libvirt.qemuargs value: '-nodefaults'
libvirt.qemuargs value: '-no-user-config'
- # libvirt.qemuargs value: '-chardev'
- # libvirt.qemuargs value: 'serial,path=/dev/ttyS0,id=hostusbserial'
- # libvirt.qemuargs value: '-chardev'
- # libvirt.qemuargs value: 'pci-serial,chardev=hostusbserial'
libvirt.qemuargs value: '-serial'
- libvirt.qemuargs value: 'telnet::4321,server,nowait'
+ libvirt.qemuargs value: 'pty'
libvirt.random model: 'random'
end
- config.vm.provision 'i2p-install', type: 'shell', name: 'i2p-install', inline: <<-SHELL
- export DEBIAN_FRONTEND=noninteractive && \
- sudo apt update && sudo apt upgrade -y && \
- sudo apt install -y i2pd
- sudo systemctl enable i2pd
- sudo systemctl start i2pd
- SHELL
end
diff --git a/debian11/i2pd.conf b/debian11/i2pd.conf
deleted file mode 100644
index db783fc..0000000
--- a/debian11/i2pd.conf
+++ /dev/null
@@ -1,240 +0,0 @@
-## Configuration file for a typical i2pd user
-## See https://i2pd.readthedocs.io/en/latest/user-guide/configuration/
-## for more options you can use in this file.
-
-## Lines that begin with "## " try to explain what's going on. Lines
-## that begin with just "#" are disabled commands: you can enable them
-## by removing the "#" symbol.
-
-## Tunnels config file
-## Default: ~/.i2pd/tunnels.conf or /var/lib/i2pd/tunnels.conf
-# tunconf = /var/lib/i2pd/tunnels.conf
-
-## Tunnels config files path
-## Use that path to store separated tunnels in different config files.
-## Default: ~/.i2pd/tunnels.d or /var/lib/i2pd/tunnels.d
-# tunnelsdir = /var/lib/i2pd/tunnels.d
-
-## Where to write pidfile (default: i2pd.pid, not used in Windows)
-# pidfile = /run/i2pd.pid
-
-## Logging configuration section
-## By default logs go to stdout with level 'info' and higher
-##
-## Logs destination (valid values: stdout, file, syslog)
-## * stdout - print log entries to stdout
-## * file - log entries to a file
-## * syslog - use syslog, see man 3 syslog
-# log = file
-## Path to logfile (default - autodetect)
-# logfile = /var/log/i2pd/i2pd.log
-## Log messages above this level (debug, info, *warn, error, none)
-## If you set it to none, logging will be disabled
-# loglevel = warn
-## Write full CLF-formatted date and time to log (default: write only time)
-# logclftime = true
-
-## Daemon mode. Router will go to background after start
-# daemon = true
-
-## Specify a family, router belongs to (default - none)
-# family =
-
-## External IP address to listen for connections
-## By default i2pd sets IP automatically
-# host = 1.2.3.4
-
-## Port to listen for connections
-## By default i2pd picks random port. You MUST pick a random number too,
-## don't just uncomment this
-# port = 4567
-
-## Enable communication through ipv4
-ipv4 = true
-## Enable communication through ipv6
-ipv6 = false
-
-## Network interface to bind to
-# ifname =
-## You can specify different interfaces for IPv4 and IPv6
-# ifname4 =
-# ifname6 =
-
-## Enable NTCP transport (default = true)
-# ntcp = true
-## If you run i2pd behind a proxy server, you can only use NTCP transport with ntcpproxy option
-## Should be http://address:port or socks://address:port
-# ntcpproxy = http://127.0.0.1:8118
-## Enable SSU transport (default = true)
-# ssu = true
-
-## Should we assume we are behind NAT? (false only in MeshNet)
-# nat = true
-
-## Bandwidth configuration
-## L limit bandwidth to 32KBs/sec, O - to 256KBs/sec, P - to 2048KBs/sec,
-## X - unlimited
-## Default is X for floodfill, L for regular node
-# bandwidth = L
-## Max % of bandwidth limit for transit. 0-100. 100 by default
-# share = 100
-
-## Router will not accept transit tunnels, disabling transit traffic completely
-## (default = false)
-# notransit = true
-
-## Router will be floodfill
-# floodfill = true
-
-[http]
-## Web Console settings
-## Uncomment and set to 'false' to disable Web Console
-# enabled = true
-## Address and port service will listen on
-address = 0.0.0.0
-port = 7070
-## Path to web console, default "/"
-# webroot = /
-## Uncomment following lines to enable Web Console authentication
-# auth = true
-# user = i2pd
-# pass = changeme
-
-[httpproxy]
-## Uncomment and set to 'false' to disable HTTP Proxy
-# enabled = true
-## Address and port service will listen on
-address = 0.0.0.0
-port = 4444
-## Optional keys file for proxy local destination
-# keys = http-proxy-keys.dat
-## Enable address helper for adding .i2p domains with "jump URLs" (default: true)
-# addresshelper = true
-## Address of a proxy server inside I2P, which is used to visit regular Internet
-# outproxy = http://false.i2p
-## httpproxy section also accepts I2CP parameters, like "inbound.length" etc.
-
-[socksproxy]
-## Uncomment and set to 'false' to disable SOCKS Proxy
-# enabled = true
-## Address and port service will listen on
-address = 0.0.0.0
-port = 4447
-## Optional keys file for proxy local destination
-# keys = socks-proxy-keys.dat
-## Socks outproxy. Example below is set to use Tor for all connections except i2p
-## Uncomment and set to 'true' to enable using of SOCKS outproxy
-# outproxy.enabled = false
-## Address and port of outproxy
-# outproxy = 127.0.0.1
-# outproxyport = 9050
-## socksproxy section also accepts I2CP parameters, like "inbound.length" etc.
-
-[sam]
-## Uncomment and set to 'true' to enable SAM Bridge
-enabled = true
-## Address and port service will listen on
-# address = 127.0.0.1
-# port = 7656
-
-[bob]
-## Uncomment and set to 'true' to enable BOB command channel
-# enabled = false
-## Address and port service will listen on
-# address = 127.0.0.1
-# port = 2827
-
-[i2cp]
-## Uncomment and set to 'true' to enable I2CP protocol
-# enabled = false
-## Address and port service will listen on
-# address = 127.0.0.1
-# port = 7654
-
-[i2pcontrol]
-## Uncomment and set to 'true' to enable I2PControl protocol
-# enabled = false
-## Address and port service will listen on
-# address = 127.0.0.1
-# port = 7650
-## Authentication password. "itoopie" by default
-# password = itoopie
-
-[precomputation]
-## Enable or disable elgamal precomputation table
-## By default, enabled on i386 hosts
-# elgamal = true
-
-[upnp]
-## Enable or disable UPnP: automatic port forwarding (enabled by default in WINDOWS, ANDROID)
-# enabled = false
-## Name i2pd appears in UPnP forwardings list (default = I2Pd)
-# name = I2Pd
-
-[reseed]
-## Options for bootstrapping into I2P network, aka reseeding
-## Enable or disable reseed data verification.
-verify = true
-## URLs to request reseed data from, separated by comma
-## Default: "mainline" I2P Network reseeds
-# urls = https://reseed.i2p-projekt.de/,https://i2p.mooo.com/netDb/,https://netdb.i2p2.no/
-## Path to local reseed data file (.su3) for manual reseeding
-# file = /path/to/i2pseeds.su3
-## or HTTPS URL to reseed from
-# file = https://legit-website.com/i2pseeds.su3
-## Path to local ZIP file or HTTPS URL to reseed from
-# zipfile = /path/to/netDb.zip
-## If you run i2pd behind a proxy server, set proxy server for reseeding here
-## Should be http://address:port or socks://address:port
-# proxy = http://127.0.0.1:8118
-## Minimum number of known routers, below which i2pd triggers reseeding. 25 by default
-# threshold = 25
-
-[addressbook]
-## AddressBook subscription URL for initial setup
-## Default: reg.i2p at "mainline" I2P Network
-# defaulturl = http://shx5vqsw7usdaunyzr2qmes2fq37oumybpudrd4jjj4e4vk4uusa.b32.i2p/hosts.txt
-## Optional subscriptions URLs, separated by comma
-# subscriptions = http://inr.i2p/export/alive-hosts.txt,http://stats.i2p/cgi-bin/newhosts.txt,http://rus.i2p/hosts.txt
-
-[limits]
-## Maximum active transit sessions (default:2500)
-# transittunnels = 2500
-## Limit number of open file descriptors (0 - use system limit)
-# openfiles = 0
-## Maximum size of corefile in Kb (0 - use system limit)
-# coresize = 0
-## Threshold to start probabalistic backoff with ntcp sessions (0 - use system limit)
-# ntcpsoft = 0
-## Maximum number of ntcp sessions (0 - use system limit)
-# ntcphard = 0
-
-[trust]
-## Enable explicit trust options. false by default
-# enabled = true
-## Make direct I2P connections only to routers in specified Family.
-# family = MyFamily
-## Make direct I2P connections only to routers specified here. Comma separated list of base64 identities.
-# routers =
-## Should we hide our router from other routers? false by default
-# hidden = true
-
-[exploratory]
-## Exploratory tunnels settings with default values
-# inbound.length = 2
-# inbound.quantity = 3
-# outbound.length = 2
-# outbound.quantity = 3
-
-[persist]
-## Save peer profiles on disk (default: true)
-# profiles = true
-
-[cpuext]
-## Use CPU AES-NI instructions set when work with cryptography when available (default: true)
-# aesni = true
-## Use CPU AVX instructions set when work with cryptography when available (default: true)
-# avx = true
-## Force usage of CPU instructions set, even if they not found
-## DO NOT TOUCH that option if you really don't know what are you doing!
-# force = false
diff --git a/dispffox/Vagrantfile b/dispffox/Vagrantfile
index 0d8ebed..d99de17 100644
--- a/dispffox/Vagrantfile
+++ b/dispffox/Vagrantfile
@@ -5,7 +5,7 @@ ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
Vagrant.require_version '>= 2.2.6'
Vagrant.configure('2') do |config|
config.vm.box = 'generic/ubuntu2204'
- config.vm.box_version = '4.0.0'
+ config.vm.box_version = '4.3.12'
config.vm.box_check_update = false
config.vm.hostname = 'virt-dispffox'
@@ -29,15 +29,11 @@ Vagrant.configure('2') do |config|
libvirt.default_prefix = 'dispffox-'
libvirt.driver = 'kvm'
libvirt.memory = '4096'
- libvirt.cpus = 4
+ libvirt.cpus = 6
libvirt.sound_type = nil
- # libvirt.qemuargs value: '-nographic'
+ libvirt.qemuargs value: '-nographic'
libvirt.qemuargs value: '-nodefaults'
libvirt.qemuargs value: '-no-user-config'
- # libvirt.qemuargs value: '-chardev'
- # libvirt.qemuargs value: 'serial,path=/dev/ttyS0,id=hostusbserial'
- # libvirt.qemuargs value: '-chardev'
- # libvirt.qemuargs value: 'pci-serial,chardev=hostusbserial'
libvirt.qemuargs value: '-serial'
libvirt.qemuargs value: 'pty'
libvirt.random model: 'random'
diff --git a/disposable/Vagrantfile b/disposable/Vagrantfile
index 0ecd704..1a0df27 100644
--- a/disposable/Vagrantfile
+++ b/disposable/Vagrantfile
@@ -84,7 +84,7 @@ Vagrant.configure('2') do |config|
config.vm.provision 'mullvad-test', type: 'shell', name: 'test', privileged: false, inline: <<-SHELL
set -ex
- curl https://am.i.mullvad.net/connected | grep -i "you\ are\ connected"
+ curl --connect-timeout 10 https://am.i.mullvad.net/connected | grep -i "you\ are\ connected"
SHELL
config.vm.provision 'kill-switch', communicator_required: false, type: 'shell', name: 'kill-switch', privileged: true, inline: <<-SHELL
diff --git a/dns/Vagrantfile b/dns/Vagrantfile
index d20bd8c..841dd23 100644
--- a/dns/Vagrantfile
+++ b/dns/Vagrantfile
@@ -39,6 +39,10 @@ Vagrant.configure('2') do |config|
libvirt.random model: 'random'
end
+ config.vm.provision 'reqs-priv1', type: 'shell', name: 'reqs-priv-install1', privileged: true, inline: <<-SHELL
+ echo "nameserver 9.9.9.9" > /etc/resolv.conf
+ SHELL
+
config.vm.provision 'reqs', type: 'shell', name: 'reqs-install', inline: <<-SHELL
sudo apk update &&\
sudo apk upgrade &&\
diff --git a/ephemeral/Vagrantfile b/ephemeral/Vagrantfile
index cb46090..d56077d 100644
--- a/ephemeral/Vagrantfile
+++ b/ephemeral/Vagrantfile
@@ -2,20 +2,13 @@
# frozen_string_literal: true
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
-# Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com')
Vagrant.require_version '>= 2.2.6'
Vagrant.configure('2') do |config|
- config.vm.box = 'generic/alpine317'
- # config.vm.box_version = '4.0.2'
- config.vm.box_version = '4.2.14'
+ config.vm.box = 'generic/alpine319'
+ config.vm.box_version = '4.3.10'
config.vm.box_check_update = false
config.vm.hostname = 'virt-ephemeral'
- # if Vagrant.has_plugin?('vagrant-proxyconf')
- # config.proxy.http = 'socks5://192.168.1.103:9995'
- # config.proxy.https = 'socks5://192.168.1.103:9995'
- # end
-
# ssh
config.ssh.insert_key = true
config.ssh.keep_alive = true
@@ -29,7 +22,6 @@ Vagrant.configure('2') do |config|
# shares
# config.vm.synced_folder '.', '/vagrant', type: 'nfs', nfs_version: 4, nfs_udp: false
- # config.vagrant.plugins = ['vagrant-reload', { 'vagrant-libvirt' => { 'version' => '^0.6.2' } }]
config.vm.provider 'libvirt' do |libvirt|
libvirt.storage_pool_name = 'ramdisk'
@@ -44,12 +36,16 @@ Vagrant.configure('2') do |config|
libvirt.qemuargs value: '-serial'
libvirt.qemuargs value: 'pty'
libvirt.random model: 'random'
- # setting this will also remove the ability to run provisioning according to docs
- # libvirt.mgmt_attach = false
end
# config.vm.provision 'update-upgrade', type: 'shell', name: 'update-upgrade', inline: <<-SHELL
# sudo apk update && sudo apk upgrade
- # sudo apk add torsocks irssi tmux
+ # sudo apk add tor irssi tmux vim privoxy dnscrypt-proxy
+ # SHELL
+ # config.vm.provision 'privileged', type: 'shell', name: 'privileged', privileged: true, inline: <<-SHELL
+ # cp /etc/tor/torrc.sample /etc/torrc/torrc
+ # rc-service tor start
+ # rc-service privoxy start
+ # rc-service dnscrypt-proxy start
# SHELL
end
diff --git a/freebsd13/Vagrantfile b/freebsd13/Vagrantfile
index 3105c68..ab93d0c 100644
--- a/freebsd13/Vagrantfile
+++ b/freebsd13/Vagrantfile
@@ -3,22 +3,20 @@
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
MOUNT_POINT = '/home/vagrant/ff'
-CPU_COUNT = 1
-MEMORY = 1024
+CPU_COUNT = 2
+MEMORY = 512
Vagrant.require_version '>= 2.2.6'
Vagrant.configure('2') do |config|
- config.vm.box = 'generic/freebsd13'
- config.vm.box_version = '3.6.6'
+ config.vm.box = 'generic/freebsd14'
+ config.vm.box_version = '4.3.12'
config.vm.box_check_update = false
config.vm.synced_folder './', MOUNT_POINT, type: 'nfs', nfs_version: 4, nfs_udp: false
config.vm.hostname = 'freebsd13'
config.vm.boot_timeout = 240
config.vm.graceful_halt_timeout = 45
- # confit.vm.network "private_network", ip: "192.168.33.10"
- # CFLAGS="-I/opt/vagrant/embedded/include/ruby-3.0.0/ruby" vagrant plugin install vagrant-libvirt
- config.vagrant.plugins = [{ 'vagrant-libvirt' => { 'version' => '^0.6.2' } }]
+ # config.vagrant.plugins = [{ 'vagrant-libvirt' => { 'version' => '^0.6.2' } }]
config.vm.provider 'virtualbox' do |vb|
vb.cpus = CPU_COUNT
@@ -26,10 +24,9 @@ Vagrant.configure('2') do |config|
vb.memory = MEMORY.to_s
end
config.vm.provider 'libvirt' do |libvirt|
- libvirt.default_prefix = 'freebsd13-'
+ libvirt.default_prefix = 'freebsd14-'
libvirt.driver = 'kvm'
libvirt.nested = false
- # libvirt.machine_type = 'pc-q35-3.1'
# libvirt.qemuargs value: '-object'
# libvirt.qemuargs value: 'rng-random,id=rng0,filename=/dev/urandom'
# libvirt.qemuargs value: '-device'
@@ -37,13 +34,13 @@ Vagrant.configure('2') do |config|
libvirt.qemuargs value: '-nographic'
libvirt.qemuargs value: '-nodefaults'
libvirt.qemuargs value: '-no-user-config'
+ libvirt.qemuargs value: '-serial'
+ libvirt.qemuargs value: 'pty'
libvirt.sound_type = nil
libvirt.cpus = CPU_COUNT
libvirt.memory = MEMORY
libvirt.random model: 'random'
libvirt.autostart = false
- # libvirt.features = %w[acpi apic]
- # libvirt.disk_driver cache: 'writeback', io: nil, copy_on_read: 'on', discard: nil, detect_zeroes: nil
end
config.vm.provision 'provision', type: 'shell', name: 'provision', privileged: false, reboot: false, inline: <<-SHELL
diff --git a/i2p/Vagrantfile b/i2p/Vagrantfile
index 4ce5064..1d987ad 100644
--- a/i2p/Vagrantfile
+++ b/i2p/Vagrantfile
@@ -71,8 +71,8 @@ Vagrant.configure('2') do |config|
# i2prouter restart
# SHELL
- config.vm.provision 'firefox', after: 'i2p-config-copy', type: 'shell', privileged: false, name: 'firefox',
- reboot: false, inline: <<-SHELL
- sudo apt-get install -y firefox-esr xauth xorg i2pd
- SHELL
+ # config.vm.provision 'firefox', after: 'i2p-config-copy', type: 'shell', privileged: false, name: 'firefox',
+ # reboot: false, inline: <<-SHELL
+ # sudo apt-get install -y firefox-esr xauth xorg i2pd
+ # SHELL
end
diff --git a/kali/Vagrantfile b/kali/Vagrantfile
index fa028e6..c4647bf 100644
--- a/kali/Vagrantfile
+++ b/kali/Vagrantfile
@@ -5,7 +5,7 @@ ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
Vagrant.require_version '>= 2.2.6'
Vagrant.configure('2') do |config|
config.vm.box = 'kalilinux/rolling'
- config.vm.box_version = '2023.4.0'
+ config.vm.box_version = '2024.1.0'
config.vm.box_check_update = false
config.vm.hostname = 'virt-kali'
diff --git a/openbsd/Vagrantfile b/openbsd/Vagrantfile
index 0493e28..921be3c 100644
--- a/openbsd/Vagrantfile
+++ b/openbsd/Vagrantfile
@@ -9,26 +9,17 @@ MEMORY = 128
Vagrant.require_version '>= 2.2.6'
Vagrant.configure('2') do |config|
config.vm.box = 'generic/openbsd7'
- # config.vm.box_version = '3.6.10'
- config.vm.box_version = '4.3.8'
+ config.vm.box_version = '4.3.12'
config.vm.box_check_update = false
config.vm.synced_folder './', MOUNT_POINT, type: 'nfs', nfs_version: 3, nfs_udp: false, disabled: true
config.vm.hostname = 'openbsd7'
config.vm.boot_timeout = 240
config.vm.graceful_halt_timeout = 45
- # CFLAGS="-I/opt/vagrant/embedded/include/ruby-3.0.0/ruby" vagrant plugin install vagrant-libvirt
- # config.vagrant.plugins = [{ 'vagrant-libvirt' => { 'version' => '^0.6.2' } }]
-
config.vm.provider 'libvirt' do |libvirt|
libvirt.default_prefix = 'openbsd7-'
libvirt.driver = 'kvm'
libvirt.nested = false
- # libvirt.machine_type = 'pc-q35-3.1'
- # libvirt.qemuargs value: '-object'
- # libvirt.qemuargs value: 'rng-random,id=rng0,filename=/dev/urandom'
- # libvirt.qemuargs value: '-device'
- # libvirt.qemuargs value: 'virtio-rng-pci,rng=rng0,bus=pcie.0'
libvirt.qemuargs value: '-nographic'
libvirt.qemuargs value: '-nodefaults'
libvirt.qemuargs value: '-no-user-config'
@@ -42,7 +33,6 @@ Vagrant.configure('2') do |config|
end
# config.vm.provision 'provision', type: 'shell', name: 'provision', privileged: false, reboot: false, inline: <<-SHELL
- # set -ex
# sudo pkg update && sudo pkg upgrade -y
# sudo pkg install -y pkgconf gcc gmake git wget curl vim tmux ncurses readline
# SHELL
diff --git a/vpn/Vagrantfile b/vpn/Vagrantfile
index c3135c7..fd7e38a 100644
--- a/vpn/Vagrantfile
+++ b/vpn/Vagrantfile
@@ -4,8 +4,8 @@
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
Vagrant.require_version '>= 2.2.6'
Vagrant.configure('2') do |config|
- config.vm.box = 'generic/alpine318'
- config.vm.box_version = '4.3.2'
+ config.vm.box = 'generic/alpine319'
+ config.vm.box_version = '4.3.12'
config.vm.box_check_update = false
config.vm.hostname = 'virt-vpn'
@@ -20,13 +20,13 @@ Vagrant.configure('2') do |config|
config.ssh.connect_timeout = 15
# shares
- config.vm.synced_folder './share', '/home/vagrant/nfs', type: 'nfs', nfs_version: 4, nfs_udp: false
+ # config.vm.synced_folder './share', '/home/vagrant/nfs', type: 'nfs', nfs_version: 4, nfs_udp: false
config.vm.provider 'libvirt' do |libvirt|
libvirt.default_prefix = 'vpn-'
libvirt.driver = 'kvm'
- libvirt.memory = '128'
- libvirt.cpus = 1
+ libvirt.memory = '256'
+ libvirt.cpus = 2
libvirt.sound_type = nil
libvirt.qemuargs value: '-nographic'
libvirt.qemuargs value: '-nodefaults'
@@ -37,7 +37,29 @@ Vagrant.configure('2') do |config|
end
config.vm.provision 'update', type: 'shell', name: 'update', inline: <<-SHELL
- sudo apk add openvpn tmux
- sudo modprobe tun
+ set -ex
+ sudo apk add openvpn nfs-utils
+ mkdir -p /vagrant && \
+ sudo mount -t nfs 192.168.121.1:/home/devi/share/nfs /vagrant
SHELL
+
+ config.vm.provision 'update-root', type: 'shell', name: 'update-root', privileged: true, inline: <<-SHELL2
+ set -ex
+ echo tun >> /etc/modules
+ #rc-update add openvpn default
+ mkdir -p /tmp/mullvad/ && \
+ cp /vagrant/mullvad_openvpn_linux_fi_hel.zip /tmp/mullvad/ && \
+ cd /tmp/mullvad && \
+ unzip mullvad_openvpn_linux_fi_hel.zip && \
+ mv mullvad_config_linux_fi_hel/mullvad_fi_hel.conf /etc/openvpn/openvpn.conf && \
+ mv mullvad_config_linux_fi_hel/mullvad_userpass.txt /etc/openvpn/ && \
+ mv mullvad_config_linux_fi_hel/mullvad_ca.crt /etc/openvpn/ && \
+ mv mullvad_config_linux_fi_hel/update-resolv-conf /etc/openvpn && \
+ chmod 755 /etc/openvpn/update-resolv-conf
+ modprobe tun
+ echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.d/ipv4.conf
+ sysctl -p /etc/sysctl.d/ipv4.conf
+ rc-service openvpn start || true
+ sleep 1
+ SHELL2
end