Skip to content

Instantly share code, notes, and snippets.

@jatrost
Last active February 13, 2017 19:10
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jatrost/90eaa3bed53869067e6cb11bd6a5d2ec to your computer and use it in GitHub Desktop.

For each of the files below, make sure the proxy settings are added (and obviously change the user/pass/domain/port)

These need to be set for both the MHN server and the honey systems you intend to deploy on (assuming the honeypots are behind the firewall).

/etc/environment

ALL_PROXY=http://user:password@your.corporate.proxy.hostname.com:8080
HTTP_PROXY=http://user:password@your.corporate.proxy.hostname.com:8080
HTTPS_PROXY=http://user:password@your.corporate.proxy.hostname.com:8080
http_proxy=http://user:password@your.corporate.proxy.hostname.com:8080
https_proxy=http://user:password@your.corporate.proxy.hostname.com:8080

/etc/apt/apt.conf.d/95proxies

Acquire::http::proxy "http://user:password@your.corporate.proxy.hostname.com:8080";
Acquire::https::proxy "http://user:password@your.corporate.proxy.hostname.com:8080";
Acquire::ftp::proxy "http://user:password@your.corporate.proxy.hostname.com:8080";

~/.gitconfig

[http]
	proxy = http://user:password@your.corporate.proxy.hostname.com:8080

Commands:

These commands will make the above changes.

PROXY='http://user:password@your.corporate.proxy.hostname.com:8080'

grep -F "$PROXY" /etc/environment || cat >> /etc/environment <<EOF
ALL_PROXY=$PROXY
http_proxy=$PROXY
HTTP_PROXY=$PROXY
https_proxy=$PROXY
HTTPS_PROXY=$PROXY
EOF

cat > /etc/apt/apt.conf.d/95proxies << EOF
Acquire::http::proxy "$PROXY";
Acquire::https::proxy "$PROXY";
Acquire::ftp::proxy "$PROXY";
EOF

git config --global --add http.proxy "$PROXY"

If done immediately before installing MHN or a honeypot, be sure to run this right after the above commands:

source /etc/environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment