Use the Linux Firewall created by IP link-Linux Enterprise Application-Linux server application information. The following is a detailed description. Although the Linux operating system has many advantages and its security is high, you should not generate a false sense of security, because the security of your Linux system may still be compromised. Now let's take a look at how to use IPchains to build a Linux system firewall to protect your system from infringement.
Let's assume that you already have some basic Internet knowledge. It should be said that it is very useful to be familiar with terms such as IP addresses, TCP ports, and network data transmission. It is also necessary to have a general understanding of the firewall.
Command:
We need to establish a series of rules so that the IP chain can enter the network paths that come and go. Each rule is placed in one of the three Chains: The input chain for storing input data, the output chain for storing output data, and the transmission chain.
Each time you add a rule, you must start with the IP link and add some or all of the following steps. Append, Delete, Insert, and Replace, it also indicates the link on which the rule command should be added and how to add it. At the time of addition, start with-A,-D,-I, or-R. These letters are followed by A chain name (input chain or output chain ).
When you want to use the INSERT command, you must specify the line number after the chain name at the location where you want to add the command. When using the replacement command, you must specify the replaced line number. When using the DELETE command, you must also specify the deleted line number. When using the delete option, you do not need to enter anything after the row number. You only need to type ipchains-L to find the row number of the command. Protocol ):
Here you need to specify a specific protocol for each rule command. In most cases, the TCP/IP protocol is used. Maybe you don't want your computer to respond to the Ping signal from another computer. To achieve this, you need to specify ICMP (Internet Control Packet protocol ). When specifying a specific protocol, use the-p command, for example,-p icmp.
Source ):
The source can determine the path from a specific IP address and the port using the-s command. If you know a standard IP address, you can directly use the IP address, or simply specify a domain name (such as www.linuxdiyf.com ). If you want to specify any address, use 0.0.0.0/0.
You can specify a port (for example, 110) with a number after the IP address, or use the server name (pop3) to specify a port. You can use colons to separate two port numbers so that you can specify a series of ports. For example: