Skip to content

Commit

Permalink
Merge pull request #619 from jackieklaura/fix/safer-docker-port-mapping
Browse files Browse the repository at this point in the history
fix: use safer default for docker port mapping
  • Loading branch information
digininja committed Mar 13, 2024
2 parents 9ca729d + 14f8e94 commit 1232568
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.id.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,14 @@ Sebagai contoh, Anda dapat mengubah

```
ports:
- 4280:80
- 127.0.0.1:4280:80
```

Menjadi

```
ports:
- 8806:80
- 127.0.0.1:8806:80
```

DVWA sekarang dapat diakses di `http://localhost:8806`.
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,18 +335,24 @@ For example, you can change

```yml
ports:
- 4280:80
- 127.0.0.1:4280:80
```

to

```yml
ports:
- 8806:80
- 127.0.0.1:8806:80
```

DVWA is now accessible at `http://localhost:8806`.

In cases in which you want DVWA to not only be accessible exclusively from your own device, but
on your local network too (e.g. because you are setting up a test machine for a workshop), you
can remove the `127.0.0.1:` from the port mapping (or replace it with you LAN IP). This way it
will listen on all available device. The safe default should always be to only listen on your
local loopback device. After all, it is a damn vulnerable web application, running on your machine.

#### DVWA auto starts when Docker runs

The included [`compose.yml`](./compose.yml) file automatically runs DVWA and its database when Docker starts.
Expand Down
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
networks:
- dvwa
ports:
- 4280:80
- 127.0.0.1:4280:80
restart: unless-stopped

db:
Expand Down

0 comments on commit 1232568

Please sign in to comment.