Disabling Masquerding not working #1349

Closed
opened 2025-11-20 05:28:49 -05:00 by saavagebueno · 4 comments
Owner

Originally created by @ndziuba on GitHub (Oct 17, 2024).

Describe the problem

I run a node with multiple advertised routes that were masqueraded using iptabels with an client installed on Rocky 8.
Setting up a routing back into netbird for the 100.24.0.0 adresses works as expected as far as being able to ping Netbird clients from non Netbird clients.

This is not always true for Netbird clients, we can ping through the node with iptables but everything else like ssh or http is not working and stops at the routing node. Using nftables results in not being able to ping all together.
I reproduced this for Debian and a Docker client.

To Reproduce

Steps to reproduce the behavior:

  1. Set a route for a node to advertise a subnet
  2. Disable masquerading (its important to have no exit node on this node as this enables masqerading for all routes on this node, even when disabled)
  3. Testing ping should not work
  4. Enable iptabels with echo 'NB_SKIP_NFTABLES_CHECK=true' | sudo tee -a /etc/sysconfig/netbird and restarting netbird
  5. Ping should now work but nothing else

We can see from iptables that currently no route advertises masquerading

iptables -t nat -S

-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P POSTROUTING ACCEPT
-P OUTPUT ACCEPT
-N NETBIRD-RT-NAT
-A POSTROUTING -j NETBIRD-RT-NAT

And ping is working but no ssh or http

ping 10.1.0.1

Ping wird ausgeführt für 10.1.0.1 mit 32 Bytes Daten:
Antwort von 10.1.0.1: Bytes=32 Zeit=38ms TTL=63

For the ease of configuring masquerading i enable an exit node route which results in following ouput

iptables -t nat -S

-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P POSTROUTING ACCEPT
-P OUTPUT ACCEPT
-N NETBIRD-RT-NAT
-A POSTROUTING -j NETBIRD-RT-NAT
-A NETBIRD-RT-NAT -i wt0 -j MASQUERADE
-A NETBIRD-RT-NAT -o wt0 -j MASQUERADE

And fixing the issues by being able to connect again with the network clients.

Are you using NetBird Cloud?

Self-hosted NetBird

NetBird version

0.30.1

Originally created by @ndziuba on GitHub (Oct 17, 2024). **Describe the problem** I run a node with multiple advertised routes that were masqueraded using iptabels with an client installed on Rocky 8. Setting up a routing back into netbird for the 100.24.0.0 adresses works as expected as far as being able to ping Netbird clients from non Netbird clients. This is not always true for Netbird clients, we can ping through the node with iptables but everything else like ssh or http is not working and stops at the routing node. Using nftables results in not being able to ping all together. I reproduced this for Debian and a Docker client. **To Reproduce** Steps to reproduce the behavior: 1. Set a route for a node to advertise a subnet 2. Disable masquerading (its important to have no exit node on this node as this enables masqerading for all routes on this node, even when disabled) 3. Testing ping should not work 4. Enable iptabels with `echo 'NB_SKIP_NFTABLES_CHECK=true' | sudo tee -a /etc/sysconfig/netbird` and restarting netbird 5. Ping should now work but nothing else We can see from iptables that currently no route advertises masquerading ``` iptables -t nat -S -P PREROUTING ACCEPT -P INPUT ACCEPT -P POSTROUTING ACCEPT -P OUTPUT ACCEPT -N NETBIRD-RT-NAT -A POSTROUTING -j NETBIRD-RT-NAT ``` And ping is working but no ssh or http ``` ping 10.1.0.1 Ping wird ausgeführt für 10.1.0.1 mit 32 Bytes Daten: Antwort von 10.1.0.1: Bytes=32 Zeit=38ms TTL=63 ``` For the ease of configuring masquerading i enable an exit node route which results in following ouput ``` iptables -t nat -S -P PREROUTING ACCEPT -P INPUT ACCEPT -P POSTROUTING ACCEPT -P OUTPUT ACCEPT -N NETBIRD-RT-NAT -A POSTROUTING -j NETBIRD-RT-NAT -A NETBIRD-RT-NAT -i wt0 -j MASQUERADE -A NETBIRD-RT-NAT -o wt0 -j MASQUERADE ``` And fixing the issues by being able to connect again with the network clients. **Are you using NetBird Cloud?** Self-hosted NetBird **NetBird version** `0.30.1`
saavagebueno added the waiting-feedbacktriage-needed labels 2025-11-20 05:28:49 -05:00
Author
Owner

@mlsmaycon commented on GitHub (Nov 5, 2024):

Sorry for the delay @ndziuba, we will investigate the issue and give you a feedback soon.

@mlsmaycon commented on GitHub (Nov 5, 2024): Sorry for the delay @ndziuba, we will investigate the issue and give you a feedback soon.
Author
Owner

@mgarces commented on GitHub (Nov 12, 2024):

can you please validate if 0.31.1 helps with this issue?

@mgarces commented on GitHub (Nov 12, 2024): can you please validate if [0.31.1](https://github.com/netbirdio/netbird/releases/tag/v0.31.1) helps with this issue?
Author
Owner

@nazarewk commented on GitHub (Apr 28, 2025):

Hello @ndziuba,

We're currently reviewing our open issues and would like to verify if this problem still exists in the latest NetBird version.

Could you please confirm if the issue is still there?

We may close this issue temporarily if we don't hear back from you within 2 weeks, but feel free to reopen it with updated information.

Thanks for your contribution to improving the project!

@nazarewk commented on GitHub (Apr 28, 2025): Hello @ndziuba, We're currently reviewing our open issues and would like to verify if this problem still exists in the [latest NetBird version](https://github.com/netbirdio/netbird/releases). Could you please confirm if the issue is still there? We may close this issue temporarily if we don't hear back from you within **2 weeks**, but feel free to reopen it with updated information. Thanks for your contribution to improving the project!
Author
Owner

@mlsmaycon commented on GitHub (Jun 1, 2025):

closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.

@mlsmaycon commented on GitHub (Jun 1, 2025): closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1349