Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Is there a way to use the files hosts.allow and hosts.deny in Android? I've searched over the internet but found nothing. I have to control access of both wifi and mobile networks. And limit the access to a certain domain. Just like a firewall do. I've tried to insert some iptables commands, but the system became very slow after these commands. Thanks in advance.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

As far as I know, Android isn't setup to use hosts.allow and hosts.deny

However, it is setup to use a standard hosts file in /system/etc/hosts

Unfortunately, it doesn't support wildcards, so it might be difficult to limit the device to a single domain via that method.

iptables probably are your best bet - perhaps you could post the rules you attempted, and I can see if there's anything that could be causing them to run too slow?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.