Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • The issue is that sometimes some datagrams don't reach the machine?
    – nKn
    Commented Jan 12, 2016 at 19:50
  • They drop almost everytime when they are not used in way stated in 3rd paragraph. Added further description in 3rd and 4th paragraph.
    – Aki
    Commented Jan 12, 2016 at 20:05
  • Sounds like the things that work are triggering the "RELATED,ESTABLISHED" rules, causing your other (wrong) rules to be skipped. (In particular, UDP has no ESTABLISHED connection state, but iptables may consider UDP packets to be RELATED to earlier UDP or TCP packets)
    – Ben Voigt
    Commented Jan 12, 2016 at 20:08
  • UDP is a stateless unreliable protocol, that means that nobody guarantees that all datagrams will reach their destination. There's neither a concept like a "established" connection when talking about UDP; so if it's not a 100% drop issue, I'd check if it could be related to the own protocol's nature
    – nKn
    Commented Jan 12, 2016 at 20:08
  • I strongly suggest using the iptables match counters for debugging this. Run iptables with the -v option both before and after attempting netcat, see which rules have increased in match count.
    – Ben Voigt
    Commented Jan 12, 2016 at 20:09