Blocked packets that should be accepted by iptables
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Blocked packets that should be accepted by iptables
Hi everyone,
I noticed that iptables is blocking a few packets that it should accept because they're ESTABLISHED,RELATED packets.
While researching for it, it seems that it is because of connection tracking.
For example: someone opens my web site, and iptables lets it all pass. But the person leaves the browser open for a long time. When he closes the browser, a packet is blocked... sometimes is an ACK FIN packet... sometimes is a FIN packet.... sometimes is a RST packet.
Is this normal? Does it compromise the connection from my customers? How long is the connection tracking timeout? (I mean, after how long does the connection tracking stops seeing the packet as an ESTABLISHED packet).
Right there it is going to be a syn packet, initial state, not established. So I don't think the problem is with packet states. If you are hosting a website, it would be best to allow all port 80 packets to your web server, regardless of state.
Mainly you only want to worry about state on connections coming back in from a connection you initialized from your LAN.
I know this doesn't answer the question you asked, just my
IIRC the kernel conntrack table flush is equiv of aprox 3 days (kernel headers), so I don't think there's a problem there. Locally and client-side set values like OS TCP connection timeout, daemon or browser session timeout or keepalives will probably time out much earlier. What you're probably seeing is an attempt by the clients OS to close the connection properly and has no effect on any by then already closed browsing session.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.