Using a proxy with NodeZero
If your organization utilizes a proxy for external traffic you will need to utilize one of the following configuration methods. With one of the below configurations in place. All traffic between the NodeZero container and cloud infrastructure will use the proxy and internal traffic will not.
Configuring a network proxy on the NodeZero host VM (OVA)
To use NodeZero with a proxy download and configure the NodeZero Host VM (OVA) located at Downloads.
The NodeZero host VM (OVA) comes with a simple script that helps adjust basic settings.
Once you have logged in and switched users with sudo su
enter the n0
command and press enter to launch the script and select option #4. Simply follow the example in the prompt when entering the URL.
Note that you’ll have to log out and back in before this change takes effect.
You are now set up to utilize a proxy for your NodeZero pentests.
Configuring a network proxy on user created host
We officially support Ubuntu as the NodeZero host, and steps for Ubuntu are described below. Other version of Linux may also work, but the configuration steps may vary
Add the following to your /etc/environment
file.
NOTE: The proxy format should be like the followinghttps://username:password@proxy-web-or-IP-address:port-number
The contents of the /etc/environment
file should look like the following.
HTTP_PROXY="your proxy settings"
HTTPS_PROXY="your proxy settings"
NO_PROXY="localhost,127.0.0.1,::1,172.17.0.0/16"
http_proxy="your proxy settings"
https_proxy="your proxy settings"
no_proxy="localhost,127.0.0.1,::1,172.17.0.0/16"
Update the docker service settings in systemd with the same environment.
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo vim /etc/systemd/system/docker.service.d/http-proxy.conf
http-proxy.conf
should look like the following.
[Service]
Environment="HTTP_PROXY=your proxy settings"
Environment="HTTPS_PROXY=your proxy settings"
Environment="NO_PROXY=localhost,127.0.0.1,::1,172.17.0.0/16"
Environment="http_proxy=your proxy settings"
Environment="https_proxy=your proxy settings"
Environment="no_proxy=localhost,127.0.0.1,::1,172.17.0.0/16"
sudo systemctl daemon-reload
sudo systemctl restart docker
Add the following to ~/.docker/config.json
The following command will create the necessary directory and file if it is not present. If it is present it will skip over it.
sudo mkdir -p /root/.docker && touch /root/.docker/config.json
If the file already exists and has entries add the following as the last entry.
sudo vim /root/.docker/config.json
, "proxies": {
"default": {
"httpProxy": "your proxy setting",
"httpsProxy": "your proxy setting",
"noProxy": "localhost,127.0.0.1,::1,172.16.0.0/16,10.0.0.0/8,192.168.0.0/16"
}
}
If the file was just created or is empty use the following.
"proxies": {
"default": {
"httpProxy": "your proxy setting",
"httpsProxy": "your proxy setting",
"noProxy":"localhost,127.0.0.1,::1,172.16.0.0/16,10.0.0.0/8,192.168.0.0/16"
}
}
You are now configured to use a proxy with NodeZero.