Summary
On an Ubuntu 24.04 GCP VM, when using v1.6.4 and masquerade = true in the gateway.toml, all client VPN traffic hangs and has no DNS. This previously worked fine with v1.6.3, and after downgrading to that version of the gateway everything starts working again.
A workaround for v1.6.4 we're using is to install nftables on the VPN server and manually add the chain and rule, then everything starts working again:
apt install -y nftables
nft add table ip nat
nft add chain ip nat postrouting { type nat hook postrouting priority 100 \; }
nft add rule ip nat postrouting oifname "ens4" masquerade
We're not sure if we were doing something wrong with v1.6.3, and it just happened to work (and now doesn't in v1.6.4) or the behaviour of masquerade = true has changed/is broken.
Steps to reproduce
- Vanilla install from APT repo of latest available defguard versions - gateway version v1.6.4
- Add
masquerade = true to the gateway.toml
- Either defguard doesn't set the
chain/rule correctly, or it's not using them on VPN connections
Expected behavior
When using masquerade = true defguard manages the nftools chain and rule so that VPN connections work in this mode.
Actual behavior
Client VPN connections all hang - not just for predefined routes, as there's no DNS at all when connected.
Defguard version
Core: v1.6.5, Gateway: v1.6.4, Desktop client: v1.6.7
Environment details
Core: Ubuntu 24.04, Gateway: Ubuntu 24.04, Desktop client: macOS/Linux
Deployment / install method
Standalone packages
Relevant logs / output
Relevant configuration (redacted)
Summary
On an Ubuntu 24.04 GCP VM, when using v1.6.4 and
masquerade = truein thegateway.toml, all client VPN traffic hangs and has no DNS. This previously worked fine with v1.6.3, and after downgrading to that version of the gateway everything starts working again.A workaround for v1.6.4 we're using is to install
nftableson the VPN server and manually add thechainandrule, then everything starts working again:We're not sure if we were doing something wrong with v1.6.3, and it just happened to work (and now doesn't in v1.6.4) or the behaviour of
masquerade = truehas changed/is broken.Steps to reproduce
masquerade = trueto thegateway.tomlchain/rulecorrectly, or it's not using them on VPN connectionsExpected behavior
When using
masquerade = truedefguard manages thenftoolschainandruleso that VPN connections work in this mode.Actual behavior
Client VPN connections all hang - not just for predefined routes, as there's no DNS at all when connected.
Defguard version
Core: v1.6.5, Gateway: v1.6.4, Desktop client: v1.6.7
Environment details
Core: Ubuntu 24.04, Gateway: Ubuntu 24.04, Desktop client: macOS/Linux
Deployment / install method
Standalone packages
Relevant logs / output
Relevant configuration (redacted)