LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-27-2013, 12:57 AM   #1
niraj.vara
LQ Newbie
 
Registered: May 2009
Posts: 27

Rep: Reputation: 0
firewall blocking request


Hi

I have the Linux firewall in that I have the following rule.

$IPT -A bad_packets -p ALL -m state --state INVALID -j LOG \
--log-prefix "fp=bad_packets:1 a=DROP "

$IPT -A bad_packets -p ALL -m state --state INVALID -j DROP


but that rules blocking this request and I found that this request its a genuine request then why its blocking by the firewall .... Logs of firewall is here below.

Jun 27 11:14:38 xyz kernel: fp=bad_packets:1 a=DROP IN=eth0 OUT=eth1 SRC=192.168.1.44 DST=173.194.38.141 LEN=40 TOS=0x00 PREC=0x00 TTL=63 ID=41102 DF PROTO=TCP SPT=55563 DPT=80 WINDOW=245 RES=0x00 ACK FIN URGP=0
Jun 27 11:14:39 xyz kernel: fp=bad_packets:1 a=DROP IN=eth0 OUT=eth1 SRC=192.168.1.108 DST=54.249.82.171 LEN=40 TOS=0x00 PREC=0x00 TTL=63 ID=57967 DF PROTO=TCP SPT=49757 DPT=80 WINDOW=65535 RES=0x00 ACK FIN URGP=0
Jun 27 11:14:43 xyz kernel: fp=bad_packets:1 a=DROP IN=eth0 OUT=eth1 SRC=192.168.1.108 DST=54.249.82.171 LEN=40 TOS=0x00 PREC=0x00 TTL=63 ID=28476 DF PROTO=TCP SPT=49757 DPT=80 WINDOW=65535 RES=0x00 ACK FIN URGP=0
Jun 27 11:14:45 xyz kernel: fp=bad_packets:1 a=DROP IN=eth0 OUT=eth1 SRC=192.168.1.108 DST=173.194.38.131 LEN=40 TOS=0x00 PREC=0x00 TTL=63 ID=59458 DF PROTO=TCP SPT=49772 DPT=80 WINDOW=16384 RES=0x00 ACK FIN URGP=0
Jun 27 11:14:49 xyz kernel: fp=bad_packets:1 a=DROP IN=eth0 OUT=eth1 SRC=192.168.1.108 DST=216.52.242.80 LEN=40 TOS=0x00 PREC=0x00 TTL=63 ID=48650 DF PROTO=TCP SPT=49740 DPT=80 WINDOW=16384 RES=0x00 ACK FIN URGP=0
Jun 27 11:14:50 xyz kernel: fp=bad_packets:1 a=DROP IN=eth0 OUT=eth1 SRC=192.168.1.108 DST=173.194.38.131 LEN=40 TOS=0x00 PREC=0x00 TTL=63 ID=58428 DF PROTO=TCP SPT=49773 DPT=80 WINDOW=16384 RES=0x00 ACK FIN URGP=0
Jun 27 11:14:50 xyz kernel: fp=bad_packets:1 a=DROP IN=eth0 OUT=eth1 SRC=192.168.1.108 DST=54.249.82.171 LEN=40 TOS=0x00 PREC=0x00 TTL=63 ID=17698 DF PROTO=TCP SPT=49757 DPT=80 WINDOW=65535 RES=0x00 ACK FIN URGP=0
Jun 27 11:14:51 xyz kernel: fp=bad_packets:1 a=DROP IN=eth0 OUT=eth1 SRC=192.168.1.108 DST=216.52.242.80 LEN=40 TOS=0x00 PREC=0x00 TTL=63 ID=45670 DF PROTO=TCP SPT=49740 DPT=80 WINDOW=16384 RES=0x00 ACK FIN URGP=0
 
Old 06-28-2013, 05:36 AM   #2
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
I can notice that the packets which flags ACK FIN URG are falling in INVALID state.

Thanks
 
Old 06-28-2013, 07:43 AM   #3
jazz5150
LQ Newbie
 
Registered: Jun 2013
Location: NL
Distribution: Kali-Linux, Debian
Posts: 20

Rep: Reputation: 15
This is a result of the stateful firewall not being able to match the packet to a known active connection.
Possible reason for this behaviour is that the FIN/ACK packet is send very long after the FIN packet.
Another possibility is that the firewall is not able to handle the amount of connections.

The only solutions I came accross is to make the firewall stateless for the port(s) where this problem occurs, or ignore the packets with ACK FIN URGP=0 set altogether.
 
Old 06-30-2013, 11:17 PM   #4
niraj.vara
LQ Newbie
 
Registered: May 2009
Posts: 27

Original Poster
Rep: Reputation: 0
Hi

I have notice that also, but its a google or facebook's IP which is open in my browser and block by the proxy server. which is genuine request.

the firewall should not block that traffic.
 
Old 07-03-2013, 02:45 AM   #5
jazz5150
LQ Newbie
 
Registered: Jun 2013
Location: NL
Distribution: Kali-Linux, Debian
Posts: 20

Rep: Reputation: 15
It is not a question if the firewall should block that traffic.
The issue is that the firewall can not relate the message to a known active connection.
Because it is a stateful firewall it will automatically block traffic if it can not relate that traffic to a known active connection.
The possible solutions are the ones I gave in my first reply.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Blocking Countries via pf firewall Schiz0 Linux - Networking 4 10-15-2007 05:27 AM
Firewall blocking Rekna Linux - Security 6 02-27-2007 06:03 PM
SUSE 10 firewall blocking johnhawk Linux - Security 1 07-18-2006 03:09 AM
firewall blocking internet k4zau Linux - Networking 1 09-24-2004 02:18 PM
firewall traffic blocking help jaylee Linux - Security 8 06-30-2003 10:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration