github.com/Asutorufa/yuhaiin@v0.3.6-0.20240502055049-7984da7023a0/scripts/iptables/redirect (about)

     1  #!/bin/bash
     2  
     3  iptables -t nat -N yuhaiin
     4  
     5  iptables -t nat -A yuhaiin -m cgroup --path "user.slice/user-1000.slice/user@1000.service/yuhaiin.slice" -j RETURN
     6  iptables -t nat -A yuhaiin -d 0.0.0.0/8 -j RETURN
     7  iptables -t nat -A yuhaiin -d 127.0.0.0/8 -j RETURN
     8  iptables -t nat -A yuhaiin -d 10.0.0.0/8 -j RETURN
     9  iptables -t nat -A yuhaiin -d 169.254.0.0/16 -j RETURN
    10  iptables -t nat -A yuhaiin -d 172.16.0.0/12 -j RETURN
    11  iptables -t nat -A yuhaiin -d 192.168.0.0/16 -j RETURN
    12  iptables -t nat -A yuhaiin -d 224.0.0.0/4 -j RETURN
    13  iptables -t nat -A yuhaiin -d 240.0.0.0/4 -j RETURN
    14  iptables -t nat -A yuhaiin -p tcp -j REDIRECT --to-ports 8088
    15  iptables -t nat -A OUTPUT -p tcp -j yuhaiin