Here is a quick reference for the format used by the ipchains log messages. This is mostly taken from the ipchains-HOWTO
A typical log message generated by ipchains:
Jun 16 08:00:38 megahard kernel: Packet log: forward DENY
eth1 PROTO=17 a.b.c.d:234 w.x.y.z:34567 L=78 S=0x00 I=13413
F=0x0000 T=112 (#16)
The leading part is self explanatory. The remaining items are explained in sequence here:
| forward |
Name of the chain which was traversed by the packet |
| DENY |
action taken by ipchains |
| eth1 |
interface the packet was passing through |
| PROTO=17 |
Protocol number. A list is in your /etc/protocols. A complete list is in the file protocol-numbers |
| a.b.c.d |
source IP address |
| 234 |
source port (TCP and UDP) or the ICMP type. A list of port numbers is in your /etc/services. A complete list is in the file port-numbers |
| w.x.y.z |
destination IP address |
| 34567 |
destination port (TCP and UDP) or the ICMP code. A list of ICMP types and codes is in the file icmp-parameters |
| L=78 |
total Length of packet in bytes |
| S=0x00 |
type of Service (TOS), only 4 bits used these days, not important for firewall purposes |
| I=13413 |
IP-ID, increments with each packet sent |
| F=0x0000 |
Flags (3 bits) and Fragment offset (13 bits) |
| T=112 |
Time to live (TTL) or hops remaining before packet is dropped |
| (#16) |
rule number in the chain which matched the packet and caused the log |
More interesting files, such as multicast-addresses, can be found in http://www.iana.org/protocols/.
Read the rest of this entry »