6

What does this UFW log mean? Has already asked this question, however he asked it with a specific intention and the log in actuality did not get covered in the answer. Therefore I did not benefit and ask the question again.

I want to know what each piece of the UFW log means

Feb  6 16:27:08 jonasgroenbek kernel: [71910.873115] 
[UFW BLOCK] IN=eth0 OUT= 
MAC=a6:8d:e2:51:62:4c:f0:4b:3a:4f:80:30:08:00 
SRC=77.72.85.26 DST=157.230.26.180
LEN=40 TOS=0x00 PREC=0x00 TTL=251 ID=62215 PROTO=TCP 
SPT=42772 DPT=3194 WINDOW=1024                        
RES=0x00 SYN URGP=0

For my (and hopefully others) feasibility, I would very much like each individual part being described shortly.

12

UFW is just a front end for iptables, and so those log entries are actually from iptables.

Line 1: Feb 6 16:27:08 jonasgroenbek kernel: [71910.873115]

date and time, your computer name, and kernel time since boot.

Line 2: [UFW BLOCK] IN=eth0 OUT=

whenever iptables does a log entry there is an optional --log-prefix, in this case [UFW BLOCK]. The seriously annoying thing about UFW is that it uses the same prefix for every type of log entry, making it difficult to correlate back to the iptables rule set. The IN is the network interface name that the packet arrived on. The OUT is blank because the packet is not been re-transmitted, which might be the case if this was a router application.

Line 3: MAC=a6:8d:e2:51:62:4c:f0:4b:3a:4f:80:30:08:00

These are the Machine Address Codes for the local area destination (a6:8d:e2:51:62:4c (eth0)) and source (f0:4b:3a:4f:80:30) network interface cards. In your case the source is probably the MAC of your ISP gateway NIC. 6 bytes each. The extra 2 bytes (08:00) at the end are the frame type, in this case it means "ethernet frame carried an IPv4 datagram".

Line 4: SRC=77.72.85.26 DST=157.230.26.180

Those are the IP addresses for where the packet came from, SRC, and where is it supposed to going, DST and should be your IP address.

Line 5: LEN=40 TOS=0x00 PREC=0x00 TTL=251 ID=62215 PROTO=TCP

Length of the payload portion of the raw packet; Type of service, Presedence, Time to live (how many hops left before the packet will die from too many hops); Identification; Protocol (in this case TCP).

Line 6: SPT=42772 DPT=3194 WINDOW=1024

Source port; Detestation port; TCP window size

Line 7: RES=0x00 SYN URGP=0

TCP flags, the important one here is "SYN" meaning it it attempting to make a NEW connection. This log entry means the attempt has been blocked.

| improve this answer | |
  • I could not imagine a better answer, may you have a wonderful day sir! :) – Jonas Grønbek Feb 6 '19 at 17:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.