bryopsida / oci-wireguard

A multi-arch alpine based container image for wireguard
MIT License
2 stars 4 forks source link

Warning: Extension MASQUERADE revision 0 not supported, missing kernel module? #23

Closed klauserber closed 10 months ago

klauserber commented 11 months ago

Test with Version 20231217-78a500c:

[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.52.18.1/24 dev wg0
[#] ip link set mtu 1380 up dev wg0
[#] ip -4 route add 10.6.6.0/24 dev wg0
[#] ip -4 route add 10.9.0.0/16 dev wg0
[#] wg set wg0 private-key /etc/wireguard/privatekey && iptables -t nat -A POSTROUTING  -o eth0 -j MASQUERADE
Warning: Extension MASQUERADE revision 0 not supported, missing kernel module?
iptables v1.8.10 (nf_tables):  CHAIN_ADD failed (No such file or directory): chain POSTROUTING
[#] ip link delete dev wg0
Public key 'J8AasOYqcrOH1XctJAFNSDxVAavmHWFNJ/faxO0qjXQ='
wg-quick: `wg0' is not a WireGuard interface

May be another alpine 3.19 problem?

20231207-bcfa2df is working fine with the newest Helm Chart (0.18.0) in my scenario.

bryopsida commented 11 months ago

@klauserber this should be fixed on the main tag now. I've confirmed locally but re-opened this issue to confirm it's fixed for you as well.

klauserber commented 11 months ago

Hi, I have still the same error with the latest version (20231218-cd191a4 I tried main as well):

Defaulted container "wireguard" out of: wireguard, sysctls (init)
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.52.18.1/24 dev wg0
[#] ip link set mtu 1380 up dev wg0
[#] ip -4 route add 10.6.6.0/24 dev wg0
[#] ip -4 route add 10.9.0.0/16 dev wg0
[#] wg set wg0 private-key /etc/wireguard/privatekey && iptables -t nat -A POSTROUTING  -o eth0 -j MASQUERADE
Warning: Extension MASQUERADE revision 0 not supported, missing kernel module?
iptables v1.8.10 (nf_tables):  CHAIN_ADD failed (No such file or directory): chain POSTROUTING
[#] ip link delete dev wg0
klauserber commented 11 months ago

May be it is something with the environment, it is a Google GKE Cluster, the Nodes are running 'Container-Optimized OS from Google',

Kernel: Linux gke-prod-edge-03392601-06jl 5.15.133+ #1 SMP Fri Dec 1 13:04:48 UTC 2023 x86_64 Intel(R) Xeon(R) CPU @ 2.20GHz GenuineIntel GNU/Linux

Version 20231207-bcfa2df is still running fine

bryopsida commented 11 months ago

I've reverted the image base back to alpine 3.18, and created an issue to investigate 3.19 a bit more.

klauserber commented 10 months ago

Thank you, it is working fine now with version 20231223-d94952a