Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create interactive firewall app in Android

I want create firewall app for Android that when an app wants to connect to internet shows app's name and let the user block it for permanent or block it temporarily or allow it and when that app wants to receive data from network shows app name and user can allow or deny it.

I viewed this question: create firewall, but it doesn't cover my needs.

Any suggestion to detect which apps have access to network and / or receive data from it?

Thanks!

like image 814
Troy Avatar asked Apr 25 '15 10:04

Troy


People also ask

Can I put a firewall on my Android phone?

Installing a firewall app on your device can also improve network traffic management, increase browsing speed, and provide better security. It works great alongside many of the other security apps available on Android.

How does NetGuard app work?

NetGuard, by default, allows all traffic to prevent hard to find problems. You need to selectively block traffic yourself by tapping on the mobile or Wi-Fi icons. Be aware that NetGuard will allow traffic to an application when the screen is on and the condition 'when screen on' is enabled.

Is NetGuard open source?

NetGuard is the first free and open source no-root firewall for Android. Features: Simple to use. No root required.

Is firewall an app?

A firewall is part hardware and part software, and the combination of each makes a huge difference. In this section, we will look at the differences between an appliance-based firewall and a standard operating system (OS) running a firewall as an application.


1 Answers

This is quite possible, and has been done before.
See these applications/implementations:

  • https://github.com/ukanth/afwall
  • https://code.google.com/p/iptableslog/
  • https://code.google.com/p/droidwall/
  • https://github.com/n8fr8/orbot
  • https://github.com/Soyokaze99/VPNFirewall

Depending on implementation it may require your device to be rooted.

Universal, non-ROOT, way is to create custom VPN service and track connections using NFLOG/ULOG kernel-userspace module.

See other QAs for reference:

  • Building a firewall application
  • https://android.stackexchange.com/questions/34181/droidwall-firewall-app-alternative-for-non-rooted-phones
  • https://android.stackexchange.com/questions/37067/allow-only-specific-apps-to-use-cell-data-only-when-on-3g
like image 137
Marek Sebera Avatar answered Sep 24 '22 02:09

Marek Sebera