From 44291ad156382eabb2cef2c73a741c283b3e0ac1 Mon Sep 17 00:00:00 2001 From: TCH Date: Mon, 1 Jan 2024 21:37:18 +0100 Subject: [PATCH 1/6] Autoinstall with all features --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3587fd4..29ec021 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ -FROM jrei/systemd-debian:10 +FROM ghcr.io/raspap/raspap-docker RUN apt update && apt install -y sudo wget procps curl systemd && rm -rf /var/lib/apt/lists/* -COPY setup.sh . +RUN curl -sL https://install.raspap.com | bash -s -- --yes --wireguard 1 --openvpn 1 --adblock 1 From a8e688785d0944df74cf9c93555f48c500cbf8c7 Mon Sep 17 00:00:00 2001 From: TCH Date: Mon, 1 Jan 2024 21:37:35 +0100 Subject: [PATCH 2/6] Delete setup.sh --- setup.sh | 2 -- 1 file changed, 2 deletions(-) delete mode 100755 setup.sh diff --git a/setup.sh b/setup.sh deleted file mode 100755 index 8ae2c55..0000000 --- a/setup.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -curl -sL https://install.raspap.com | bash From ee6531da32977ab14af1df74c5734419dc557957 Mon Sep 17 00:00:00 2001 From: TCH Date: Mon, 1 Jan 2024 21:38:17 +0100 Subject: [PATCH 3/6] Update README.md with less manual steps == win --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index e0371a1..66ac9cc 100644 --- a/README.md +++ b/README.md @@ -7,18 +7,12 @@ A community-led docker container for RaspAP # Usage ``` docker run --name raspap -it -d --privileged --network=host -v /sys/fs/cgroup:/sys/fs/cgroup:ro --cap-add SYS_ADMIN jrcichra/raspap-docker -docker exec -it raspap bash -$ ./setup.sh -docker restart raspap Web GUI should be accessible on http://localhost by default ``` ## Workaround for arm devices To use this container on arm devices you have to make cgroups writable: ``` docker run --name raspap -it -d --privileged --network=host --cgroupns=host -v /sys/fs/cgroup:/sys/fs/cgroup:rw --cap-add SYS_ADMIN jrcichra/raspap-docker -docker exec -it raspap bash -$ ./setup.sh -docker restart raspap Web GUI should be accessible on http://localhost by default ``` ## Allow WiFi-clients to connect to LAN and internet From 5d06cd46ab097e11c4885adeec60485ad64cbb5a Mon Sep 17 00:00:00 2001 From: billz Date: Sat, 6 Jan 2024 18:04:12 +0100 Subject: [PATCH 4/6] Bump debian release version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3587fd4..6b54f91 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ -FROM jrei/systemd-debian:10 +FROM jrei/systemd-debian:12 RUN apt update && apt install -y sudo wget procps curl systemd && rm -rf /var/lib/apt/lists/* COPY setup.sh . From 8f6b8703e3acdfc550830c43a20e04d59c0464fc Mon Sep 17 00:00:00 2001 From: TCH Date: Mon, 8 Jan 2024 09:02:27 +0000 Subject: [PATCH 5/6] fix infinite recursion --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 29ec021..8c10a29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ -FROM ghcr.io/raspap/raspap-docker +FROM jrei/systemd-debian:12 RUN apt update && apt install -y sudo wget procps curl systemd && rm -rf /var/lib/apt/lists/* RUN curl -sL https://install.raspap.com | bash -s -- --yes --wireguard 1 --openvpn 1 --adblock 1 From d1bc60af5c6beb2bc395fc687df7a733814e4fb4 Mon Sep 17 00:00:00 2001 From: TCH Date: Mon, 8 Jan 2024 17:58:37 +0000 Subject: [PATCH 6/6] autoconfigure firewall eth0-wlan0 --- Dockerfile | 3 +++ firewall-rules.sh | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 firewall-rules.sh diff --git a/Dockerfile b/Dockerfile index 8c10a29..80f63c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,6 @@ FROM jrei/systemd-debian:12 RUN apt update && apt install -y sudo wget procps curl systemd && rm -rf /var/lib/apt/lists/* RUN curl -sL https://install.raspap.com | bash -s -- --yes --wireguard 1 --openvpn 1 --adblock 1 +COPY firewall-rules.sh /home/firewall-rules.sh +RUN chmod +x /home/firewall-rules.sh +CMD /home/firewall-rules.sh \ No newline at end of file diff --git a/firewall-rules.sh b/firewall-rules.sh new file mode 100644 index 0000000..a9f423e --- /dev/null +++ b/firewall-rules.sh @@ -0,0 +1,6 @@ +#!/bin/bash +iptables -I DOCKER-USER -i src_if -o dst_if -j ACCEPT +iptables -t nat -C POSTROUTING -o eth0 -j MASQUERADE || iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE +iptables -C FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT || iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT +iptables -C FORWARD -i wlan0 -o eth0 -j ACCEPT || iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT +iptables-save \ No newline at end of file