Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocked 1.1.1.1 cloud flare app #1104

Open
sphinxir opened this issue Apr 20, 2020 · 2 comments
Open

Blocked 1.1.1.1 cloud flare app #1104

sphinxir opened this issue Apr 20, 2020 · 2 comments
Labels

Comments

@sphinxir
Copy link

Hello
I am installing afwall and 1.1.1.1 cloud flare app on my device.
When I want to use 1.1.1.1, I have to disable the firewall and re-enable it after connecting 1.1.1.1. How can I solve the problem?

@sphinxir sphinxir reopened this Apr 21, 2020
@Jacekalex
Copy link

Jacekalex commented Apr 26, 2020

I solved it this way:

# root ~:# ssh smartphone cat /data/etc/adfw.sh
#!/system/bin/sh

# CloudFlare DNS over TLS:
/system/bin/iptables  -I afwall -d 1.0.0.1 -p tcp --dport 853 -j ACCEPT
/system/bin/iptables  -I afwall -d 1.1.1.1 -p tcp --dport 853 -j ACCEPT
/system/bin/iptables  -I afwall-input  -s 1.0.0.1 -p tcp --sport 853 -j ACCEPT
/system/bin/iptables  -I afwall-input  -s 1.1.1.1 -p tcp --sport 853 -j ACCEPT

#SSH ipv4 lan:
/system/bin/iptables -I afwall-input  -s 192.168.1.10 -p tcp --dport 11689 -j ACCEPT
/system/bin/iptables -I afwall -d 192.168.1.10  -j ACCEPT

#IPv6 SLAAC:
/system/bin/ip6tables  -I afwall -d fe80::/10  -p ipv6-icmp -j ACCEPT
/system/bin/ip6tables  -I afwall-input -s fe80::/10  -p ipv6-icmp -j ACCEPT

#SSH ipv6 local:
/system/bin/ip6tables  -I afwall-input -s fe80::/10  -p tcp --dport 11689 -j ACCEPT

I then added a custom script to afwall to make it execute after each loading of the rules.
SSH is a secure connection between my computer (Linux) and phone (Android).
https://en.wikipedia.org/wiki/OpenSSH

On Android I have an SSHD server running through the Magisk SSH module.

Cheers

@sphinxir
Copy link
Author

sphinxir commented Apr 26, 2020

Hi
Tanks for your answer.
Do I need to enable ssh?
What software do I use to create the sh file?
I install notepad++ and create a new file in source "system/bin" and copy your rules in to file.
When set source in custom script and apply ,afwall not enabled.
Plz hlep
@Jacekalex

@ukanth ukanth added the Review label Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants