Closed JenswBE closed 1 year ago
@JenswBE you hit this one directly on the head :)
I'm working on a rewrite of this image since I've learned a good bit since the beginning. I added a fix for this in the rewrite branch. Can you verify that it works for you? I described how to use that branch here: https://github.com/wfg/docker-openvpn-client/issues/76#issuecomment-1257196491
Thanks for the awesome image!
Issue
Unfortunately, while setting up a fresh config from Mullvad, I kept receiving:
write UDP []: Operation not permitted (code=1)
. After some digging it turns out the entry script doesn't correctly handle comments at the end of aremote
config option.Mullvad's config contains e.g. (real IP's replaced with examples):
The line to extract the remotes converts this into below result, as it expects to find an optional protocol in the third position:
If using killswitch
iptables
, this generates error:For killswitch
nftables
, no error shows, but the generated rules are off (note missingaccept
part):Possible solution
I'm not an expert on OpenVPN configs, but in case the
#
sign is reserved for comments, following find/replace could be added to remove all of them:I can create a PR for this solution if you agree.