zsh2517

Untitled

Apr 30th, 2025
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.50 KB | None | 0 0
  1. root@ali-lite-bj-speed ~# cat up
  2. table inet filter {
  3. chain input {
  4. type filter hook input priority filter; policy accept;
  5. }
  6.  
  7. chain forward {
  8. type filter hook forward priority filter; policy accept;
  9. }
  10.  
  11. chain output {
  12. type filter hook output priority filter; policy accept;
  13. }
  14. }
  15. table ip filter {
  16. chain ts-input {
  17. ip saddr 100.122.207.24 iifname "lo" counter packets 0 bytes 0 accept
  18. ip saddr 100.115.92.0/23 iifname != "tailscale0" counter packets 0 bytes 0 return
  19. ip saddr 100.64.0.0/10 iifname != "tailscale0" counter packets 138 bytes 12784 drop
  20. iifname "tailscale0" counter packets 0 bytes 0 accept
  21. udp dport 44817 counter packets 76 bytes 4560 accept
  22. }
  23.  
  24. chain ts-forward {
  25. iifname "tailscale0" counter packets 0 bytes 0 xt target "MARK"
  26. meta mark & 0x00ff0000 == 0x00040000 counter packets 0 bytes 0 accept
  27. ip saddr 100.64.0.0/10 oifname "tailscale0" counter packets 0 bytes 0 drop
  28. oifname "tailscale0" counter packets 0 bytes 0 accept
  29. }
  30.  
  31. chain INPUT {
  32. type filter hook input priority filter; policy accept;
  33. counter packets 690 bytes 60057 jump ts-input
  34. }
  35.  
  36. chain FORWARD {
  37. type filter hook forward priority filter; policy accept;
  38. counter packets 0 bytes 0 jump ts-forward
  39. }
  40. }
  41. table ip nat {
  42. chain ts-postrouting {
  43. meta mark & 0x00ff0000 == 0x00040000 counter packets 0 bytes 0 xt target "MASQUERADE"
  44. }
  45.  
  46. chain POSTROUTING {
  47. type nat hook postrouting priority srcnat; policy accept;
  48. counter packets 207 bytes 17708 jump ts-postrouting
  49. }
  50. }
  51. table ip6 filter {
  52. chain ts-input {
  53. ip6 saddr fd7a:115c:a1e0::2601:cf18 iifname "lo" counter packets 0 bytes 0 accept
  54. iifname "tailscale0" counter packets 0 bytes 0 accept
  55. udp dport 47102 counter packets 0 bytes 0 accept
  56. }
  57.  
  58. chain ts-forward {
  59. iifname "tailscale0" counter packets 0 bytes 0 xt target "MARK"
  60. meta mark & 0x00ff0000 == 0x00040000 counter packets 0 bytes 0 accept
  61. oifname "tailscale0" counter packets 0 bytes 0 accept
  62. }
  63.  
  64. chain INPUT {
  65. type filter hook input priority filter; policy accept;
  66. counter packets 0 bytes 0 jump ts-input
  67. }
  68.  
  69. chain FORWARD {
  70. type filter hook forward priority filter; policy accept;
  71. counter packets 0 bytes 0 jump ts-forward
  72. }
  73. }
  74. table ip6 nat {
  75. chain ts-postrouting {
  76. meta mark & 0x00ff0000 == 0x00040000 counter packets 0 bytes 0 xt target "MASQUERADE"
  77. }
  78.  
  79. chain POSTROUTING {
  80. type nat hook postrouting priority srcnat; policy accept;
  81. counter packets 0 bytes 0 jump ts-postrouting
  82. }
  83. }
  84. root@ali-lite-bj-speed ~# cat down
  85. table inet filter {
  86. chain input {
  87. type filter hook input priority filter; policy accept;
  88. }
  89.  
  90. chain forward {
  91. type filter hook forward priority filter; policy accept;
  92. }
  93.  
  94. chain output {
  95. type filter hook output priority filter; policy accept;
  96. }
  97. }
  98. table ip filter {
  99. chain INPUT {
  100. type filter hook input priority filter; policy accept;
  101. }
  102.  
  103. chain FORWARD {
  104. type filter hook forward priority filter; policy accept;
  105. }
  106. }
  107. table ip nat {
  108. chain POSTROUTING {
  109. type nat hook postrouting priority srcnat; policy accept;
  110. }
  111. }
  112. table ip6 filter {
  113. chain INPUT {
  114. type filter hook input priority filter; policy accept;
  115. }
  116.  
  117. chain FORWARD {
  118. type filter hook forward priority filter; policy accept;
  119. }
  120. }
  121. table ip6 nat {
  122. chain POSTROUTING {
  123. type nat hook postrouting priority srcnat; policy accept;
  124. }
  125. }
  126. root@ali-lite-bj-speed ~#
Advertisement
Add Comment
Please, Sign In to add comment