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

custom scripts #79

Closed
bugficks opened this issue Dec 8, 2012 · 4 comments
Closed

custom scripts #79

bugficks opened this issue Dec 8, 2012 · 4 comments

Comments

@bugficks
Copy link

bugficks commented Dec 8, 2012

Hi, I'm having problems getting custom scripts to work.
I've placed 2 scripts in /data/data/dev.ukanth.ufirewall/scripts
enable.sh:
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT

and shutdown script disable.sh:
$IPTABLES -P INPUT DROP
$IPTABLES -P OUTPUT DROP
$IPTABLES -P FORWARD DROP

fwiw, I've also have an init.d script:
/etc/init.d/00iptables

!/system/bin/sh

IPTABLES=/system/bin/iptables
$IPTABLES -F
$IPTABLES -P INPUT DROP
$IPTABLES -P OUTPUT DROP
$IPTABLES -P FORWARD DROP

this setup worked great in droidwall but with AFWall rules just doesn't seem to get applied, nothing fancy in logcat neither. tried it w/ cm7 and stock rooted ics 4.0.4 for I9100. On ICS rom it even freezes/crashes AFWall.

@ukanth
Copy link
Owner

ukanth commented Dec 8, 2012

Yes. I'll look into it.

@ukanth
Copy link
Owner

ukanth commented Dec 8, 2012

This will be fixed in the next version. Meanwhile you can use like below.

Instead of storing the rule in sh file, directly put them on the text box !

$IPTABLES -P INPUT ACCEPT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT

shutdown
$IPTABLES -P INPUT DROP
$IPTABLES -P OUTPUT DROP
$IPTABLES -P FORWARD DROP

and you don't need the init.d script. I fixed the data leak in AFWall+ ( which was the bug in DroidWall )

Thanks,
Umakanth

@bugficks
Copy link
Author

Unfortuantely this only works for the custom script box but not for shutdown box. Waiting for next release:)

@ukanth
Copy link
Owner

ukanth commented Dec 11, 2012

Yes. That's fixed and will be available in the next version(shhtdown). But support for custom scripts (.sh) files can't be supported. You have to use the textbox instead. But i'll try to implement that in another form.

Sorry about it.

@ukanth ukanth closed this as completed Dec 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants