aboutsummaryrefslogtreecommitdiffstats
path: root/templates/jail_confs
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2026-05-12 15:06:28 +0300
committerJan Tuomi <jan@jantuomi.fi>2026-05-12 22:27:15 +0300
commit4715a28fdcd87440400d17154bfa361d99db29cc (patch)
tree52b825ca69ed3fc535f8f46de0ee1d2b1a6e2ade /templates/jail_confs
parented338ea29f1c0f2ad82d3a45b23c0544371b5575 (diff)
Add local vm for testing, adjust configs
Diffstat (limited to 'templates/jail_confs')
-rw-r--r--templates/jail_confs/_epl_network.j25
-rw-r--r--templates/jail_confs/ingress.j25
2 files changed, 8 insertions, 2 deletions
diff --git a/templates/jail_confs/_epl_network.j2 b/templates/jail_confs/_epl_network.j2
index e80aebe..fa3744a 100644
--- a/templates/jail_confs/_epl_network.j2
+++ b/templates/jail_confs/_epl_network.j2
@@ -8,10 +8,11 @@ exec.prestart += "ifconfig brlan0 addm epl{{ jail.num }}a";
exec.poststart += "ifconfig epl{{ jail.num }}b vnet ${name}";
exec.poststart += "jexec ${name} ifconfig epl{{ jail.num }}b up";
exec.poststart += "ifconfig epl{{ jail.num }}a up";
-exec.poststart += "jexec ${name} ifconfig epl{{ jail.num }}b 192.168.2.{{ jail.num }}/16";
+exec.poststart += "jexec ${name} ifconfig epl{{ jail.num }}b {{ jail_lan_prefix }}.{{ jail.num + jail_ip_offset }}/{{ jail_lan_prefixlen }}";
exec.poststart += "jexec ${name} route delete default || echo 'No default route to delete'";
+{% if not is_test_vm %}
exec.poststart += "jexec ${name} route add 10.6.210.0/24 {{ lan_ipv4_gateway }} || echo 'Failed to add Wireguard return route'";
-
+{% endif %}
exec.poststop += "ifconfig epl{{ jail.num }}a destroy";
## _epl_network end
diff --git a/templates/jail_confs/ingress.j2 b/templates/jail_confs/ingress.j2
index 59db3f1..5964d06 100644
--- a/templates/jail_confs/ingress.j2
+++ b/templates/jail_confs/ingress.j2
@@ -10,7 +10,12 @@ exec.prestart += "ifconfig brwan0 addm epw{{ jail.num }}a";
exec.poststart += "ifconfig epw{{ jail.num }}b vnet ${name}";
exec.poststart += "jexec ${name} ifconfig epw{{ jail.num }}b up";
exec.poststart += "ifconfig epw{{ jail.num }}a up";
+{% if is_test_vm %}
+exec.poststart += "jexec ${name} ifconfig epw{{ jail.num }}b inet 10.0.20.3/24";
+exec.poststart += "jexec ${name} route add default 10.0.20.1";
+{% else %}
exec.poststart += "jexec ${name} service dhclient restart epw{{ jail.num }}b";
+{% endif %}
exec.prestart += "mount -t nullfs /usr/local/jails/containers/goaccess/var/www/goaccess /usr/local/jails/containers/ingress/mnt/www_goaccess || echo 'Failed to mount'";
exec.poststop += "umount /usr/local/jails/containers/ingress/mnt/www_goaccess || echo 'Failed to umount'";