Giter VIP home page Giter VIP logo

Comments (5)

Adlyq avatar Adlyq commented on August 15, 2024

@yourxx 这不是很合理吗

from mihomo.

MarksonHon avatar MarksonHon commented on August 15, 2024

@yourxx 你枪杀进程,进程哪还能帮你清除防火墙规则

from mihomo.

vj23456 avatar vj23456 commented on August 15, 2024

@MarksonHon 你把我杀死了,我还要负责把自己埋了

from mihomo.

 avatar commented on August 15, 2024

清除得不是很彻底,有时又彻底,残留的规则也经常不一样。

root@ubuntu-desktop:~# systemctl stop clash
root@ubuntu-desktop:~# systemctl start clash
root@ubuntu-desktop:~# systemctl stop clash
root@ubuntu-desktop:~# iptables-save
# Generated by iptables-save v1.8.4 on Tue Apr 19 13:30:14 2022
*nat
:PREROUTING ACCEPT [2:368]
:INPUT ACCEPT [2:368]
:OUTPUT ACCEPT [2:135]
:POSTROUTING ACCEPT [2:135]
:clash_dns_output - [0:0]
-A PREROUTING ! -s 172.17.0.0/16 ! -d 127.0.0.0/8 -p udp -m udp --dport 53 -j REDIRECT --to-ports 1053
-A PREROUTING ! -s 172.17.0.0/16 ! -d 127.0.0.0/8 -p tcp -m tcp --dport 53 -j REDIRECT --to-ports 1053
-A OUTPUT -p udp -m udp --dport 53 -j clash_dns_output
-A OUTPUT -p tcp -m tcp --dport 53 -j clash_dns_output
-A POSTROUTING -o ens160 -m addrtype ! --src-type LOCAL -j MASQUERADE
COMMIT
# Completed on Tue Apr 19 13:30:14 2022
# Generated by iptables-save v1.8.4 on Tue Apr 19 13:30:14 2022
*mangle
:PREROUTING ACCEPT [35:2775]
:INPUT ACCEPT [35:2775]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [28:3516]
:POSTROUTING ACCEPT [28:3516]
:clash_output - [0:0]
:clash_prerouting - [0:0]
-A PREROUTING -j clash_prerouting
-A OUTPUT -o ens160 -j clash_output
COMMIT
# Completed on Tue Apr 19 13:30:14 2022
# Generated by iptables-save v1.8.4 on Tue Apr 19 13:30:14 2022
*filter
:INPUT ACCEPT [35:2775]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [29:3988]
-A FORWARD -o ens160 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -o ens160 -j ACCEPT
-A FORWARD -i ens160 ! -o ens160 -j ACCEPT
-A FORWARD -i ens160 -o ens160 -j ACCEPT
COMMIT
# Completed on Tue Apr 19 13:30:14 2022

from mihomo.

 avatar commented on August 15, 2024

...
interface-name: ens160 这行可以不写,程序会自动识别。
iptables:
enable: true
inbound-interface: ens160 这行必须要写。
...

在不写 inbound-interface 的时候也可以自动识别就方便多了。

from mihomo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.