CN106162594B - WIFI hotspot traffic statistical method and system based on IPtables - Google Patents

WIFI hotspot traffic statistical method and system based on IPtables Download PDF

Info

Publication number
CN106162594B
CN106162594B CN201510186672.0A CN201510186672A CN106162594B CN 106162594 B CN106162594 B CN 106162594B CN 201510186672 A CN201510186672 A CN 201510186672A CN 106162594 B CN106162594 B CN 106162594B
Authority
CN
China
Prior art keywords
wifi hotspot
client
iptables
traffic
intelligent terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510186672.0A
Other languages
Chinese (zh)
Other versions
CN106162594A (en
Inventor
崔艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Corp
Original Assignee
TCL Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TCL Corp filed Critical TCL Corp
Priority to CN201510186672.0A priority Critical patent/CN106162594B/en
Publication of CN106162594A publication Critical patent/CN106162594A/en
Application granted granted Critical
Publication of CN106162594B publication Critical patent/CN106162594B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/24Accounting or billing

Abstract

The invention discloses a WIFI hotspot flow statistical method and system based on IPtables, wherein a configuration file of an IPtables rule is configured on a system user layer of an intelligent terminal by starting a WIFI hotspot of the intelligent terminal; detecting whether a client is connected to the WIFI hotspot or not, and if so, acquiring an IP address of the client; calling a configuration file of an IPtables rule, setting the IPtables rule for the obtained IP address of the client, counting the data volume sent and received by the IP address of the client through the WIFI hotspot according to the IPtables rule, and adding the data volume sent and received by the client to obtain corresponding flow data; displaying the flow data on the intelligent terminal; the intelligent terminal can count the flow shared by the WIFI hotspots in real time, the flow shared by the WIFI hotspots of the intelligent terminal is visually displayed, the phenomenon that the flow shared by the intelligent terminal is excessive is avoided, and great convenience is brought to a user.

Description

WIFI hotspot traffic statistical method and system based on IPtables
Technical Field
The invention relates to the technical field of intelligent terminal WIFI hotspots, in particular to a WIFI hotspot flow statistical method and system based on IPtables.
Background
With the continuous development of the intelligent terminal technology, the use of intelligent terminals such as mobile phones and tablet computers is more and more popular. The intelligent terminals have the WIFI hotspot function, and other intelligent terminals can be connected with the WIFI hotspot to surf the internet. The intelligent terminal is used for surfing the internet anytime and anywhere, and is part of daily life, and the intelligent terminal can be fully utilized through WIFI hotspot traffic sharing based on the intelligent terminal. However, the existing intelligent terminal cannot count the flow shared by the WIFI hotspots, hidden danger is buried for the WIFI hotspot flow sharing, the shared flow cannot be counted in real time, and excessive sharing is caused, so that additional expenses are caused to users.
Accordingly, the prior art is yet to be improved and developed.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a WIFI hotspot traffic statistical method and system based on IPtables, and aim to solve the problem that the existing WIFI hotspots of intelligent terminals cannot perform real-time statistics on shared traffic.
The technical scheme adopted by the invention for solving the technical problem is as follows:
a WIFI hotspot traffic statistical method based on IPtables comprises the following steps:
A. opening a WIFI hotspot of the intelligent terminal, and configuring a configuration file of an IPtables rule on a system user layer of the intelligent terminal;
B. detecting whether a client is connected to the WIFI hotspot or not, and if so, acquiring an IP address of the client;
C. calling a configuration file of an IPtables rule, setting the IPtables rule for the obtained IP address of the client, counting the data volume sent and received by the IP address of the client through the WIFI hotspot according to the IPtables rule, and adding the data volume sent and received by the client to obtain corresponding flow data;
D. and displaying the flow data on the intelligent terminal.
The WIFI hotspot traffic statistical method based on the IPtables, wherein the step B specifically includes:
and B1, detecting whether a client is connected to the WIFI hotspot every first preset time, and if so, acquiring the IP address of the client.
The WIFI hotspot traffic statistical method based on the IPtables, wherein the step C specifically includes:
c11, setting the IPtables rule for the client IP connected with the WIFI hotspot, and counting the data volume sent and received by the client through the WIFI hotspot;
and C12, executing an IPtables inquiry information command every second preset time, and adding the sending quantity and the receiving quantity of the WIFI hotspot passed by the client to obtain the flow data shared by the WIFI hotspot.
The WIFI hotspot traffic statistical method based on the IPtables, wherein the step C further includes:
and C21, when a plurality of clients are connected to the WIFI hotspot, counting the data volume sent and received by the IP address of each client through the WIFI hotspot according to the IPtables rule, adding the data volume sent and received by each client to obtain corresponding flow data, and adding the sending volume and the receiving volume of all the clients to obtain the flow data shared by the WIFI hotspot.
The WIFI hotspot traffic statistical method based on the IPtables, wherein the step D specifically includes:
d1, displaying the traffic data corresponding to each client and the traffic data shared by the WIFI hotspots corresponding to all the clients on the intelligent terminal.
An IPtables-based WIFI hotspot traffic statistical system, comprising:
the system comprises a setting module, a configuration module and a management module, wherein the setting module is used for configuring a configuration file of an IPtables rule on a system user layer of an intelligent terminal;
the connection detection module is used for detecting whether a client is connected to the WIFI hotspot after the WIFI hotspot of the intelligent terminal is started, and if so, acquiring the IP address of the client;
the flow counting module is used for calling a configuration file of an IPtables rule, setting the IPtables rule for the acquired IP address of the client, counting the data volume sent and received by the IP address of the client through the WIFI hotspot according to the IPtables rule, and adding the data volume sent and received by the client to obtain corresponding flow data;
and the display module is used for displaying the flow data on the intelligent terminal.
WIFI focus flow statistical system based on IPtables, wherein, connect detection module includes:
and the connection detection unit is used for detecting whether a client is connected to the WIFI hotspot every first preset time, and if so, acquiring the IP address of the client.
The WIFI hotspot traffic statistical system based on IPtables comprises a traffic statistical module and a traffic statistical module, wherein the traffic statistical module comprises:
the flow statistic unit is used for setting the IPtables rule for the client IP connected with the WIFI hotspot and counting the data volume sent and received by the client through the WIFI hotspot;
and the traffic calculation unit is used for executing an IPtables inquiry information command every second preset time and adding the sending quantity and the receiving quantity of the client passing through the WIFI hotspot to obtain the traffic data shared by the WIFI hotspot.
The WIFI hotspot flow counting system based on the IPtables is characterized in that the flow counting module is further used for counting data volumes sent and received by IP addresses of the clients through the WIFI hotspot according to the IPtables rule when the clients are connected to the WIFI hotspot, adding the data volumes sent and received by the clients to obtain corresponding flow data, and adding the sending volume and the receiving volume of all the clients to obtain the flow data shared by the WIFI hotspot.
The WIFI hotspot traffic statistical system based on the IPtables is characterized in that the display module is further used for displaying traffic data corresponding to each client and traffic data shared by WIFI hotspots corresponding to all the clients on the intelligent terminal.
The WIFI hotspot flow counting method and system based on the IPtables effectively solve the problem that the existing WIFI hotspots of the intelligent terminal cannot count the shared flow in real time, and the configuration files of the IPtables rule are configured on the system user layer of the intelligent terminal; the method comprises the steps of starting a WIFI hotspot of the intelligent terminal, detecting whether a client is connected to the WIFI hotspot, and if so, acquiring an IP address of the client; calling a configuration file of an IPtables rule, setting the IPtables rule for the obtained IP address of the client, counting the data volume sent and received by the IP address of the client through the WIFI hotspot according to the IPtables rule, and adding the data volume sent and received by the client to obtain corresponding flow data; displaying the flow data on the intelligent terminal; the intelligent terminal can count the flow shared by the WIFI hotspots in real time, the flow shared by the WIFI hotspots of the intelligent terminal is visually displayed, the phenomenon that the flow shared by the intelligent terminal is excessive is avoided, the flow management of the intelligent terminal is effectively carried out, and great convenience is brought to users.
Drawings
Fig. 1 is a flowchart of a WIFI hotspot traffic statistical method based on IPtables according to a preferred embodiment of the present invention.
Fig. 2 is a block diagram of a preferred embodiment of a WIFI hotspot traffic statistics system based on IPtables provided in the present invention.
Detailed Description
The invention provides a WIFI hotspot traffic statistical method and system based on IPtables, and in order to make the purposes, technical schemes and advantages of the invention clearer and clearer, the invention is further described in detail below by referring to the attached drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Android, Firefox OS and other intelligent operating systems based on Linux all have API interfaces related to flow statistics, and by taking the Android system as an example, the Android system mainly comprises the following three APIs: 1) statistics of total traffic of the device including GPRS and WiFi, etc., such as traffic status, get TotalRxBytes (),/total received traffic, traffic status, get TotalTxBytes (),/total transmitted traffic; 2) GPRS traffic statistics of the device, such as TrafficStats, getMobileRxBytes (), GPRS receiving amount of the mobile phone without WiFi, TrafficStats, getMobileTxBytes (), GPRS transmitting amount of the mobile phone without Wifi; 3) the total traffic statistics of a process, such as TrafficStats, getUidRxBytes (Uid)// the total received traffic of a process, TrafficStats, getUidTxBytes (Uid)// the total sent traffic of a process.
However, these APIs can only roughly count the total traffic (WIFI and GPRS) consumed by the target device, the GPRS traffic, or the total traffic of a certain process, and cannot count the traffic shared by the devices through the WIFI hotspot, which buries hidden danger for WIFI hotspot traffic sharing, and cannot count the shared traffic in real time, so that sharing is excessive, and additional overhead is caused to the user.
According to the WIFI hotspot traffic statistical method based on the IPtables, the IPtables packet filtering system is utilized, a statistical method and a statistical system of WIFI hotspot shared traffic are developed aiming at the Linux-based intelligent terminal, and the intelligent terminal shared traffic can be counted in real time. The IPtables is an IP information packet filtering system integrated by a Linux kernel, and the packet filtering system is free and can replace an expensive commercial firewall solution to complete the functions of packet filtering, packet redirection, network address conversion and the like.
Referring to fig. 1, fig. 1 is a flowchart of a WIFI hotspot traffic statistical method based on IPtables according to a preferred embodiment of the present invention, as shown in the figure, the method includes the following steps:
step S100, starting a WIFI hotspot of the intelligent terminal, and configuring a configuration file of an IPtables rule on a system user layer of the intelligent terminal; (ii) a
S200, detecting whether a client is connected to the WIFI hotspot or not, and if so, acquiring an IP address of the client;
step S300, calling a configuration file of an IPtables rule, setting the IPtables rule for the acquired IP address of the client, counting the data volume sent and received by the IP address of the client through the WIFI hotspot according to the IPtables rule, and adding the data volume sent and received by the client to obtain corresponding flow data;
and S400, displaying the flow data on the intelligent terminal.
The above steps are described in detail with reference to specific examples.
In step S100, a WIFI hotspot of the intelligent terminal is started, and a configuration file of the IPtables rule is configured on a system user layer of the intelligent terminal. Specifically, IPtables is used to set, maintain and check IP packet filtering rules for Linux kernels. In this embodiment, the configuration file of the IPtables rule includes tool files such as IPtables and busybox. And packaging and copying the binary files of the related commands of the busy and the iptables to a folder of the related process of the traffic statistical method to complete the configuration process. It should be noted that, in other embodiments, the configuration process may also be detecting whether a configuration file of an ip tables rule exists under a folder of a process related to the traffic statistics method on the system user layer after a WIFI hotspot of the intelligent terminal is started, if so, completing configuration, and if not, packaging and copying the configuration file to the folder. The intelligent terminal is a terminal with a WIFI hotspot function, such as a mobile phone, a tablet computer and the like. The client is a terminal with a WIFI function, such as a mobile phone, a tablet computer and the like, so that the intelligent terminal can be connected in a WIFI mode.
In step S200, it is detected whether a client is connected to the WIFI hotspot, and if so, an IP address of the client is obtained. Specifically, the intelligent terminal detects whether a client is connected to the WIFI hotspot every first predetermined time, and if so, acquires an IP (Internet Protocol, Protocol for interconnection between networks) address of the client. The first predetermined time may be set according to requirements, such as 0.1s, 0.5s, 1s (second), etc.
In practical application, after a user opens a WIFI hotspot function, the WIFI hotspot traffic statistical method based on IPtables is started, and IP information of a client connected with the WIFI hotspot is inquired. The client IP query has two methods: firstly, acquiring a connection event of a client at a kernel layer of an intelligent operating system, converting the connection event and related data (information such as client name, IP (Internet protocol) and MAC (media access control) thereof into a user event to be reported to a user layer, monitoring the event and acquiring IP (Internet protocol) information of the client; and polling/proc/net/arp files of the operating system at certain intervals, recording all information of the client connected with the WIFI hotspot by the files, and reading IP information in the files. The MAC, i.e. the Media Access Control or the Medium Access Control, hardware address. It should be noted that there is no specific sequential limitation in step S100 and step S200, and the step of detecting whether a client is connected to the WIFI hotspot may be performed before, after, or simultaneously with the step of configuring the profile of the IPtables rule.
In the step S300, a configuration file of an IPtables rule is called, the IPtables rule is set for the obtained IP address of the client, the data volume sent and received by the IP address of the client through the WIFI hotspot is counted according to the IPtables rule, and the data volume sent and received by the client is added to obtain corresponding traffic data. Setting the IPtables rule for the client IP connected with the WIFI hotspot, and counting the data volume sent and received by the WIFI hotspot on the client; and executing an IPtables inquiry information command every second preset time, and adding the sending quantity and the receiving quantity of the WIFI hotspot passed by the client to obtain the flow data shared by the WIFI hotspot. The second predetermined time may be set as needed, such as 0.1s, 0.5s, 1s (second), and the like. Specifically, the IPtables and the busybox file are called to set the IPtables rule as follows: iptables-I FORWARD-s IP-j ACCEPT, and iptables-IFORWARD-d IP-j ACCEPT. The IPtables rule records data packets sent and received by all clients through intelligent terminal WIFI hotspots.
In practical application, the traffic statistical method executes an iptables information query command at a certain time interval, specifically the following command: Iptables-L FORWARD-v-n-x; the command can inquire the sizes of data packets sent and received by all clients under the FORWARD rule, the sending quantity and the receiving quantity of all the clients are added, the flow shared by the WIFI hotspot until the command is executed can be obtained, and the data is reported to the user.
Further, when a plurality of clients are connected to the WIFI hotspot, the data volume sent and received by the IP address of each client through the WIFI hotspot is counted according to the IPtables rule, the data volume sent and received by each client is added to obtain corresponding flow data, and the sending volume and the receiving volume of all the clients are added to obtain the flow data shared by the WIFI hotspot.
In step S400, the traffic data is displayed on the smart terminal. Specifically, the total traffic on the client is counted and then sent to the intelligent terminal to be displayed, so that the intelligent terminal user can know the shared traffic of the WIFI hotspot at a glance conveniently, the real-time counting of the shared traffic of the intelligent terminal is realized, and the phenomenon that the intelligent terminal user has excessive sharing and extra overhead is caused to the user is avoided.
Further, when the WIFI hotspot of the intelligent terminal is connected with a plurality of clients, in order to facilitate an intelligent terminal user to know about the shared traffic situation of the WIFI hotspot, the data volumes sent and received by each client may be added to obtain corresponding traffic data, the sent volumes and the received volumes of all the clients are added to obtain the shared traffic data of the WIFI hotspot, and then the traffic data corresponding to each client and the shared traffic data of the WIFI hotspot corresponding to all the clients are displayed on the intelligent terminal. That is, if there are 3 clients connected to the intelligent terminal, the traffic data corresponding to each client can be displayed on the intelligent terminal, and the total traffic data of the three clients can also be displayed at the same time.
After the user closes the WIFI hotspot function, an iptables command is executed to clear the iptables FORWARD rule set before, and specifically, the following iptables command may be used to clear the iptables FORWARD rule set before: iptables-D FORWARD-s IP-j ACCEPT, and iptables-D FORWARD-D IP-j ACCEPT, closing the traffic statistic method.
According to the WIFI hotspot traffic statistical method based on the IPtables, the IPtables packet filtering system is utilized, a statistical method of WIFI hotspot shared traffic is developed for intelligent terminals based on mobile operating systems such as Android and Firefox OS, and the traffic shared by the intelligent terminals can be counted in real time, so that the intelligent terminal user can perform effective traffic management.
Based on the foregoing WIFI hotspot traffic statistical method, the present invention further provides a WIFI hotspot traffic statistical system based on the IPtables, as shown in fig. 2, including:
the system comprises a setting module 10, a configuration module and a configuration module, wherein the setting module is used for configuring a configuration file of an IPtables rule on a system user layer of an intelligent terminal; specifically, as shown in step S100;
the connection detection module 20 is configured to detect whether a client is connected to a WIFI hotspot after the WIFI hotspot of the intelligent terminal is started, and if so, acquire an IP address of the client; specifically, as described in step S200;
the traffic counting module 30 is configured to call a configuration file of an IPtables rule, set the IPtables rule for the obtained IP address of the client, count data volumes sent and received by the IP address of the client through the WIFI hotspot according to the IPtables rule, and add the data volumes sent and received by the client to obtain corresponding traffic data; specifically, as shown in step S300;
the display module 40 is configured to display the flow data on the intelligent terminal; as described in step S400.
Further, the connection detection module 20 includes:
and the connection detection unit is used for detecting whether a client is connected to the WIFI hotspot every first preset time, and if so, acquiring the IP address of the client.
Further, the traffic statistic module 30 includes:
the flow statistic unit is used for setting the IPtables rule for the client IP connected with the WIFI hotspot and counting the data volume sent and received by the client through the WIFI hotspot;
and the traffic calculation unit is used for executing an IPtables inquiry information command every second preset time and adding the sending quantity and the receiving quantity of the client passing through the WIFI hotspot to obtain the traffic data shared by the WIFI hotspot.
Further, the traffic statistic module 30 is further configured to, when a plurality of clients are connected to the WIFI hotspot, count data volumes sent and received by the IP address of each client through the WIFI hotspot according to the IPtables rule, add the data volumes sent and received by each client to obtain corresponding traffic data, and add the sending volume and the receiving volume of all the clients to obtain traffic data shared by the WIFI hotspot.
Further, the display module 40 is further configured to display, on the intelligent terminal, the traffic data corresponding to each client and the traffic data shared by the WIFI hotspots corresponding to all the clients.
The intelligent terminal is a mobile phone, a tablet computer and other terminals with WIFI hotspot functions, such as a mobile phone and a tablet computer; the client is a terminal with a WIFI function, such as a mobile phone and a tablet computer.
In summary, according to the WIFI hotspot traffic statistical method and system based on the IPtables provided by the present invention, the configuration file of the IPtables rule is configured on the system user layer of the intelligent terminal; the method comprises the steps of starting a WIFI hotspot of the intelligent terminal, detecting whether a client is connected to the WIFI hotspot, and if so, acquiring an IP address of the client; calling a configuration file of an IPtables rule, setting the IPtables rule for the obtained IP address of the client, counting the data volume sent and received by the IP address of the client through the WIFI hotspot according to the IPtables rule, and adding the data volume sent and received by the client to obtain corresponding flow data; displaying the flow data on the intelligent terminal; the intelligent terminal can count the flow shared by the WIFI hotspots in real time, the flow shared by the WIFI hotspots of the intelligent terminal is visually displayed, the phenomenon that the flow shared by the intelligent terminal is excessive is avoided, the flow management of the intelligent terminal is effectively carried out, and great convenience is brought to users.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (10)

1. A WIFI hotspot traffic statistical method based on IPtables is characterized by comprising the following steps:
A. opening a WIFI hotspot of the intelligent terminal, and configuring a configuration file of an IPtables rule on a system user layer of the intelligent terminal;
B. detecting whether a client is connected to the WIFI hotspot or not, and if so, acquiring an IP address of the client;
C. calling a configuration file of an IPtables rule, setting the IPtables rule for the obtained IP address of the client, counting the data volume sent and received by the IP address of the client through the WIFI hotspot according to the IPtables rule, and adding the data volume sent and received by the client to obtain corresponding flow data;
D. displaying the flow data on the intelligent terminal;
wherein, the configuration process of the configuration file of the IPtables rule is as follows: after a WIFI hotspot of the intelligent terminal is started, whether a configuration file of the IPtables rule exists under a folder of a process related to the flow statistical method of the upper layer of the system is detected, and if not, the configuration file of the IPtables rule is packaged and copied under the folder.
2. The ip tables-based WIFI hotspot traffic statistic method of claim 1, wherein said step B specifically includes:
and B1, detecting whether a client is connected to the WIFI hotspot every first preset time, and if so, acquiring the IP address of the client.
3. The ip tables-based WIFI hotspot traffic statistic method of claim 1, wherein said step C specifically includes:
c11, setting the IPtables rule for the client IP connected with the WIFI hotspot, and counting the data volume sent and received by the client through the WIFI hotspot;
and C12, executing an IPtables inquiry information command every second preset time, and adding the sending quantity and the receiving quantity of the WIFI hotspot passed by the client to obtain the flow data shared by the WIFI hotspot.
4. The ip tables-based WIFI hotspot traffic statistic method of claim 1, wherein said step C further comprises:
and C21, when a plurality of clients are connected to the WIFI hotspot, counting the data volume sent and received by the IP address of each client through the WIFI hotspot according to the IPtables rule, adding the data volume sent and received by each client to obtain corresponding flow data, and adding the sending volume and the receiving volume of all the clients to obtain the flow data shared by the WIFI hotspot.
5. The ip tables-based WIFI hotspot traffic statistic method of claim 4, wherein said step D specifically includes:
d1, displaying the traffic data corresponding to each client and the traffic data shared by the WIFI hotspots corresponding to all the clients on the intelligent terminal.
6. The utility model provides a WIFI focus flow statistical system based on IPtables which characterized in that includes:
the system comprises a setting module, a configuration module and a management module, wherein the setting module is used for configuring a configuration file of an IPtables rule on a system user layer of an intelligent terminal; wherein, the configuration process of the configuration file of the IPtables rule is as follows: after a WIFI hotspot of the intelligent terminal is started, detecting whether a configuration file of an IPtables rule exists under a folder of a process related to a flow statistical method of the upper layer of the system, and if not, packaging and copying the configuration file of the IPtables rule to the folder;
the connection detection module is used for detecting whether a client is connected to the WIFI hotspot after the WIFI hotspot of the intelligent terminal is started, and if so, acquiring the IP address of the client;
the flow counting module is used for calling a configuration file of an IPtables rule, setting the IPtables rule for the acquired IP address of the client, counting the data volume sent and received by the IP address of the client through the WIFI hotspot according to the IPtables rule, and adding the data volume sent and received by the client to obtain corresponding flow data;
and the display module is used for displaying the flow data on the intelligent terminal.
7. The ip tables-based WIFI hotspot traffic statistics system of claim 6, wherein the connection detection module comprises:
and the connection detection unit is used for detecting whether a client is connected to the WIFI hotspot every first preset time, and if so, acquiring the IP address of the client.
8. The ip tables-based WIFI hotspot traffic statistics system of claim 6, wherein the traffic statistics module comprises:
the flow statistic unit is used for setting the IPtables rule for the client IP connected with the WIFI hotspot and counting the data volume sent and received by the client through the WIFI hotspot;
and the traffic calculation unit is used for executing an IPtables inquiry information command every second preset time and adding the sending quantity and the receiving quantity of the client passing through the WIFI hotspot to obtain the traffic data shared by the WIFI hotspot.
9. The WIFI hotspot traffic counting system based on IPtables according to claim 6, wherein the traffic counting module is further configured to count data volumes sent and received by the WIFI hotspot by an IP address of each client according to the IPtables rule when a plurality of clients are connected to the WIFI hotspot, add the data volumes sent and received by each client to obtain corresponding traffic data, and add the sending volume and the receiving volume of all the clients to obtain the traffic data shared by the WIFI hotspot.
10. The ip tables-based WIFI hotspot traffic statistic system of claim 9, wherein the display module is further configured to display traffic data corresponding to each client and traffic data shared by WIFI hotspots corresponding to all clients on the smart terminal.
CN201510186672.0A 2015-04-20 2015-04-20 WIFI hotspot traffic statistical method and system based on IPtables Active CN106162594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510186672.0A CN106162594B (en) 2015-04-20 2015-04-20 WIFI hotspot traffic statistical method and system based on IPtables

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510186672.0A CN106162594B (en) 2015-04-20 2015-04-20 WIFI hotspot traffic statistical method and system based on IPtables

Publications (2)

Publication Number Publication Date
CN106162594A CN106162594A (en) 2016-11-23
CN106162594B true CN106162594B (en) 2020-02-07

Family

ID=58058206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510186672.0A Active CN106162594B (en) 2015-04-20 2015-04-20 WIFI hotspot traffic statistical method and system based on IPtables

Country Status (1)

Country Link
CN (1) CN106162594B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109819414B (en) * 2017-11-21 2021-08-24 深圳市微蜂创联科技有限公司 Paid traffic sharing method and system based on wireless hotspots
CN108494616A (en) * 2018-02-26 2018-09-04 上海康斐信息技术有限公司 A kind of cell phone application flow rate test method and system
CN108632870A (en) * 2018-04-03 2018-10-09 四川斐讯信息技术有限公司 A kind of method and system monitoring Internet data based on wireless router
CN108989240A (en) * 2018-08-01 2018-12-11 Oppo(重庆)智能科技有限公司 Method for controlling network flow, device, terminal device and storage medium
CN113709005B (en) * 2021-09-13 2022-12-23 成都安恒信息技术有限公司 User-defined IP flow statistical method and system based on IPtables

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101958826A (en) * 2009-07-20 2011-01-26 北大方正集团有限公司 Method and device for enabling multiple discontinuous IP addresses under same account to share same bandwidth
CN102291797A (en) * 2011-07-04 2011-12-21 东南大学 Method for designing wireless terminal having routing function
CN103117906A (en) * 2013-02-27 2013-05-22 广东欧珀移动通信有限公司 Flow control method for process of sharing WiFi (wireless fidelity) hot spot for mobile terminals
CN103763154A (en) * 2014-01-11 2014-04-30 浪潮电子信息产业股份有限公司 Network flow detection method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9661522B2 (en) * 2012-07-09 2017-05-23 Cisco Technology, Inc. System and method associated with a service flow router

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101958826A (en) * 2009-07-20 2011-01-26 北大方正集团有限公司 Method and device for enabling multiple discontinuous IP addresses under same account to share same bandwidth
CN102291797A (en) * 2011-07-04 2011-12-21 东南大学 Method for designing wireless terminal having routing function
CN103117906A (en) * 2013-02-27 2013-05-22 广东欧珀移动通信有限公司 Flow control method for process of sharing WiFi (wireless fidelity) hot spot for mobile terminals
CN103763154A (en) * 2014-01-11 2014-04-30 浪潮电子信息产业股份有限公司 Network flow detection method

Also Published As

Publication number Publication date
CN106162594A (en) 2016-11-23

Similar Documents

Publication Publication Date Title
CN106162594B (en) WIFI hotspot traffic statistical method and system based on IPtables
WO2020147627A1 (en) Link selection method and related apparatus
US9516509B2 (en) Wireless communication in radar transmission channels
RU2651800C1 (en) Method and device connection status checking
CN103297306B (en) A kind of agriculture Internet of things system
US20170094054A1 (en) Methods of sharing a wifi hotspot and associated electronic devices
CN111600952B (en) Scene pushing method, scene pushing execution device, terminal, server and scene pushing system
CN110505618B (en) Service processing method and server
CN108901035B (en) Identification method and device for terminal of Internet of things
CN104618853B (en) A kind of information push method, apparatus and system
US10499311B2 (en) Method and apparatus for implementing network sharing
CN111464491A (en) Three-layer framework system for unified access and management and control of terminal equipment of Internet of things
WO2018006623A1 (en) Preferred access method for mobile wifi hotspot, hotspot device and terminal device
CN110493353A (en) Communication means, device and server
US9813927B2 (en) Mobile terminal flow identification method and apparatus
CN103178981B (en) Connection management method and system
CN104125605A (en) Implementing method and device for request of building WIFI connection
CN109194738A (en) Remote reboot method, routing development board and hardware bottom plate
CN108551429A (en) Flow control methods, electronic device and the computer readable storage medium of application program
CN104022923A (en) Network interface device and system as well as network data accessing method
CN104053132A (en) Method and apparatus for information number identification
CN105850165B (en) Terminal application control method, device and system based on near field communication technology
CN103023542B (en) A kind of document transmission method of intelligent mobile communication terminal, system
CN109995660B (en) Streaming media transmission method and device, terminal equipment and computer readable storage medium
WO2015192497A1 (en) Communication link sending method and apparatus, and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant