From 14e72e843fa2f5ca030cd029584c11ee9b85e035 Mon Sep 17 00:00:00 2001 From: abhishekkarigar Date: Sun, 27 Jun 2021 18:58:25 +0530 Subject: [PATCH] Update Dockerfile addition of legacy iptables fixes the issues in wsl2 containers https://github.com/husarnet/blog-examples/issues/1 --- docker-vpn/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-vpn/Dockerfile b/docker-vpn/Dockerfile index 43f9c07..c158849 100644 --- a/docker-vpn/Dockerfile +++ b/docker-vpn/Dockerfile @@ -9,6 +9,10 @@ RUN apt update -y && \ RUN update-alternatives --set ip6tables /usr/sbin/ip6tables-nft +# legacy xtables support for ipv4 and ipv6 +RUN update-alternatives --set iptables /usr/sbin/iptables-legacy +RUN update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy + # install webserver service RUN apt install -y nginx @@ -28,4 +32,4 @@ COPY init-container.sh /opt COPY src /var/www/html/ # initialize a container -CMD /opt/init-container.sh \ No newline at end of file +CMD /opt/init-container.sh