CN113377459A - Method for displaying xTables configuration based on CGI Web - Google Patents

Method for displaying xTables configuration based on CGI Web Download PDF

Info

Publication number
CN113377459A
CN113377459A CN202110754029.9A CN202110754029A CN113377459A CN 113377459 A CN113377459 A CN 113377459A CN 202110754029 A CN202110754029 A CN 202110754029A CN 113377459 A CN113377459 A CN 113377459A
Authority
CN
China
Prior art keywords
xtables
cgi
command
chain
picture
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.)
Pending
Application number
CN202110754029.9A
Other languages
Chinese (zh)
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.)
Xinhe Semiconductor Technology Wuxi Co Ltd
Original Assignee
Xinhe Semiconductor Technology Wuxi Co Ltd
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 Xinhe Semiconductor Technology Wuxi Co Ltd filed Critical Xinhe Semiconductor Technology Wuxi Co Ltd
Priority to CN202110754029.9A priority Critical patent/CN113377459A/en
Publication of CN113377459A publication Critical patent/CN113377459A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method for displaying xTables configuration based on CGI Web, which utilizes the prior CGI Web and xTables command line tool technology to embed a picture of 'how data flows in a Netfilter frame' into an HTML page, and adopts a JavaScript front-end technology to click each table and chain in the picture of 'how data flows in the Netfilter frame'. By using the method, when the configuration of the current xTables command line tool needs to be checked, the configuration rule of the current list or chain can be displayed only by clicking the corresponding position of the data on the picture flowing in the Netfilter frame; the position of the path controlled by the current rule on the whole is visually displayed, and the trouble of memorizing and inputting an xTables command line tool is avoided.

Description

Method for displaying xTables configuration based on CGI Web
Technical Field
The invention relates to the technical field of packet filtering firewalls, in particular to a method for displaying xTables configuration based on CGI Web.
Background
Netfilter/xTables incorporated the linux kernel version of linux 2.3.x at 3 months 2000. This has been an important packet filtering firewall technology.
Netfilter/xTables consists of three parts, Netfilter frame/xTables (kernel space)/xTables command line tool (user space), respectively. The xTables command line tool (user space) is divided into iptables and ebtables. Corresponding to three-layer and two-layer control respectively. The xTables command line tools (user space), i.e., iptables and ebtables, provide interfaces for configuration, modification, and querying.
When the xTables configuration needs to be inquired, an xTables command line tool needs to be executed to input the corresponding table and chain, so that the operation is complicated and is not intuitive. Especially the position of the chain in the data stream is difficult to embody.
Some skilled in the art have produced pictures showing how data flows in the Netfilter framework, as shown in fig. 1.
It is common to find possible locations against the picture and then manually look with the xTables command line tool, but without organic integration.
The CGI Web is generally used for configuration and control interfaces of embedded devices. The front end adopts HTML/JS to display in a browser almost consistent with the general Web, and only the back end needs to support the HTTP Server of the CGI to be limited by the performance resource of the equipment.
Disclosure of Invention
The invention aims to provide a method for displaying xTables configuration based on CGI Web, so as to solve the problems in the background technology.
In order to achieve the purpose, the invention organically combines the pictures of 'CGI Web', 'how data flows in the Netfilter frame' and 'xTables command line tool', and provides the following technical scheme:
based on a method for displaying xTables configuration by CGI Web, the existing CGI Web and xTables command line tool technology is utilized, and a picture of 'how data flows in a Netfilter frame' (namely a picture of Packet flow in Netfilter and General Networking) is embedded into an HTML page, and the specific flow is as follows:
when a user opens a browser and inputs an equipment address, a picture of 'how data flows in a Netfilter frame' is displayed; and adopting a JavaScript front-end technology to click each table and chain in the picture.
When a user clicks a mouse, the browser executes an onClick event of JavcScript after receiving the mouse click event of the user; at the moment, according to the position of the mouse, comparing the position with the position of each table and chain in the picture, and judging which table and which chain are clicked; and then the names of the table and the chain are used as POST parameters to be sent to the CGI.
The CGI receives a POST request, and command codes obtained from parameters are shell-xTables, types of iptables/ebtables, table nat/filter/raw/mangle, and chains of branching/routing/input/output/forward; combining them together, splicing them into a command which can be identified by an xTables command line tool, issuing the command to a system, and putting the result back to JavaScript; the JavaScript adds the results to the HTML and displays them.
And judging that the filter table (all chains) of the iptables is clicked by the OnClick event of the JavaScript according to the mouse coordinates, and generating a filter chain (representing all chains) of the iptables type iptables table with a POST command code of shell-xTables as empty to be sent to the CGI.
The CGI receives the POST, combines the POST into a command of iptables-t filter-xvnL, executes the command and returns a result; and the JavaScript adds the result returned by the POST to the HTML page and displays the result to the user.
Compared with the prior art, the invention has the advantages that: the invention organically combines the pictures of CGI Web, how data flows in the Netfilter frame and an xTables command line tool; when the method is used, the configuration of the current xTables command line tool needs to be checked, and the configuration rule of the current list or chain can be displayed only by clicking the corresponding position of the data on the picture flowing in the Netfilter frame; the position of the path controlled by the current rule on the whole is visually displayed, and the trouble of memorizing and inputting an xTables command line tool is avoided; especially, the query of the existing configuration one by one is more convenient.
Drawings
Fig. 1 is a schematic diagram of how data flows in the Netfilter framework.
Fig. 2 is a block diagram of the overall structure of the technical scheme of the method.
FIG. 3 is a flow chart of JavaScript click determination in the present invention.
Fig. 4 is a flow chart of CGI analysis in the present invention.
FIG. 5 is a graph showing the effect of the method of the present invention.
Detailed Description
The technical solution of the present patent will be described in further detail with reference to the following embodiments.
Referring to fig. 2, a method for displaying an xTables configuration based on CGI Web combines the existing CGI Web and xTables command line tool technologies, and embeds a picture of how data flows in a Netfilter frame into an HTML page, and the specific flow is as follows:
when a user opens a browser and inputs an equipment address, a picture of 'how data flows in a Netfilter frame' is displayed; and adopting a JavaScript front-end technology to click each table and chain in the picture.
As shown in fig. 3, when the user clicks the mouse, the browser executes the onClick event of JavcScript after receiving the mouse click event of the user; at the moment, according to the position of the mouse, comparing the position with the position of each table and chain in the picture, and judging which table and which chain are clicked; and then the names of the table and the chain are used as POST parameters to be sent to the CGI.
As shown in fig. 4, when the CGI receives a POST request, the command code obtained in the parameter is shell-xTables, type iptables/ebtables, table nat/filter/raw/mangle, chain branching/routing/input/output/forward; combining them together, splicing them into a command which can be identified by an xTables command line tool, issuing the command to a system, and putting the result back to JavaScript; the JavaScript adds the results to the HTML and displays them.
For example, as shown in FIG. 5, the user is interested in configuring the filter table of the iptables, as long as clicking the filter table of three layers (network level) in the browser.
And judging that the filter table (all chains) of the iptables is clicked by the OnClick event of the JavaScript according to the mouse coordinates, and generating a filter chain (representing all chains) of the iptables type iptables table with a POST command code of shell-xTables as empty to be sent to the CGI.
The CGI receives the POST, combines the POST into a command of iptables-t filter-xvnL, executes the command and returns a result; and the JavaScript adds the result returned by the POST to the HTML page and displays the result to the user.
The invention organically combines the pictures of CGI Web, how data flows in the Netfilter frame and the xTables command line tool. The xTables command line tool configuration can be visually and conveniently displayed.
Although the preferred embodiments of the present patent have been described in detail, the present patent is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present patent within the knowledge of those skilled in the art.

Claims (2)

1. The method for displaying xTables configuration based on CGI Web is based on the existing CGI Web and xTables command line tool technology, and is characterized in that a picture of 'how data flows in a Netfilter frame' is embedded into an HTML page, and the specific flow is as follows:
when a user opens a browser and inputs an equipment address, a picture of 'how data flows in a Netfilter frame' is displayed; by adopting a JavaScript front-end technology, how data flows in the Netfilter frame can be realized by clicking each table and chain in the picture;
when a user clicks a mouse, the browser executes an onClick event of JavcScript after receiving the mouse click event of the user; at the moment, according to the position of the mouse, comparing the position with the position of each table and chain in the picture, and judging which table and which chain are clicked; then the names of the table and the chain are used as POST parameters and sent to the CGI;
the CGI receives the POST request, combines the command codes, the types, the lists and the chains obtained from the parameters, splices the command codes, the types, the lists and the chains into a command which can be identified by an xTables command line tool, sends the command to a system, and returns the result to the JavaScript; the JavaScript adds the result to the HTML and displays the result;
the OnClick event of JavaScript judges that the filter table of the iptables is clicked according to the mouse coordinates, and then generates a filter chain of the iptables table with a POST command code of shell-xTables type as null and sends the filter chain to the CGI;
the CGI receives the POST, combines the POST into a command of iptables-t filter-xvnL, executes the command and returns a result; and the JavaScript adds the result returned by the POST to the HTML page and displays the result to the user.
2. The method for Web presentation of xTables configuration based on CGI of claim 1, wherein the command code is shell-xTables, category iptables/ebables, table nat/filter/raw/mangle, chain broken/routing/input/output/forward.
CN202110754029.9A 2021-07-04 2021-07-04 Method for displaying xTables configuration based on CGI Web Pending CN113377459A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110754029.9A CN113377459A (en) 2021-07-04 2021-07-04 Method for displaying xTables configuration based on CGI Web

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110754029.9A CN113377459A (en) 2021-07-04 2021-07-04 Method for displaying xTables configuration based on CGI Web

Publications (1)

Publication Number Publication Date
CN113377459A true CN113377459A (en) 2021-09-10

Family

ID=77580889

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110754029.9A Pending CN113377459A (en) 2021-07-04 2021-07-04 Method for displaying xTables configuration based on CGI Web

Country Status (1)

Country Link
CN (1) CN113377459A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150373081A1 (en) * 2014-06-20 2015-12-24 Orange Method of sharing browsing on a web page displayed by a web browser
CN109783750A (en) * 2018-12-13 2019-05-21 北京字节跳动网络技术有限公司 Case mechanism defines the method, apparatus and electronic equipment of webpage interbehavior

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150373081A1 (en) * 2014-06-20 2015-12-24 Orange Method of sharing browsing on a web page displayed by a web browser
CN109783750A (en) * 2018-12-13 2019-05-21 北京字节跳动网络技术有限公司 Case mechanism defines the method, apparatus and electronic equipment of webpage interbehavior

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
FREE JOE: ""HTML中点击图片不同区域触发不同事件 图片定位"", pages 1 - 2, Retrieved from the Internet <URL:https://blog.csdn.net/wangfeijiu/article/details/106563204> *

Similar Documents

Publication Publication Date Title
US9721029B1 (en) Distributing web applications across a pre-existing web
US8280884B2 (en) Exposing rich internet application content to search engines
JP5086183B2 (en) Enhanced widget composition platform
DE60108158T2 (en) ONLINE DEVELOPMENT OF APPLICATIONS
DE60121987T2 (en) Accessing data stored at an intermediate station from a service
CA2712984C (en) Traffic visualization across web maps
US20110078600A1 (en) Modification Free Tagging of Business Application User Interfaces
CN106708899A (en) Automatic point burying device
US20120030592A1 (en) Mashup Component Authoring Tool For Business Enterprise User Interfaces
KR20030077623A (en) A method and a bridge for coupling a server and a client of different object types
US8924867B2 (en) Web interface for remote platform build
KR20210089081A (en) Landing page processing method, device, equipment and medium
KR20020022374A (en) Method for collaborative browsing in using the transformation of URL
US20090327235A1 (en) Presenting references with answers in forums
US20070214110A1 (en) Systems and methods for providing services
CN104486333A (en) Debug method and debug device for mobile application programs
CN113377459A (en) Method for displaying xTables configuration based on CGI Web
CN107077499B (en) Generation of mapping definitions for content management systems
JP5737249B2 (en) Load simulation apparatus, simulation apparatus, load simulation method, simulation method, and program
US20130311860A1 (en) Identifying Referred Documents Based on a Search Result
CN113923250A (en) Method, device and system for assisting network service arrangement
WO2009066957A2 (en) System for providing web service linked with portal site to web site, and method thereof
US20110126090A1 (en) Component cooperation device, a component cooperation method, a method of updating components of a web page and a program thereof
US9256666B2 (en) Linking of a plurality of items of a user interface to display new information inferred from the plurality of items that are linked
JP4301376B2 (en) Awareness / collaboration system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination