LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-24-2011, 09:20 AM   #1
rjordan
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
iptables blocking SYN-ACK


I've been troubleshooting some intermittent connectivity issue between two systems in the same VLAN. The client is a RHEL 5.5 system and the server is a load balancer appliance.
The RHEL system is sending HTTP requests to the load balancer and about every couple hundred requests, one will hang for a few minutes. I ran a netstat on the RHEL while it was hanging and I saw a connection to the LB in a "SYN SENT" state. It stayed in this state for about a minute or two.
I ran tcpdumps on both systems and it looks like RHEL is intermittently rejecting the SYN-ACK from the LB. RHEL sends a SYN, LB sends a SYN-ACK, then RHEL responds back to the LB with "ICMP Destination unreachable (Host administratively prohibited)." Both tcpdumps show the same info. If I disable iptables on the RHEL, the issue goes away.
I looked at iptables and it looked okay to me. I'm not sure why it would only block some of the SYN-ACKs from the LB. Below is what the iptables looks like. Both the RHEL and LB are on 192.168.10.0/24. We have another RHEL system that has the same exact iptables and it doesn't have this problem. Any insight into this issue would be appreciated.

Code:
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [49012328:34994280488]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p esp -j ACCEPT
-A RH-Firewall-1-INPUT -p ah -j ACCEPT
-A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.10.0/255.255.255.0 -p tcp -m state --state NEW -m tcp -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.10.0/255.255.255.0 -p udp -m state --state NEW -m udp -j ACCEPT
-A RH-Firewall-1-INPUT -m limit --limit 60/minute -j LOG --log-level 7 --log-prefix "Dropped by firewall: "
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
Additionally, I added some logging for iptables and it confirms that it is dropping the packets (RHEL is 192.168.10.100, LB is 192.168.10.200:
Code:
Jun 24 10:22:42 RHEL kernel: Dropped by firewall: IN=eth0 OUT= MAC=12:34:56:ab:cd:ef:00:11:22:33:44:55:66:77 SRC=192.168.10.200 DST=192.168.10.100 LEN=64 TOS=0x00 PREC=0x00 TTL=255 ID=25603 DF PROTO=TCP SPT=9080 DPT=33982 WINDOW=4380 RES=0x00 ACK SYN URGP=0

Last edited by rjordan; 06-24-2011 at 09:26 AM.
 
Old 06-24-2011, 02:39 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I don't see anything in your ruleset that would explain the behavior you're seeing. The RHEL box sends a SYN, and the load balancer replies with a SYN-ACK. It should be accepted in by the RELATED,ESTABLISHED rule.

Have you double-checked that the rules loaded into memory exactly match what you posted above? (I'm not sure if you posted output from iptables-save(8), or if you took that from a config file.)

The fact that you're seeing the problem occur only occasionally is probably a good clue. Resource (memory) exhaustion? Seems like that would involve additional symptoms, though.

Does your other (working) RHEL system share the same iptables and kernel versions as the borked system?
 
  


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
iptables; ACK/SYN/etc; understand the bits, and potential firewall entries TheLinuxDuck Linux - Security 2 10-18-2011 09:17 PM
TCP handshake fails, SYN/ACK ignored by system. xnomad Linux - Networking 1 09-28-2011 11:10 AM
DNAT on first SYN ACK packet sseeley Linux - Networking 2 08-24-2010 01:33 PM
SYN, SYN_ACK but no ACK nitinarora Linux - Kernel 1 05-21-2009 06:31 PM
TCP packet flags (SYN, FIN, ACK, etc) and firewall rules TheLinuxDuck Linux - Security 12 04-28-2005 11:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:52 AM.

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