Synology failed to allow netbird interface traffic #472

Closed
opened 2025-11-20 05:12:01 -05:00 by saavagebueno · 4 comments
Owner

Originally created by @tbc0309 on GitHub (Oct 16, 2023).

Describe the problem
Synology's iptables are incomplete and cannot complete interface traffic configuration.

NetBird output:
ERRO client/internal/acl/manager_create_linux.go:43: failed to allow netbird interface traffic: failed to allow netbird interface traffic: check is input rule already exists: running [/sbin/iptables -t filter -C NETBIRD-ACL-INPUT -j ACCEPT -m comment --comment allow netbird interface traffic --wait]: exit status 2: iptables v1.8.3 (legacy): Couldn't load match comment':No such file or directory`

After add xt_comment.ko、libxt_comment.so, a new error is reported: Bad argument ` netbird '

Is there any other way to solve the problem...

Originally created by @tbc0309 on GitHub (Oct 16, 2023). **Describe the problem** Synology's iptables are incomplete and cannot complete interface traffic configuration. **NetBird output:** `ERRO client/internal/acl/manager_create_linux.go:43: failed to allow netbird interface traffic: failed to allow netbird interface traffic: check is input rule already exists: running [/sbin/iptables -t filter -C NETBIRD-ACL-INPUT -j ACCEPT -m comment --comment allow netbird interface traffic --wait]: exit status 2: iptables v1.8.3 (legacy): Couldn't load match `comment':No such file or directory` After add xt_comment.ko、libxt_comment.so, a new error is reported: Bad argument ` netbird ' Is there any other way to solve the problem...
Author
Owner

@surik commented on GitHub (Oct 16, 2023):

Hi @tbc0309 please help me understand the issue by providing more information about the environment you have:

  • On which version of NetBird are you?
  • What init system do you use? Is it systemd?
  • Could you also share the full error message?
@surik commented on GitHub (Oct 16, 2023): Hi @tbc0309 please help me understand the issue by providing more information about the environment you have: - On which version of NetBird are you? - What init system do you use? Is it systemd? - Could you also share the full error message?
Author
Owner

@tbc0309 commented on GitHub (Oct 17, 2023):

NetBird 0.23.9 now ok,add insmod tun.
The synology package beta can downlod from https://github.com/tbc0309/synology-netbird

@tbc0309 commented on GitHub (Oct 17, 2023): NetBird 0.23.9 now ok,add insmod tun. The synology package **beta** can downlod from https://github.com/tbc0309/synology-netbird
Author
Owner

@mlsmaycon commented on GitHub (Oct 17, 2023):

Awesome! Thanks for the contribution @tbc0309. Could you share more details on what was required for the tun device to open?

@mlsmaycon commented on GitHub (Oct 17, 2023): Awesome! Thanks for the contribution @tbc0309. Could you share more details on what was required for the tun device to open?
Author
Owner

@tbc0309 commented on GitHub (Oct 17, 2023):

version
NetBird 0.23.9

system
device: Synology DS920+
system version: DSM7.2.1
Linux 4.4.302+ #69057 SMP Sat Sep 23 21:48:04 CST 2023 x86_64 GNU/Linux synology_geminilake_920+

error log
2023-10-10T14:15:42+08:00 INFO client/cmd/service_controller.go:23: starting Netbird service
2023-10-10T14:15:42+08:00 INFO client/cmd/service_controller.go:63: started daemon server: /var/run/netbird.sock
2023-10-10T14:15:45+08:00 WARN client/internal/wgproxy/factory_linux.go:15: failed to initialize ebpf proxy, fallback to user space proxy: field NbXdpProg: program nb_xdp_prog: map .rodata: map create: read- and write-only maps not supported (requires >= v5.2)
2023-10-10T14:15:45+08:00 INFO iface/module_linux.go:76: couldn't access device /dev/net/tun, go error stat /dev/net/tun: no such file or directory, will attempt to load tun module, if running on container add flag --cap-add=NET_ADMIN
2023-10-10T14:15:45+08:00 ERRO client/internal/engine.go:229: failed creating tunnel interface wt0: [couldn't check or load tun module]
2023-10-10T14:15:45+08:00 INFO client/internal/routemanager/iptables_linux.go:112: done cleaning up iptables rules
2023-10-10T14:15:45+08:00 ERRO client/internal/connect.go:175: error while starting Netbird Connection Engine: couldn't check or load tun module
2023-10-10T14:15:48+08:00 WARN client/internal/wgproxy/factory_linux.go:15: failed to initialize ebpf proxy, fallback to user space proxy: field NbXdpProg: program nb_xdp_prog: map .rodata: map create: read- and write-only maps not supported (requires >= v5.2)
2023-10-10T14:15:48+08:00 INFO iface/module_linux.go:76: couldn't access device /dev/net/tun, go error stat /dev/net/tun: no such file or directory, will attempt to load tun module, if running on container add flag --cap-add=NET_ADMIN
2023-10-10T14:15:48+08:00 ERRO client/internal/engine.go:229: failed creating tunnel interface wt0: [couldn't check or load tun module]
2023-10-10T14:15:48+08:00 INFO client/internal/routemanager/iptables_linux.go:112: done cleaning up iptables rules
2023-10-10T14:15:48+08:00 ERRO client/internal/connect.go:175: error while starting Netbird Connection Engine: couldn't check or load tun module
2023-10-10T14:15:51+08:00 WARN client/internal/wgproxy/factory_linux.go:15: failed to initialize ebpf proxy, fallback to user space proxy: field NbXdpProg: program nb_xdp_prog: map .rodata: map create: read- and write-only maps not supported (requires >= v5.2)
2023-10-10T14:15:51+08:00 INFO iface/module_linux.go:76: couldn't access device /dev/net/tun, go error stat /dev/net/tun: no such file or directory, will attempt to load tun module, if running on container add flag --cap-add=NET_ADMIN
2023-10-10T14:15:51+08:00 ERRO client/internal/engine.go:229: failed creating tunnel interface wt0: [couldn't check or load tun module]
2023-10-10T14:15:51+08:00 ERRO client/internal/routemanager/iptables_linux.go:108: iptables: failed cleaning ipv6 chain NETBIRD-RT-NAT,error: running [/sbin/ip6tables -t nat -S NETBIRD-RT-NAT 1 --wait]: exit status 3: ip6tables v1.8.3 (legacy): can't initialize ip6tables table `nat': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.

