blacktop / docker-cuckoo

Cuckoo Sandbox Dockerfile
Other
321 stars 96 forks source link

Remove IP from docker-compose.vbox.yml bind #29

Open ghost opened 6 years ago

ghost commented 6 years ago

incorrect IP bind in docker-compose.vbox.yml, see below. changing to 2042:2042 in the Dockerfile resolves.

root@ubuntu:~/tools/newdir# git clone https://github.com/blacktop/docker-cuckoo.git
Cloning into 'docker-cuckoo'...
remote: Counting objects: 991, done.
remote: Total 991 (delta 0), reused 0 (delta 0), pack-reused 991
Receiving objects: 100% (991/991), 2.19 MiB | 0 bytes/s, done.
Resolving deltas: 100% (629/629), done.
Checking connectivity... done.
root@ubuntu:~/tools/newdir# cd docker-cuckoo/
root@ubuntu:~/tools/newdir/docker-cuckoo# docker-compose -f docker-compose.vbox.yml up
Starting dockercuckoo_mongo_1
Recreating dockercuckoo_cuckoo_1
Recreating dockercuckoo_elasticsearch_1
Starting dockercuckoo_postgres_1
Creating dockercuckoo_api_1
Recreating dockercuckoo_web_1

ERROR: for cuckoo  Cannot start service cuckoo: driver failed programming external connectivity on endpoint dockercuckoo_cuckoo_1 (3b2031976a7855e8e34f59a58e05d05dd05e8da42e7b4233abf6f50f514a03ad): Error starting userland proxy: listen tcp 192.168.56.1:2042: bind: cannot assign requested address
ERROR: Encountered errors while bringing up the project.
ilyaglow commented 6 years ago

Hello, 192.168.56.1 is the default VirtualBox host-only interface’s IP-address. While it seems inconvenient to define it explicitly, I would say it is just the sane default that I set, because I’m not sure that anyone should ever expose ports to all interfaces. At the same time if your host-only iface doesn’t have an 192.168.56.1 ip, you gotta change config files anyway. But I do not insist on my approach, so it is up to @blacktop.

pooki3bear commented 6 years ago

Per doc; have Vboxweb running, have interface @192.168.65.1 image

Cannot bind to 192.168.56.1:2402

image

blacktop commented 6 years ago

I have seen weird behavior running docker as root in the past. It sounds like @0xpookie (or @pooki3bear when they are not at work? 😉) is running it the same way you were running it right @ilyaglow ?

blacktop commented 6 years ago

We could add more automation around detecting the VirtBox IP and auto setting it inside the container?

We could also auto set config based on env vars like I'm doing here: https://github.com/blacktop/docker-kafka-alpine/blob/master/1.0/scripts/configure-kafka.sh#L56

ilyaglow commented 6 years ago

Sure, we can use env and pass it to an entrypoint script, which will do the stuff needed. The same approach could be applied for setting up vboxweb ip and user/pass pair.

faker-DemoKing commented 5 years ago

怎么扫描