From 589a411fb6118b1704e651232b429d3eafc5ed52 Mon Sep 17 00:00:00 2001 From: Inga Date: Sun, 4 Sep 2022 03:06:09 +0200 Subject: [PATCH] Updated information on bridges (for them to persist between restarts) --- README.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e1e2845..3ca99f9 100644 --- a/README.md +++ b/README.md @@ -421,23 +421,27 @@ riverctl float-filter-add title 'Firefox — Sharing Indicator' (assuming that your internet-connected interface is eth0, and that you want to use 10.157.1.0/24 subnet for the container) +Add the following to ``: +``` +auto br0 +iface br0 inet static + bridge-ports dummy0 + bridge-stp 0 + address 10.157.1.1 + netmask 255.255.255.0 +``` + +and do + ``` doas apk add bridge doas modprobe dummy -doas brctl addbr br0 -doas brctl setfd br0 0 -doas brctl addif br0 dummy0 -doas ifconfig br0 10.157.1.1 netmask 255.255.255.0 up +echo dummy | doas tee -a /etc/modules echo 1 | doas tee -a /proc/sys/net/ipv4/ip_forward doas apk add iptables doas rc-update add iptables doas iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE doas iptables --append FORWARD --in-interface br0 -j ACCEPT -``` - -to persist: -``` -echo dummy | doas tee -a /etc/modules doas /etc/init.d/iptables save ```