Closed charley008 closed 2 years ago
7.1应该没问题,这里有成功案例 https://github.com/sjtuross/syno-iptables/issues/11#issuecomment-1098638162
提供uname -a
和iptables -V
系统信息,以及你认为不行的相关信息
iptables v1.8.3 (legacy) Linux NAS 4.4.180+ #42661 SMP Fri Apr 1 15:33:03 CST 2022 x86_64 GNU/Linux synology_geminilake_920+ docker 管理界面 网络 bridge ipv6 还是显示禁用.
22/04/25 16:27:37 stop Docker 20.10.3-1305 Begin start-stop-status stop [pkg-Docker-termd] stopped. WARNING: Error loading config file: .dockercfg: $HOME is not defined CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES WARNING: Error loading config file: .dockercfg: $HOME is not defined [pkg-Docker-dockerd] stopped. rm: cannot remove '': No such file or directory rm: cannot remove '': No such file or directory rm: cannot remove '': No such file or directory rm: cannot remove '': No such file or directory rm: cannot remove '': No such file or directory rm: cannot remove '': No such file or directory rm: cannot remove '': No such file or directory iptables: Bad rule (does a matching rule exist in that chain?). iptables: Too many links. PHP Warning: PHP Startup: Unable to load dynamic library 'json.so' (tried: /usr/lib/php/modules/json.so (/usr/lib/php/modules/json.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/json.so.so (/usr/lib/php/modules/json.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'json.so' (tried: /usr/lib/php/modules/json.so (/usr/lib/php/modules/json.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/json.so.so (/usr/lib/php/modules/json.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 2022/04/25 16:27:39 stop Docker 20.10.3-1305 End start-stop-status stop ret=[0] 2022/04/25 16:27:42 start Docker 20.10.3-1305 Begin start-stop-status start insmod: ERROR: could not insert module /lib/modules/nf_nat_ipv6.ko: File exists insmod: ERROR: could not insert module /lib/modules/nf_nat_masquerade_ipv6.ko: File exists insmod: ERROR: could not insert module /lib/modules/ip6t_MASQUERADE.ko: File exists insmod: ERROR: could not insert module /lib/modules/ip6table_nat.ko: File exists insmod: ERROR: could not insert module /lib/modules/ip6table_raw.ko: File exists insmod: ERROR: could not insert module /lib/modules/ip6table_mangle.ko: File exists Mon Apr 25 16:27:42 CST 2022: start_docker_daemon: try start docker daemon Mon Apr 25 16:27:42 CST 2022: start_docker_daemon: start daemon.. [pkg-Docker-dockerd] started. Mon Apr 25 16:27:44 CST 2022: start_docker_daemon: daemon started. start to wait for daemon ready Mon Apr 25 16:27:44 CST 2022: start_docker_daemon: daemon is ready [pkg-Docker-termd] started. PHP Warning: PHP Startup: Unable to load dynamic library 'json.so' (tried: /usr/lib/php/modules/json.so (/usr/lib/php/modules/json.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/json.so.so (/usr/lib/php/modules/json.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'json.so' (tried: /usr/lib/php/modules/json.so (/usr/lib/php/modules/json.so: cannot open shared object file: No such file or directory), /usr/lib/php/modules/json.so.so (/usr/lib/php/modules/json.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 2022/04/25 16:27:44 start Docker 20.10.3-1305 End start-stop-status start ret=[0]
root@NAS:/var/log# lsmod | grep ip6 ip6table_mangle 1724 0 ip6table_raw 1280 0 ip6table_nat 1600 1 ip6t_MASQUERADE 1088 0 nf_nat_masquerade_ipv6 1812 1 ip6t_MASQUERADE nf_nat_ipv6 4515 1 ip6table_nat ip6table_filter 1596 1 ip6_tables 14377 4 ip6table_filter,ip6table_mangle,ip6table_nat,ip6table_raw x_tables 16976 22 ip6table_filter,xt_ipvs,xt_iprange,xt_mark,ip6table_mangle,xt_recent,ip_tables,xt_tcpudp,ipt_MASQUERADE,ip6t_MASQUERADE,xt_limit,xt_state,xt_conntrack,xt_LOG,xt_nat,xt_multiport,iptable_filter,ip6table_raw,xt_REDIRECT,iptable_mangle,ip6_tables,xt_addrtype ipv6 316762 214 sit,ip_vs,ip6table_mangle,nf_defrag_ipv6,nf_nat_ipv6,nf_nat_masquerade_ipv6,nf_conntrack_ipv6
ko模块都已加载,docker也启动成功了,虽然有些warning,但都是不相关的
你的问题是说ipv6没生效,把/var/packages/Docker/etc/dockerd.json
贴出来看看
admin@NAS:/var/packages/Docker/etc$ cat dockerd.json { "data-root" : "/var/packages/Docker/var/docker", "experimental" : true, "fixed-cidr-v6" : "fd07::/64", "ip6tables" : true, "log-driver" : "db", "registry-mirrors" : [], "storage-driver" : "btrfs" }
....好像少了一项。 ipv6 我多次重试,发现了 明明添加了"ipv6": true, 重启synopkg restart Docker 后就又不见了
# install modules
$DockerUpdaterBin postinst updatedockerdconf "$(get_install_volume_type)"
start-stop-status对比7.0的版本 多了这段。 我注释掉的话 就正常了,然后就是 网络管理那里一片空白, admin@NAS:/var/packages/Docker/scripts$ sudo docker network ls NETWORK ID NAME DRIVER SCOPE e37e3f722928 bridge bridge local 1c0ee63a8cbc host host local c2dd43897503 none null local 已经添加了docker用户组
用下面这行命令在启动前把ipv6配置补回来,就在你定位到的位置之后,具体看下更新过的Wiki,https://github.com/sjtuross/syno-iptables/wiki/原生Docker-IPv6-NAT模式-(DSM-7)
cat /var/packages/Docker/etc/dockerd.json | jq '. + {ipv6: true}' > /var/packages/Docker/etc/dockerd.json2; mv -f /var/packages/Docker/etc/dockerd.json{2,}
非常感谢,已经解决了。
之前用你这方法在dsm7.0 上运行正常,前几天升级7.1后 按步骤重新来一遍 发现不行了