insmod tun in package script
Because synology did not insmod tun by default

configure_tun()
{
    log "Checking for TUN device"
    # Create /dev/net/tun if needed
    if ( [ ! -c /dev/net/tun ] ); then
        if ( [ ! -d /dev/net ] ); then
            mkdir -m 755 /dev/net
        fi
        log "Adding TUN device"
        mknod /dev/net/tun c 10 200
        chmod 0755 /dev/net/tun
    fi

    # Load TUN kernel module
    if ( !( lsmod | grep -q "^tun\s" ) ); then
        log "Loading TUN kernel module"
        insmod /lib/modules/tun.ko
    fi
}
@tbc0309 commented on GitHub (Oct 17, 2023): **version** NetBird 0.23.9 **system** device: Synology DS920+ system version: DSM7.2.1 Linux 4.4.302+ #69057 SMP Sat Sep 23 21:48:04 CST 2023 x86_64 GNU/Linux synology_geminilake_920+ **error log** 2023-10-10T14:15:42+08:00 INFO client/cmd/service_controller.go:23: starting Netbird service 2023-10-10T14:15:42+08:00 INFO client/cmd/service_controller.go:63: started daemon server: /var/run/netbird.sock 2023-10-10T14:15:45+08:00 WARN client/internal/wgproxy/factory_linux.go:15: failed to initialize ebpf proxy, fallback to user space proxy: field NbXdpProg: program nb_xdp_prog: map .rodata: map create: read- and write-only maps not supported (requires >= v5.2) 2023-10-10T14:15:45+08:00 INFO iface/module_linux.go:76: couldn't access device /dev/net/tun, go error stat /dev/net/tun: no such file or directory, will attempt to load tun module, if running on container add flag --cap-add=NET_ADMIN 2023-10-10T14:15:45+08:00 ERRO client/internal/engine.go:229: failed creating tunnel interface wt0: [couldn't check or load tun module] 2023-10-10T14:15:45+08:00 INFO client/internal/routemanager/iptables_linux.go:112: done cleaning up iptables rules 2023-10-10T14:15:45+08:00 ERRO client/internal/connect.go:175: error while starting Netbird Connection Engine: couldn't check or load tun module 2023-10-10T14:15:48+08:00 WARN client/internal/wgproxy/factory_linux.go:15: failed to initialize ebpf proxy, fallback to user space proxy: field NbXdpProg: program nb_xdp_prog: map .rodata: map create: read- and write-only maps not supported (requires >= v5.2) 2023-10-10T14:15:48+08:00 INFO iface/module_linux.go:76: couldn't access device /dev/net/tun, go error stat /dev/net/tun: no such file or directory, will attempt to load tun module, if running on container add flag --cap-add=NET_ADMIN 2023-10-10T14:15:48+08:00 ERRO client/internal/engine.go:229: failed creating tunnel interface wt0: [couldn't check or load tun module] 2023-10-10T14:15:48+08:00 INFO client/internal/routemanager/iptables_linux.go:112: done cleaning up iptables rules 2023-10-10T14:15:48+08:00 ERRO client/internal/connect.go:175: error while starting Netbird Connection Engine: couldn't check or load tun module 2023-10-10T14:15:51+08:00 WARN client/internal/wgproxy/factory_linux.go:15: failed to initialize ebpf proxy, fallback to user space proxy: field NbXdpProg: program nb_xdp_prog: map .rodata: map create: read- and write-only maps not supported (requires >= v5.2) 2023-10-10T14:15:51+08:00 INFO iface/module_linux.go:76: couldn't access device /dev/net/tun, go error stat /dev/net/tun: no such file or directory, will attempt to load tun module, if running on container add flag --cap-add=NET_ADMIN 2023-10-10T14:15:51+08:00 ERRO client/internal/engine.go:229: failed creating tunnel interface wt0: [couldn't check or load tun module] 2023-10-10T14:15:51+08:00 ERRO client/internal/routemanager/iptables_linux.go:108: iptables: failed cleaning ipv6 chain NETBIRD-RT-NAT,error: running [/sbin/ip6tables -t nat -S NETBIRD-RT-NAT 1 --wait]: exit status 3: ip6tables v1.8.3 (legacy): can't initialize ip6tables table `nat': Table does not exist (do you need to insmod?) Perhaps ip6tables or your kernel needs to be upgraded. **insmod tun in package script** Because synology did not insmod tun by default configure_tun() { log "Checking for TUN device" # Create /dev/net/tun if needed if ( [ ! -c /dev/net/tun ] ); then if ( [ ! -d /dev/net ] ); then mkdir -m 755 /dev/net fi log "Adding TUN device" mknod /dev/net/tun c 10 200 chmod 0755 /dev/net/tun fi # Load TUN kernel module if ( !( lsmod | grep -q "^tun\s" ) ); then log "Loading TUN kernel module" insmod /lib/modules/tun.ko fi }
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#472