V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
Danswerme
V2EX  ›  问与答

请教大家 ip6tables 的一个写法.

  •  
  •   Danswerme · 2019-09-02 23:32:34 +08:00 · 465 次点击
    这是一个创建于 1929 天前的主题,其中的信息可能已经有所发展或是发生改变。

    大家晚上好!

    局域网有台装了 ssr ipv6 客户端的 ubuntu,经过测试判断 ssr 已经开启成功,因为测试 IP 的 API 返回的 IP 地址显示为 ssr 服务端的 ip.

    curl -6 api6.ipify.org

    目的是让局域网内其他设备可以在访问非大陆 ipv6 地址时全部从 ubuntu 出去,我的 ipv6 局域网网段是 dd78:2534:cd81::/48,在网关上做了 nat.

    在网关上用策略路由将一台 Windows 电脑的非中国大陆 ipv6 流量全部转发到了这台 ubuntu 服务器上,ubuntu 已开启内核 ipv6 转发.

    root@server:~# sysctl -p /etc/sysctl.conf
    
    net.ipv4.ip_forward = 1
    
    net.ipv6.conf.all.forwarding = 1
    
    net.ipv6.conf.default.forwarding = 1
    
    

    为了测试暂时在 ubuntu 上添加了一个 ipset 集合,将 windows 电脑的 ipv6 地址和临时 ipv6 地址都写了进去.

    ipset create device hash:net family inet6
    
    ipset add device dd78:2534:cd81:0:b55e:9821:717b:e0ad
    
    ipset add device dd78:2534:cd81:0:34e2:bcc2:81b6:c911
    

    ubuntu 上 ip6tables 我是这么写的:

    ip6tables -t nat -A PREROUTING -m set -i ens160 --match-set device src -p icmp -j REDIRECT --to-ports 1080
    
    ip6tables -t nat -A PREROUTING -m set -i ens160 --match-set device src -p udp -j REDIRECT --to-ports 1080
    
    ip6tables -t nat -A PREROUTING -m set -i ens160 --match-set device src -p tcp -j REDIRECT --to-ports 1080
    

    写完之后 windows 无法访问非大陆 ipv6 地址,ubuntu 用 tcpdump 抓包发现流量确实已经到了 ubuntu 上,但是没搞明白究竟是哪里的问题导致不通.

    大佬们指点一下究竟是哪里的问题? 稍等我贴个 tcpdump 的记录上来,我是在 ubuntu 开了 tcpdump 之后在 windows 上 ping -6 api6.ipify.org -t

    Danswerme
        1
    Danswerme  
    OP
       2019-09-02 23:37:39 +08:00
    23:23:08.693418 IP6 dd78:2534:cd81:0:fdb5:5eaf:c41a:a02 > dd78:2534:cd81::1: ICMP6, neighbor solicitation, who has dd78:2534:cd81::1, length 32
    23:23:08.693464 IP6 dd78:2534:cd81::1 > dd78:2534:cd81:0:fdb5:5eaf:c41a:a02: ICMP6, neighbor advertisement, tgt is dd78:2534:cd81::1, length 24
    23:23:08.804276 IP6 _gateway > dd78:2534:cd81:0:fdb5:5eaf:c41a:a02: ICMP6, neighbor solicitation, who has dd78:2534:cd81:0:fdb5:5eaf:c41a:a02, length 32
    23:23:08.910554 IP6 fe80::75:da1:8dae:68 > _gateway: ICMP6, neighbor advertisement, tgt is dd78:2534:cd81:0:fdb5:5eaf:c41a:a02, length 24
    23:23:11.363868 IP6 _gateway > dd78:2534:cd81:0:ec0f:b907:e1b:aefe: ICMP6, neighbor solicitation, who has dd78:2534:cd81:0:ec0f:b907:e1b:aefe, length 32
    23:23:11.406981 IP6 dd78:2534:cd81:0:ec0f:b907:e1b:aefe > _gateway: ICMP6, neighbor advertisement, tgt is dd78:2534:cd81:0:ec0f:b907:e1b:aefe, length 32
    23:23:12.251155 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 266, length 40
    23:23:12.251204 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 266, length 40
    23:23:12.251223 IP6 danswerme-ubuntu-server > dd78:2534:cd81::1: ICMP6, redirect, 2607:f2d8:4010:c::2 to _gateway, length 136
    23:23:12.251231 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 266, length 40
    23:23:12.580047 IP6 dd78:2534:cd81:0:dd1f:3428:e9ee:25c5.32379 > dd78:2534:cd81::1.domain: 28807+ AAAA? cmta.yangkeduo.com. (36)
    23:23:12.610527 IP6 dd78:2534:cd81::1.domain > dd78:2534:cd81:0:dd1f:3428:e9ee:25c5.32379: 28807 0/1/0 (109)
    23:23:12.616537 IP6 dd78:2534:cd81:0:dd1f:3428:e9ee:25c5.25546 > dd78:2534:cd81::1.domain: 30859+ A? cmta.yangkeduo.com. (36)
    23:23:12.647081 IP6 dd78:2534:cd81::1.domain > dd78:2534:cd81:0:dd1f:3428:e9ee:25c5.25546: 30859 4/0/0 A 212.129.151.171, A 172.81.217.157, A 172.81.217.13, A 212.129.151.187 (100)
    23:23:12.822537 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61126 > _gateway.5351: UDP, length 64
    23:23:12.822591 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:13.024357 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.53599 > tl-in-xbc.1e100.net.5228: Flags [S], seq 4128565984, win 64800, options [mss 1440,nop,wscale 8,nop,nop,sackOK], length 0
    23:23:13.024360 IP6 dd78:2534:cd81::1.53599 > tl-in-xbc.1e100.net.5228: Flags [S], seq 4128565984, win 64800, options [mss 1440,nop,wscale 8,nop,nop,sackOK], length 0
    23:23:13.024391 IP6 danswerme-ubuntu-server > dd78:2534:cd81::1: ICMP6, redirect, tl-in-xbc.1e100.net to _gateway, length 128
    23:23:13.024402 IP6 dd78:2534:cd81::1.53599 > tl-in-xbc.1e100.net.5228: Flags [S], seq 4128565984, win 64800, options [mss 1440,nop,wscale 8,nop,nop,sackOK], length 0
    23:23:13.749465 IP6 fe80::75:da1:8dae:68 > _gateway: ICMP6, neighbor solicitation, who has _gateway, length 32
    23:23:13.749488 IP6 _gateway > fe80::75:da1:8dae:68: ICMP6, neighbor advertisement, tgt is _gateway, length 24
    23:23:13.823224 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61126 > _gateway.5351: UDP, length 64
    23:23:13.823278 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:14.823831 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61126 > _gateway.5351: UDP, length 64
    23:23:14.823885 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:15.824326 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61128 > _gateway.5351: UDP, length 64
    23:23:15.824404 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:16.788559 IP6 fe80::75:da1:8dae:68.mdns > ff02::fb.mdns: 0 [3q] [1au] PTR (QM)? _companion-link._tcp.local. PTR (QM)? _homekit._tcp.local. PTR (QM)? _sleep-proxy._udp.local. (112)
    23:23:16.824278 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61128 > _gateway.5351: UDP, length 64
    23:23:16.824347 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:17.094925 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 267, length 40
    23:23:17.094949 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 267, length 40
    23:23:17.094967 IP6 danswerme-ubuntu-server > dd78:2534:cd81::1: ICMP6, redirect, 2607:f2d8:4010:c::2 to _gateway, length 136
    23:23:17.094975 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 267, length 40
    23:23:17.298315 IP6 dd78:2534:cd81:0:41a8:8e7:687a:2b40.59125 > 2404:6800:4008:c01::bc.5228: Flags [.], ack 4116381449, win 352, options [nop,nop,TS val 3394704 ecr 903143124], length 0
    23:23:17.402296 IP6 danswerme-ubuntu-server > _gateway: ICMP6, neighbor solicitation, who has _gateway, length 32
    23:23:17.402317 IP6 danswerme-ubuntu-server > dd78:2534:cd81::1: ICMP6, neighbor solicitation, who has dd78:2534:cd81::1, length 32
    23:23:17.402396 IP6 _gateway > danswerme-ubuntu-server: ICMP6, neighbor advertisement, tgt is _gateway, length 24
    23:23:17.402407 IP6 dd78:2534:cd81::1 > danswerme-ubuntu-server: ICMP6, neighbor advertisement, tgt is dd78:2534:cd81::1, length 24
    23:23:17.633528 IP6 fe80::7e03:abff:fe3e:33f4 > dd78:2534:cd81::1: ICMP6, neighbor solicitation, who has dd78:2534:cd81::1, length 32
    23:23:17.633602 IP6 dd78:2534:cd81::1 > fe80::7e03:abff:fe3e:33f4: ICMP6, neighbor advertisement, tgt is dd78:2534:cd81::1, length 24
    23:23:17.734430 IP6 2404:6800:4008:c01::bc.5228 > dd78:2534:cd81:0:41a8:8e7:687a:2b40.59125: Flags [.], ack 1, win 249, options [nop,nop,TS val 903188658 ecr 3390194], length 0 23:23:17.762973 IP6 _gateway > dd78:2534:cd81:0:dd1f:3428:e9ee:25c5: ICMP6, neighbor solicitation, who has dd78:2534:cd81:0:dd1f:3428:e9ee:25c5, length 32
    23:23:17.771116 IP6 dd78:2534:cd81:0:dd1f:3428:e9ee:25c5 > _gateway: ICMP6, neighbor advertisement, tgt is dd78:2534:cd81:0:dd1f:3428:e9ee:25c5, length 24
    23:23:17.824485 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61128 > _gateway.5351: UDP, length 64
    23:23:17.824541 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:18.018931 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, neighbor solicitation, who has dd78:2534:cd81:0:b55e:9821:717b:e0ad, length 32
    23:23:18.019300 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad > _gateway: ICMP6, neighbor advertisement, tgt is dd78:2534:cd81:0:b55e:9821:717b:e0ad, length 32
    23:23:18.786868 IP6 _gateway > fe80::75:da1:8dae:68: ICMP6, neighbor solicitation, who has fe80::75:da1:8dae:68, length 32
    23:23:18.824939 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61129 > _gateway.5351: UDP, length 64
    Danswerme
        2
    Danswerme  
    OP
       2019-09-02 23:39:03 +08:00
    23:23:18.825004 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:18.899748 IP6 fe80::75:da1:8dae:68 > _gateway: ICMP6, neighbor advertisement, tgt is fe80::75:da1:8dae:68, length 24
    23:23:19.824923 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61129 > _gateway.5351: UDP, length 64
    23:23:19.824974 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:20.825070 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61129 > _gateway.5351: UDP, length 64
    23:23:20.825129 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:21.825860 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61130 > _gateway.5351: UDP, length 64
    23:23:21.825936 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:22.094621 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 268, length 40
    23:23:22.094667 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 268, length 40
    23:23:22.094687 IP6 danswerme-ubuntu-server > dd78:2534:cd81::1: ICMP6, redirect, 2607:f2d8:4010:c::2 to _gateway, length 136
    23:23:22.094695 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 268, length 40
    23:23:22.307482 IP6 fe80::4607:bff:fe65:c715 > _gateway: ICMP6, neighbor solicitation, who has _gateway, length 32
    23:23:22.307538 IP6 _gateway > fe80::4607:bff:fe65:c715: ICMP6, neighbor advertisement, tgt is _gateway, length 24
    23:23:22.626315 IP6 _gateway > danswerme-ubuntu-server: ICMP6, neighbor solicitation, who has danswerme-ubuntu-server, length 32
    23:23:22.626333 IP6 danswerme-ubuntu-server > _gateway: ICMP6, neighbor advertisement, tgt is danswerme-ubuntu-server, length 24
    23:23:22.826019 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61130 > _gateway.5351: UDP, length 64
    23:23:22.826023 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:22.882270 IP6 _gateway > dd78:2534:cd81:0:41a8:8e7:687a:2b40: ICMP6, neighbor solicitation, who has dd78:2534:cd81:0:41a8:8e7:687a:2b40, length 32
    23:23:22.882288 IP6 _gateway > fe80::7e03:abff:fe3e:33f4: ICMP6, neighbor solicitation, who has fe80::7e03:abff:fe3e:33f4, length 32
    23:23:22.883183 IP6 dd78:2534:cd81:0:41a8:8e7:687a:2b40 > _gateway: ICMP6, neighbor advertisement, tgt is dd78:2534:cd81:0:41a8:8e7:687a:2b40, length 24
    23:23:23.826043 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61130 > _gateway.5351: UDP, length 64
    23:23:23.826094 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:23.906134 IP6 _gateway > fe80::7e03:abff:fe3e:33f4: ICMP6, neighbor solicitation, who has fe80::7e03:abff:fe3e:33f4, length 32
    23:23:24.061940 IP6 fe80::7e03:abff:fe3e:33f4 > _gateway: ICMP6, neighbor advertisement, tgt is fe80::7e03:abff:fe3e:33f4, length 24
    23:23:24.061953 IP6 fe80::7e03:abff:fe3e:33f4 > _gateway: ICMP6, neighbor solicitation, who has _gateway, length 32
    23:23:24.061964 IP6 fe80::7e03:abff:fe3e:33f4 > _gateway: ICMP6, neighbor advertisement, tgt is fe80::7e03:abff:fe3e:33f4, length 24
    23:23:24.062029 IP6 _gateway > fe80::7e03:abff:fe3e:33f4: ICMP6, neighbor advertisement, tgt is _gateway, length 24
    23:23:24.177135 IP6 dd78:2534:cd81:0:41a8:8e7:687a:2b40.59115 > 2404:6800:4008:c01::bc.5228: Flags [.], ack 2970260853, win 435, options [nop,nop,TS val 3395392 ecr 4120831283], length 0
    23:23:24.613345 IP6 2404:6800:4008:c01::bc.5228 > dd78:2534:cd81:0:41a8:8e7:687a:2b40.59115: Flags [.], ack 1, win 249, options [nop,nop,TS val 4120921850 ecr 3363681], length 0 23:23:24.826575 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61131 > _gateway.5351: UDP, length 64
    23:23:24.826643 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:25.826435 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61131 > _gateway.5351: UDP, length 64
    23:23:25.826462 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:26.826562 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61131 > _gateway.5351: UDP, length 64
    23:23:26.826591 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:27.093337 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 269, length 40
    23:23:27.093341 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 269, length 40
    23:23:27.093359 IP6 danswerme-ubuntu-server > dd78:2534:cd81::1: ICMP6, redirect, 2607:f2d8:4010:c::2 to _gateway, length 136
    23:23:27.093368 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 269, length 40
    23:23:27.233703 IP6 _gateway > danswerme-ubuntu-server: ICMP6, neighbor solicitation, who has danswerme-ubuntu-server, length 32
    23:23:27.233723 IP6 danswerme-ubuntu-server > _gateway: ICMP6, neighbor advertisement, tgt is danswerme-ubuntu-server, length 24
    23:23:27.489656 IP6 _gateway > fe80::4607:bff:fe65:c715: ICMP6, neighbor solicitation, who has fe80::4607:bff:fe65:c715, length 32
    23:23:27.491051 IP6 fe80::4607:bff:fe65:c715 > _gateway: ICMP6, neighbor advertisement, tgt is fe80::4607:bff:fe65:c715, length 24
    23:23:27.827355 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61132 > _gateway.5351: UDP, length 64
    23:23:27.827452 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:28.827279 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61132 > _gateway.5351: UDP, length 64
    23:23:28.827345 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:29.827906 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61132 > _gateway.5351: UDP, length 64
    23:23:29.827999 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:30.591090 IP6 fe80::b55e:9821:717b:e0ad > _gateway: ICMP6, neighbor solicitation, who has _gateway, length 32
    23:23:30.591143 IP6 _gateway > fe80::b55e:9821:717b:e0ad: ICMP6, neighbor advertisement, tgt is _gateway, length 24
    23:23:30.828568 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61135 > _gateway.5351: UDP, length 64
    23:23:30.828629 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:31.828678 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61135 > _gateway.5351: UDP, length 64
    23:23:31.828769 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:32.096258 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 270, length 40
    23:23:32.096309 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 270, length 40
    23:23:32.096327 IP6 danswerme-ubuntu-server > dd78:2534:cd81::1: ICMP6, redirect, 2607:f2d8:4010:c::2 to _gateway, length 136
    23:23:32.096335 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 270, length 40
    23:23:32.829064 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61135 > _gateway.5351: UDP, length 64
    23:23:32.829132 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:33.829580 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61137 > _gateway.5351: UDP, length 64
    23:23:33.829662 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:34.829041 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61137 > _gateway.5351: UDP, length 64
    23:23:34.829107 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:35.680553 IP6 _gateway > fe80::b55e:9821:717b:e0ad: ICMP6, neighbor solicitation, who has fe80::b55e:9821:717b:e0ad, length 32
    23:23:35.680796 IP6 fe80::b55e:9821:717b:e0ad > _gateway: ICMP6, neighbor advertisement, tgt is fe80::b55e:9821:717b:e0ad, length 32
    23:23:35.829919 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad.61137 > _gateway.5351: UDP, length 64
    23:23:35.830009 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:36.830936 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.61139 > _gateway.5351: UDP, length 64
    Danswerme
        3
    Danswerme  
    OP
       2019-09-02 23:39:16 +08:00
    23:23:36.830996 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:37.092760 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 271, length 40
    23:23:37.092790 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 271, length 40
    23:23:37.092809 IP6 danswerme-ubuntu-server > dd78:2534:cd81::1: ICMP6, redirect, 2607:f2d8:4010:c::2 to _gateway, length 136
    23:23:37.092817 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 271, length 40
    23:23:37.830730 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.61139 > _gateway.5351: UDP, length 64
    23:23:37.830788 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:38.831546 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.61139 > _gateway.5351: UDP, length 64
    23:23:38.831603 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:39.832248 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.61141 > _gateway.5351: UDP, length 64
    23:23:39.832314 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:40.832320 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.61141 > _gateway.5351: UDP, length 64
    23:23:40.832381 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:41.055855 IP6 _gateway > dd78:2534:cd81:0:b55e:9821:717b:e0ad: ICMP6, neighbor solicitation, who has dd78:2534:cd81:0:b55e:9821:717b:e0ad, length 32
    23:23:41.056137 IP6 dd78:2534:cd81:0:b55e:9821:717b:e0ad > _gateway: ICMP6, neighbor advertisement, tgt is dd78:2534:cd81:0:b55e:9821:717b:e0ad, length 32
    23:23:41.832623 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.61141 > _gateway.5351: UDP, length 64
    23:23:41.832689 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:42.079721 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, neighbor solicitation, who has dd78:2534:cd81:0:34e2:bcc2:81b6:c911, length 32
    23:23:42.080004 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911 > _gateway: ICMP6, neighbor advertisement, tgt is dd78:2534:cd81:0:34e2:bcc2:81b6:c911, length 32
    23:23:42.092426 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 272, length 40
    23:23:42.092449 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 272, length 40
    23:23:42.092477 IP6 danswerme-ubuntu-server > dd78:2534:cd81::1: ICMP6, redirect, 2607:f2d8:4010:c::2 to _gateway, length 136
    23:23:42.092485 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 272, length 40
    23:23:42.833701 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.61143 > _gateway.5351: UDP, length 64
    23:23:42.833769 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:43.833075 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.61143 > _gateway.5351: UDP, length 64
    23:23:43.833124 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:44.833481 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.61143 > _gateway.5351: UDP, length 64
    23:23:44.833550 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:45.834239 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.61145 > _gateway.5351: UDP, length 64
    23:23:45.834295 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:46.833871 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.61145 > _gateway.5351: UDP, length 64
    23:23:46.833921 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:47.093377 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 273, length 40
    23:23:47.093417 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 273, length 40
    23:23:47.093436 IP6 danswerme-ubuntu-server > dd78:2534:cd81::1: ICMP6, redirect, 2607:f2d8:4010:c::2 to _gateway, length 136
    23:23:47.093445 IP6 dd78:2534:cd81::1 > 2607:f2d8:4010:c::2: ICMP6, echo request, seq 273, length 40
    23:23:47.833766 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.61145 > _gateway.5351: UDP, length 64
    23:23:47.833835 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:48.834212 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.61147 > _gateway.5351: UDP, length 64
    23:23:48.834278 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    23:23:49.834231 IP6 dd78:2534:cd81:0:34e2:bcc2:81b6:c911.61147 > _gateway.5351: UDP, length 64
    23:23:49.834292 IP6 _gateway > dd78:2534:cd81:0:34e2:bcc2:81b6:c911: ICMP6, destination unreachable, unreachable port, _gateway udp port 5351, length 120
    Buges
        4
    Buges  
       2019-09-02 23:44:30 +08:00 via Android
    首先 ss 不能转发 icmp 吧。
    然后你得确定你用的是 ss-redir,而不是 ss-local 的 socks5 代理。
    最后 tcp 用 redirect,udp 用 tproxy。
    以及可能还会有 v6 方面兼容性的坑。
    Danswerme
        5
    Danswerme  
    OP
       2019-09-02 23:51:08 +08:00 via Android
    @Buges 谢谢大佬指点!我才发现我端口写错了,写的是 ss-local 的端口! 我去看看这个 tproxy
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   953 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 23:41 · PVG 07:41 · LAX 15:41 · JFK 18:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.