S
S
shell_guy2022-01-17 16:07:49
Docker
shell_guy, 2022-01-17 16:07:49

The Python script does not scan the network from a self-built docker container. Why?

I packed a python script into a custom docker container for arp scanning devices on the network, when I go to the web face of the script that is generated from a self-made docker container, then all devices are offline.

And when I run the script without docker through python3, it normally determines the IP / MAC addresses of devices.
Even though I enabled forwarding from Docker containers to the outside world

Configured the Linux kernel to allow IP forwarding:

sysctl net.ipv4.conf.all.forwarding=1

Changed the policy for iptables:

sudo iptables -P FORWARD ACCEPT

and still not showing up hosts
Please tell me what I'm missing.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Barbolin, 2022-01-17
@dronmaxman

sysctl net.ipv4.conf.all.forwarding=1

In my opinion, you do not understand how the L2 layer of the OSI model works.
https://docs.docker.com/network/macvlan/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question