N
N
Northxstar2019-03-31 10:24:43
linux
Northxstar, 2019-03-31 10:24:43

How to programmatically control packet forwarding in Python?

Situation: there is a hypothetical server/firewall with two interfaces: eth0 - looks to the open network, eth1 to the internal one.
Task: to manage the forward packet from eth0 to eth1 at the level of a single packet. For example, we caught a packet from eth0 using PyShark, parsed it, checked it, and if everything suits us, we forward it to eth1. Working on Linux

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valentin, 2019-03-31
@vvpoloskin

Packet forwarding is done at the kernel level, there is no smell of python there. It is necessary to cut some custom module to netfilter. In python, you can make something like a proxy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question