0

I started messing with docker and DVWA, I've noticed that the docker DVWA's enviroment is binded to the localhost (127.0.0.1). I wanted to bind it to a real address in order to mess with it from another machine but keeps outputting the following error:

$ docker run --rm -it -p 192.168.0.103:80:80 vulnerables/web-dvwa
docker: Error response from daemon: driver failed programming external connectivity on endpoint epic_nightingale (8c5df17c4fd03285279064b1bcb4a355327367fdf92aab639d2584869e76e5c2): Error starting userland proxy: listen tcp 192.168.0.103:80: bind: cannot assign requested address.

I verified that the assigned ip wasn't being used and the port as well. Finally I just wanted to know if what I'm trying to do is even possible and if so how can I achieve it?

chyxo
  • 19
  • 4
  • Is the `192.168.0.103` address already configured on one of your host's interfaces? – David Maze Feb 26 '23 at 14:20
  • @DavidMaze I mean I’ve made arp requests and checked what ip’s are connected to the network and so far seems not being used by any device – chyxo Feb 26 '23 at 14:27
  • Docker won't reconfigure the host's network interfaces. If the host doesn't already have that IP address then `docker run -p` won't bind to it, with pretty much exactly that error. – David Maze Feb 26 '23 at 14:30
  • (Please make sure your questions are actually about programming, as described in the [help/on-topic]. This might be better asked on another Stack Exchange site with a different focus, like [unix.se], [devops.se], or [sf].) – David Maze Feb 26 '23 at 14:31

0 Answers0