Skip to content
This repository was archived by the owner on May 10, 2020. It is now read-only.

TCP packet support #2

Open
PaulFurtado opened this issue Jun 14, 2019 · 0 comments
Open

TCP packet support #2

PaulFurtado opened this issue Jun 14, 2019 · 0 comments

Comments

@PaulFurtado
Copy link

How challenging do you think it would be to add TCP support? I'm diving into the code myself and looking at potential gotchas so I'm wondering what you think as well.

Currently, it filters using icmpid, which is a great trick, but that wouldn't work for TCP. For TCP, it may be possible using a FWMARK, however, those are lost when the routing across network namespaces. Instead, I'm guessing I'd need to possibly:

  1. Create a TCP socket on the python side
  2. Bind the source port before sending any packets
  3. Connect
  4. Track every time iptables modified the source/dest IPs

Alternatively, I guess I could track the TCP sequence numbers rather than the source/dest which might be more reliable.

What do you think?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant