khast3x / Redcloud

Automated Red Team Infrastructure deployement using Docker
MIT License
1.21k stars 202 forks source link

redcloud.py defaults to external network IP #23

Closed spurgelaurels closed 3 years ago

spurgelaurels commented 3 years ago

redcloud.py, line 17 has this: GET_IP = "curl -4 -s icanhazip.com"

This breaks for local installs, although works wonderfully for AWS or other cloud installs.

I tried to update with the following, but however this python script is parsing system commands it does not like pipes. GET_IP = $(ip -4 addr show wlp0s20f3 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')

It also seems that any place GET_IP is used is only a cmd call, so I can't override this by adding my local IP directly, without a lot of refactoring.

For now I've added a getlocalip script to my ~/bin folder containing ip -4 addr show wlp0s20f3 | grep -oP '(?<=inet\s)\d+(\.\d+){3}' and now line 17 reads as GET_IP = "getlocalip"

spurgelaurels commented 3 years ago

So for some reason even that getlocalip hack above was giving me gateway errors and 404s on the links provided. Tried reinstalling the whole stack and starting over and similar outcome.

I believe I may have misunderstood the problem here... The above IP command seems to be for guidance purposes only, and not for actually configuring the proxies or containers. I will explore and come back to this

khast3x commented 3 years ago

Yes this was mainly focused on external deployment. Let us know how it goes on your side, and if you want to contribute a PR we'll happily review it.

Cheers!

spurgelaurels commented 3 years ago

I'm going to close this for now and revisit if I figure out why this happened... But after installing, the docker containers seemed to be running, but all the Traefik routes would 404 or give a gateway error. For some reason, today I was able to load the Traefik page at /api, but the Portainer container had died. After a re-install, everything came up working just fine at https://localhost.

I feel like it was probably something on my system.... :D