[GH-ISSUE #74] The alpine image version update caused Openvpn to fail to forward packets correctly #33

Closed
opened 2026-10-13 20:11:16 +00:00 by bsakaguchi · 7 comments
Owner

Originally created by @unlimited996 on GitHub (Jun 1, 2022).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/74

Due to the removal of the built-in iptables after the base image was updated to alpine:3.16, the openvpn container that pulled the latest version of the image could not forward the packet correctly.

Originally created by @unlimited996 on GitHub (Jun 1, 2022). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/74 Due to the removal of the built-in iptables after the base image was updated to alpine:3.16, the openvpn container that pulled the latest version of the image could not forward the packet correctly.
Author
Owner

@unlimited996 commented on GitHub (Jun 1, 2022):

X7N7TJCZ CMIZTG720J}2}3

<!-- gh-comment-id:1143663843 --> @unlimited996 commented on GitHub (Jun 1, 2022): ![X7N7TJCZ CMIZTG720J}2}3](https://user-images.githubusercontent.com/79558585/171424939-196fca24-3805-46fc-8c6b-e9aeca3c6053.png)
Author
Owner

@pokamest commented on GitHub (Jun 2, 2022):

Thank you for reporting!
Can you propose solution for that?

<!-- gh-comment-id:1145297483 --> @pokamest commented on GitHub (Jun 2, 2022): Thank you for reporting! Can you propose solution for that?
Author
Owner

@40OIL commented on GitHub (Jun 3, 2022):

maybe instead of "FROM alpine:latest" specify a specific previous version and rebuild EXE?

<!-- gh-comment-id:1145988675 --> @40OIL commented on GitHub (Jun 3, 2022): maybe instead of "FROM alpine:latest" specify a specific previous version and rebuild EXE?
Author
Owner

@unlimited996 commented on GitHub (Jun 4, 2022):

maybe instead of "FROM alpine:latest" specify a specific previous version and rebuild EXE?

Yes, using "FROM alpine:3.15" can generate the correct image, but I recommend that the image be pulled from your own image repository to avoid such problems caused by major changes to the official image version

<!-- gh-comment-id:1146570375 --> @unlimited996 commented on GitHub (Jun 4, 2022): > maybe instead of "FROM alpine:latest" specify a specific previous version and rebuild EXE? Yes, using "FROM alpine:3.15" can generate the correct image, but I recommend that the image be pulled from your own image repository to avoid such problems caused by major changes to the official image version
Author
Owner

@40OIL commented on GitHub (Jun 5, 2022):

Can you rebuild the "temporary release" of amnesia with these changes? Well, so that you can put a working server now? And then neither Travis Ci nor Qt Creator does not work for me, and the google does not help ...
Or somewhere you can correct these scripts immediately on the server?

<!-- gh-comment-id:1146740779 --> @40OIL commented on GitHub (Jun 5, 2022): Can you rebuild the "temporary release" of amnesia with these changes? Well, so that you can put a working server now? And then neither Travis Ci nor Qt Creator does not work for me, and the google does not help ... Or somewhere you can correct these scripts immediately on the server?
Author
Owner

@unlimited996 commented on GitHub (Jun 6, 2022):

Can you rebuild the "temporary release" of amnesia with these changes? Well, so that you can put a working server now? And then neither Travis Ci nor Qt Creator does not work for me, and the google does not help ... Or somewhere you can correct these scripts immediately on the server?

I don't understand how to fix that ,now I use kylemanna/openvpn:2.4 image to use openVpn before fixed
1.docker pull kylemanna/openvpn:2.4
2.mkdir -p /data/openvpn
3.docker run -v /data/openvpn:/etc/openvpn --rm kylemanna/openvpn:2.4 ovpn_genconfig -u udp://39.104.162.245 【server IP】
4.docker run -v /data/openvpn:/etc/openvpn --rm -it kylemanna/openvpn:2.4 ovpn_initpki
Enter PEM pass phrase:12345678【need remember private key,multiple inputs are required later】
Common Name (eg: your user, host, or server name) [Easy-RSA CA]: 【or Enter to skip】
5.docker run -v /data/openvpn:/etc/openvpn --rm -it kylemanna/openvpn:2.4 easyrsa build-client-full whsir nopass
6.mkdir -p /data/openvpn/conf
7.docker run -v /data/openvpn:/etc/openvpn --rm kylemanna/openvpn:2.4 ovpn_getclient whsir > /data/openvpn/conf/whsir.ovpn
8.docker run --name openvpn -v /data/openvpn:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn:2.4
9.iptables-save > /etc/sysconfig/iptables
10.systemctl stop firewalld.service
11.systemctl disable firewalld.service
12.yum -y install iptables-services net-tools
13.systemctl enable iptables.service
14.vi /etc/sysconfig/iptables 【add at the bottom before COMMIT】
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
15.systemctl restart iptables
16.download /data/openvpn/conf/whsir.ovpn

then you can use whsir.ovpn to connect to openvpn

<!-- gh-comment-id:1146969368 --> @unlimited996 commented on GitHub (Jun 6, 2022): > Can you rebuild the "temporary release" of amnesia with these changes? Well, so that you can put a working server now? And then neither Travis Ci nor Qt Creator does not work for me, and the google does not help ... Or somewhere you can correct these scripts immediately on the server? I don't understand how to fix that ,now I use kylemanna/openvpn:2.4 image to use openVpn before fixed 1.docker pull kylemanna/openvpn:2.4 2.mkdir -p /data/openvpn 3.docker run -v /data/openvpn:/etc/openvpn --rm kylemanna/openvpn:2.4 ovpn_genconfig -u udp://39.104.162.245 【server IP】 4.docker run -v /data/openvpn:/etc/openvpn --rm -it kylemanna/openvpn:2.4 ovpn_initpki Enter PEM pass phrase:12345678【need remember private key,multiple inputs are required later】 Common Name (eg: your user, host, or server name) [Easy-RSA CA]: 【or Enter to skip】 5.docker run -v /data/openvpn:/etc/openvpn --rm -it kylemanna/openvpn:2.4 easyrsa build-client-full whsir nopass 6.mkdir -p /data/openvpn/conf 7.docker run -v /data/openvpn:/etc/openvpn --rm kylemanna/openvpn:2.4 ovpn_getclient whsir > /data/openvpn/conf/whsir.ovpn 8.docker run --name openvpn -v /data/openvpn:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn:2.4 9.iptables-save > /etc/sysconfig/iptables 10.systemctl stop firewalld.service 11.systemctl disable firewalld.service 12.yum -y install iptables-services net-tools 13.systemctl enable iptables.service 14.vi /etc/sysconfig/iptables 【add at the bottom before COMMIT】 -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT -A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited 15.systemctl restart iptables 16.download /data/openvpn/conf/whsir.ovpn then you can use whsir.ovpn to connect to openvpn
Author
Owner

@pokamest commented on GitHub (Jun 11, 2022):

Fixed in 2.0.10
https://github.com/amnezia-vpn/desktop-client/releases/edit/2.0.10

<!-- gh-comment-id:1152932548 --> @pokamest commented on GitHub (Jun 11, 2022): Fixed in 2.0.10 https://github.com/amnezia-vpn/desktop-client/releases/edit/2.0.10
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#33
No description provided.