QC

Convert nf_tables to iptables (legacy) of synology container

iptables -t nat -I POSTROUTING 1 -s 10.0.0.1/24 -o eth0 -j MASQUERADE Warning: Extension MASQUERADE revision 0 not supported, missing kernel module? iptables v1.8.11 (nf_tables): Could not fetch rule set generation id: Invalid argument


How to convert nf_tables to iptables lecagy in docker

When installing the WireGuard kernel on Synology 7.x, since there is no official kernel for WireGuard, it’s necessary to install wg from the internet. wgDashboard is one option to consider. However, because nf_tables is used by default for Docker containers, any commands related to PostUp or PreUp will not work with nf_tables.



Solution to change nf_tables to iptables legacy


Enter docker that we need to change using command: 
sudo docker exec -it wgdashboard /bin/bashcode-box


Next: 
apk add iptables-legacycode-box


Next:
ln -sf /usr/sbin/iptables-legacy /usr/sbin/iptablescode-box


Check and verify:

iptables --versioncode-box


Done, Now you can run some thing like: iptables -t nat -I POSTROUTING 1 -s 10.0.0.1/24 -o eth0 -j MASQUERADEcode-box

Post a Comment

Previous Post Next Post