Reputation: 1179
I want to block all incoming connections with iptables
on my android device. I know that Google apps, like play store, etc. Need some incoming connections (f.e. for GTalkSerivice) and they will be not running after blocking. But I want just use my browser and so I know browser doesn't need incoming connections. So I tried to block all incoming connections with:
iptables -A INPUT --j DROP
The problem is now, that all of connections are blocked and my browser is also off-line. Why is it so?
Upvotes: 1
Views: 3153
Reputation: 52936
The thing is, iptables doesn't block connections, but packets. What you've done is block all incoming packets, so it's normal that you get no response. You need to add something like this to let packets form already established connections (ones you have initiated by opening a web page, etc.) through:
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
Blocking all incoming connections will break a lot of things so use with caution.
Upvotes: 2