The Linux Page

What is the 255 in "iptables -A INPUT -p icmp --icmp-type 255 -j ACCEPT"?

The following command adds a rule to your iptable firewall:

iptables -A INPUT -p icmp --icmp-type 255 -j ACCEPT

As we can see, the rule accepts protocol ICMP and uses ICMP type 255. Only, if you look for a list of valid ICMP types, 255 is not included.

The fact is that this rule actually says: accept any ICMP type. If you changed the ACCEPT with DROP, it would refuse all ICMP packets. In most cases, it is safe to accept ICMP packets since they do not divulge more information than necessary.

Note that in your firewall script, you may use "any" instead of 255. That will make it clearer. However, when you check out your firewall, it will show the rule as follow:

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts   bytes target  prot opt in   out  source     destination

2432  326450 ACCEPT  icmp --  eth0 *    0.0.0.0/0  0.0.0.0/0    icmptype 255

and as you can see, it says 255 and not any. So this is something you want to know about. The meaning of ICMP type 255 is: All ICMP types included. This is an internal interpretation of the ICMP type value and not a type of mask or anything of the sort.

Reference: https://www.frozentux.net/iptables-tutorial/chunkyhtml/a6339.html

Syndicate content

SMS From Me Logo

SMS From Me

To automatically start one on one conversations with your online leads.

     

   

Terms of Site Index

Find the page/content you are looking for with our index.

  • decimal

    Most Database systems offer a number type called DECIMAL. In general, it represents a fixed integer number with a set number of digits on the left side of the decimal point and a set of digits after the decimal point. Some database system will use floating points instead. Commonly used synonyms are MONEY and CURRENCY.

  • float

    float is a type in most software languages referencing an IEEE floating point number. These numbers are generally defined on 32 or 64 bits with three parts: a sign, an exponent and a mantissa. There is also a bias which is not saved in the number. The sign is 0 (positive) or 1 (negative). This means you have a representation of: +0.0 and -0.0. The exponent is about 1/6th the total size in bits. The bias is added/subtracted from the exponent. In the end, it is a signed power of 2 exponent (i.e. exercises a shift on the mantissa.) The mantissa forms the current number.

  • proxy

    In networking, a proxy is an intermediate network connection used to hide a user or computer. Most large companies use multiple proxies to hide all of their different intranets. Technically, when using a proxy you actually send all your network data to that other computer and that computer is in charge of sending that data outside your organization. Very large companies generally have multiple levels of proxies.

  • right
  • welcome