How to programmatically control the forwarding of packets in Python?

Situation: there is a hypothetical server/firewall with two interfaces: eth0 - looks in the public network, eth1 is the internal.
The task of driving forward the packet from eth0 to eth1 on the level of a single package. For example, eth0 caught the package using PyShark, took it apart, checked out, and if we are all happy, sent it to eth1. Run on Linux
March 19th 20 at 09:22
1 answer
March 19th 20 at 09:24
Forwarding of packets is done at the kernel level, a Python there is no smell. Politicali need some custom module to netfilter. In Python can do some semblance of a proxy.

Find more questions by tags Computer networksPythonLinux