NETBIRD Disrupts NAT on CentOS 7 #916

Open
opened 2025-11-20 05:19:50 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @thorleifjacobsen on GitHub (May 22, 2024).

Description
When enabling NETBIRD on CentOS 7, NAT (Network Address Translation) stops functioning properly on two different networks (10.0.4.x and 10.0.2.x). Disabling NETBIRD restores NAT functionality. The interfaces 10.0.4.x and 10.0.2.x are not related to NETBIRD.

image

Current IPTables:

*nat
:PREROUTING ACCEPT [6415:852871]
:INPUT ACCEPT [6228:840858]
:OUTPUT ACCEPT [1942:137692]
:POSTROUTING ACCEPT [288:22279]
-A PREROUTING -p udp -m mac --mac-source 96:4F:1D:XX:XX:XX -m multiport ! --dports 0:1024,1900,5353 -j DNAT --to-destination 10.0.4.236
-A PREROUTING -p tcp -m mac --mac-source 96:4F:1D:XX:XX:XX -m multiport ! --dports 0:1024 -j DNAT --to-destination 10.0.4.236
-A POSTROUTING ! -d 224.0.0.251/32 -o enp0s8 -j SNAT --to-source 10.0.4.233
COMMIT
# Completed on Wed May 22 13:56:11 2024
# Generated by iptables-save v1.4.21 on Wed May 22 13:56:11 2024
*filter
:INPUT ACCEPT [98280:30756187]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [51952:10249852]
-A INPUT ! -i lo -p tcp -m tcp --dport 3306 -j REJECT --reject-with icmp-port-unreachable
-A INPUT -i oc__+ -p tcp -m multiport --dports 22 -j REJECT --reject-with icmp-port-unreachable
-A INPUT -i enp0s8 -p tcp -m multiport --dports 8082 -j REJECT --reject-with icmp-port-unreachable
-A INPUT -i enp0s9 -p tcp -m multiport --dports 8080,8083 -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -i enp0s8 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -d 10.0.4.236/32 -p udp -m mac --mac-source 96:4F:1D:XX:XX:XX -m multiport ! --dports 0:1024,1900,5353 -j ACCEPT
-A FORWARD -d 10.0.4.236/32 -p tcp -m mac --mac-source 96:4F:1D:XX:XX:XX -m multiport ! --dports 0:1024 -j ACCEPT

Steps to Reproduce
Set up two network interfaces with IP ranges 10.0.4.x and 10.0.2.x.
Enable NAT on these interfaces.
Install and enable NETBIRD.
Observe that NAT stops working on both interfaces.
Disable NETBIRD.
Observe that NAT functionality is restored.
Expected Behavior
Enabling NETBIRD should not affect NAT functionality on unrelated network interfaces.

Actual Behavior
Enabling NETBIRD disrupts NAT on the interfaces 10.0.4.x and 10.0.2.x. Disabling NETBIRD restores NAT functionality.

Troubleshooting Steps Taken

  • Verified that iptables rules remain unchanged before and after enabling NETBIRD.
  • Confirmed that firewalld is not installed.
  • Compared routing tables using ip route show before and after enabling NETBIRD (100 and 101 added ?)
  • Inspected network interfaces with ip addr show before and after enabling NETBIRD (no changes found other than wt0
  • Checked system logs (/var/log/messages and journalctl -xe) for relevant messages (no relevant entries found).
  • Reviewed NETBIRD configuration files for any settings related to network interfaces or routes (nothing unusual found).
  • Ensured NetworkManager is not making changes when NETBIRD is enabled.
  • Verified no other services or scripts are triggered by NETBIRD that could cause network changes.

System Information
OS: CentOS 7

Additional Information

  • No changes in MTU settings observed.
  • DNS settings is irrelevant
  • No errors or warnings in NETBIRD logs.
  • Network statistics show no anomalies before and after enabling NETBIRD.

Any assistance or tips to resolve this issue would be greatly appreciated.

Originally created by @thorleifjacobsen on GitHub (May 22, 2024). **Description** When enabling NETBIRD on CentOS 7, NAT (Network Address Translation) stops functioning properly on two different networks (10.0.4.x and 10.0.2.x). Disabling NETBIRD restores NAT functionality. The interfaces 10.0.4.x and 10.0.2.x are not related to NETBIRD. ![image](https://github.com/netbirdio/netbird/assets/8550684/e1adb4b5-faa8-483e-89ac-6709fdc519a4) **Current IPTables:** ``` *nat :PREROUTING ACCEPT [6415:852871] :INPUT ACCEPT [6228:840858] :OUTPUT ACCEPT [1942:137692] :POSTROUTING ACCEPT [288:22279] -A PREROUTING -p udp -m mac --mac-source 96:4F:1D:XX:XX:XX -m multiport ! --dports 0:1024,1900,5353 -j DNAT --to-destination 10.0.4.236 -A PREROUTING -p tcp -m mac --mac-source 96:4F:1D:XX:XX:XX -m multiport ! --dports 0:1024 -j DNAT --to-destination 10.0.4.236 -A POSTROUTING ! -d 224.0.0.251/32 -o enp0s8 -j SNAT --to-source 10.0.4.233 COMMIT # Completed on Wed May 22 13:56:11 2024 # Generated by iptables-save v1.4.21 on Wed May 22 13:56:11 2024 *filter :INPUT ACCEPT [98280:30756187] :FORWARD DROP [0:0] :OUTPUT ACCEPT [51952:10249852] -A INPUT ! -i lo -p tcp -m tcp --dport 3306 -j REJECT --reject-with icmp-port-unreachable -A INPUT -i oc__+ -p tcp -m multiport --dports 22 -j REJECT --reject-with icmp-port-unreachable -A INPUT -i enp0s8 -p tcp -m multiport --dports 8082 -j REJECT --reject-with icmp-port-unreachable -A INPUT -i enp0s9 -p tcp -m multiport --dports 8080,8083 -j REJECT --reject-with icmp-port-unreachable -A FORWARD -i enp0s8 -m state --state RELATED,ESTABLISHED -j ACCEPT -A FORWARD -d 10.0.4.236/32 -p udp -m mac --mac-source 96:4F:1D:XX:XX:XX -m multiport ! --dports 0:1024,1900,5353 -j ACCEPT -A FORWARD -d 10.0.4.236/32 -p tcp -m mac --mac-source 96:4F:1D:XX:XX:XX -m multiport ! --dports 0:1024 -j ACCEPT ``` **Steps to Reproduce** Set up two network interfaces with IP ranges 10.0.4.x and 10.0.2.x. Enable NAT on these interfaces. Install and enable NETBIRD. Observe that NAT stops working on both interfaces. Disable NETBIRD. Observe that NAT functionality is restored. Expected Behavior Enabling NETBIRD should not affect NAT functionality on unrelated network interfaces. **Actual Behavior** Enabling NETBIRD disrupts NAT on the interfaces 10.0.4.x and 10.0.2.x. Disabling NETBIRD restores NAT functionality. **Troubleshooting Steps Taken** - Verified that iptables rules remain unchanged before and after enabling NETBIRD. - Confirmed that firewalld is not installed. - Compared routing tables using ip route show before and after enabling NETBIRD (100 and 101 added ?) - Inspected network interfaces with ip addr show before and after enabling NETBIRD (no changes found other than wt0 - Checked system logs (/var/log/messages and journalctl -xe) for relevant messages (no relevant entries found). - Reviewed NETBIRD configuration files for any settings related to network interfaces or routes (nothing unusual found). - Ensured NetworkManager is not making changes when NETBIRD is enabled. - Verified no other services or scripts are triggered by NETBIRD that could cause network changes. **System Information** OS: CentOS 7 **Additional Information** - No changes in MTU settings observed. - DNS settings is irrelevant - No errors or warnings in NETBIRD logs. - Network statistics show no anomalies before and after enabling NETBIRD. Any assistance or tips to resolve this issue would be greatly appreciated.
saavagebueno added the triage-needed label 2025-11-20 05:19:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#916