0

I am reading about iptables's related connection and started wondering what if I wanted to make a new protocol, which would open new related connection.

How could iptables possibly know, the new connection opened by my new protocol is related? How should be such connection opened, so iptables evaluate it as related?

I was searching on the internet for the answer for a few hours, but I can't find anything about technical details of the related connection detection.

2
  • 2
    There are (generally modules) in the kernel which describe the related ports, and the source and dest IP are known, so stuff using ports related to existing ports can be matched up. There is likely also hints in the negotiation of the original connection packets. Please dont use a system that requires related connections - its extremely painful for people who are security conscious to accommodate, and will likely break billions of end user routers in the process.
    – davidgo
    Aug 13, 2019 at 20:01
  • Writing your own protocol is going to be hugely painful as in days/weeks/months of debugging and redesigning. Only to realize there a critical flaw, and you have wasted your time. Even then your protocol is going to have to be super compelling or nobody will ever adopt it, and you will only be using it between computers at your own location. Even then you have to write linux,windows, and mac drivers and security harden them. Also the reset of the internet routers don't know your protocol so it may not even route across the internet at all.
    – cybernard
    Aug 14, 2019 at 12:45

0

You must log in to answer this question.

Browse other questions tagged .