"python -m http.server" takes too long when binding to all interfaces

It takes about 2 minutes to start this python server. but when binding to a specific interface, e.g 127.0.0.1 or the “host-only” interface, it’s almost instant.

Also, when tried against every IP returned by the command ip a | grep inet\ it starts in a flash.

Why is that?
P.S my pc specs are high, the VM has 4 GB Ram allocated, and 2 cpu cores.

1 Like

Works pretty quick here. Have you tried running it with -v flags to increase verbosity to see what it’s doing and perhaps what’s blocking it?

1 Like

Is it perhaps an ipv6 issue?

1 Like