1 Introduction
In the 12.0 system rom customization development, in order to limit the system's Internet access function, in the product development of the netd network in the system, it will be required to set the function of shielding the ip address. The iptables command in liunx is also more important
. Next, let’s implement the related functions of creating subchains in IOemNetd
2. The system restricts the core class of the iptables of the Internet access system to use IOemNetd to realize the function of creating a subchain
system\netd\server\binder\com\android\internal\net\IOemNetd.aidl
system\netd\server\OemNetdListener.cpp
system\netd\server\OemNetdListener.h
3. The system restricts the core function analysis and realization of the iptables of the system to use IOemNetd to realize the realization of the function of creating a sub-chain
In the android native system, iptables is very important in the network filtering packet module. Iptabels is a packet filtering firewall system integrated with the Linux kernel. Both linux and android include the function of Iptables.
Iptables facilitate better control of IP packet filtering and firewall configuration on a Linux system if the Linux system is connected to the Internet or a LAN, a server, or a proxy server that connects the LAN to the Internet.
Another important advantage of netfilter/iptables is that it gives the user complete control over firewall configuration and packet filtering. You can customize your own rules to meet your specific needs
The commonly used commands of iptables are as follows:
Command Description
-L --list <chain name> View iptables rule list
-A --append <chain name> Add a rule at the end of the rule list
-I