1

Is there a way I could block a specific network port connection for a specific app in Android? My phone is rooted. I know iptables -I OUTPUT -p tcp --dport xx -j DROP but this blocks those ports for every app. I want to block it for a single app.

0

1 Answer 1

1

You can block all TCP traffic from app with UID 10142, destined for port 53:

~# iptables -I OUTPUT -m owner --uid-owner 10142 -p tcp --dport 53 -j DROP

Change UID and port as per your needs.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .