EV Observe - Configure a Proxy on a Box
If a Box is installed on the network without direct access to the SaaS platform, you must configure a proxy to enable Internet access.
- You can configure the proxy with or without authentication.
- It will retrieve the configuration of the Box and establish the VPN link with the EV Observe platform.
Procedures
How to configure a proxy without authentication
Step 1: Configure the system
1. Run the commands below to configure and export the http_proxy and https_proxy environment variables.
Replace:
- <proxy_server> with the IP address of the proxy server
- <port> with the port of the proxy server
export http_proxy=http:/(% class="RedText_YellowBackground" %)<proxy_server>:<port>
export https_proxy=http://<proxy_server>:<port>
2. Enter the required information in the configuration file called /etc/apt/apt.conf.d/95proxies.
- Open the configuration file.
- Specify the information highlighted in yellow based on your environment.
Acquire::https::proxy "http://<proxy_server>:<port>/";
Acquire::http::proxy "http://<proxy_server>:<port>/";
Acquire::ftp::proxy "ftp://<proxy_server>:<port>/";
- Save your modifications.
3. Enter the required information in the configuration file called /etc/environment.
- Open the configuration file.
- Specify the information highlighted in yellow based on your environment.
Note: Check the domain names used in the /etc/hosts file. If required, add them in the NO_PROXY and no_proxy lines.
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
http_proxy=http://<proxy_server>:<port>/
https_proxy=http://<proxy_server>:<port>/
ftp_proxy=http://<proxy_server>:<port>/
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com,.loc"
HTTP_PROXY=http://<proxy_server>:<port>/
HTTPS_PROXY=http://<proxy_server>:<port>/
FTP_PROXY=http://<proxy_server>:<port>/
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com,.loc"
- Save your modifications.
4. Enter the required information in the configuration file called /etc/sysconfig/nagios.
- Open the configuration file.
- Specify the information highlighted in yellow based on your environment.
- Add the lines below to the end of the file.
Note: Check the domain names used in the /etc/hosts file. If required, add them in the NO_PROXY and no_proxy lines.
export http_proxy=http://<proxy_server>:<port>/
export https_proxy=http://<proxy_server>:<port>/
export ftp_proxy=http://<proxy_server>:<port>/
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com,.loc"
export HTTP_PROXY=http://<proxy_server>:<port>/
export HTTPS_PROXY=http://<proxy_server>:<port>/
export FTP_PROXY=http://<proxy_server>:<port>/
export NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com,.loc"
- Save your modifications.
- Run the commands below to restart nagios.
sudo su -
nagiosrestart
Step 2: Configure the OpenVPN service
1. Enter the required information in the configuration file called /etc/openvpn/client.conf.
- Open the configuration file.
- Uncomment by removing the hashtag # character from the http-proxy-retry and http-proxy lines.
- Specify the information highlighted in yellow based on your environment.
http-proxy-retry
http-proxy <proxy_server>: <port>
- Save your modifications.
2. Configure the Box.
See the procedure
How to configure a proxy with authentication
Step 1: Configure the system
1. Run the commands below to configure and export the http_proxy and https_proxy environment variables.
Replace:
- <proxy_server> with the IP address of the proxy server
- <port> with the port of the proxy server
export http_proxy=http://<proxy_server>:<port>
export https_proxy=http://<proxy_server>:<port>
2. Enter the required information in the configuration file called /etc/apt/apt.conf.d/95proxies.
- Open the configuration file.
- Specify the information highlighted in yellow based on your environment.
Acquire::https::proxy "http://<user>:<password>@<proxy_server>:<port>/";
Acquire::http::proxy "http://<user>:<password>@<proxy_server>:<port>/";
Acquire::ftp::proxy "ftp://<user>:<password>@<proxy_server>:<port>/";
- Save your modifications.
3. Enter the required information in the configuration file called /etc/environment.
- Open the configuration file.
- Specify the information highlighted in yellow based on your environment.
Note: Check the domain names used in the /etc/hosts file. If required, add them in the NO_PROXY and no_proxy lines.
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
http_proxy=http://<user>:<password>@<proxy_server>:<port>/
https_proxy=http://<user>:<password>@<proxy_server>:<port>/
ftp_proxy=http://<user>:<password>@<proxy_server>:<port>/
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com,.loc"
HTTP_PROXY=http://<user>:<password>@<proxy_server>:<port>/
HTTPS_PROXY=http://<user>:<password>@<proxy_server>:<port>/
FTP_PROXY=http://<user>:<password>@<proxy_server>:<port>/
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com,.loc"
- Save your modifications.
4. Enter the required information in the configuration file called /etc/sysconfig/nagios.
- Open the configuration file.
- Specify the information highlighted in yellow based on your environment.
- Add the lines below to the end of the file.
Note: Check the domain names used in the /etc/hosts file. If required, add them in the NO_PROXY and no_proxy lines.
export http_proxy=http://<user>:<password>@<proxy_server>:<port>/
export https_proxy=http://<user>:<password>@<proxy_server>:<port>/
export ftp_proxy=http://<user>:<password>@<proxy_server>:<port>/
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com,.loc"
export HTTP_PROXY=http://<user>:<password>@<proxy_server>:<port>/
export HTTPS_PROXY=http://<user>:<password>@<proxy_server>:<port>/
export FTP_PROXY=http://<user>:<password>@<proxy_server>:<port>/
export NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com,.loc"
- Save your modifications.
- Run the commands below to restart nagios.
sudo su -
nagiosrestart
Step 2: Configure the OpenVPN service
1. Run the commands below to create the environment variables.
export proxy_user=<user>export proxy_password=<password>
2. Create a configuration file to store the credentials for logging in to the proxy used by the OpenVPN client.
- Run the command below to create the file.
vim /etc/openvpn/proxy.auth
- Add the lines below.
<user>
<password>
- Save your modifications.
3. Configure the Box using the vsb_installation.pl script.
See the procedure
4. Enter the required information in the configuration file called /etc/openvpn/client.conf.
- Uncomment by removing the hashtag # character from the http-proxy-retry and http-proxy lines.
- Specify the information highlighted in yellow based on your environment.
http-proxy-retry
http-proxy <proxy_server>: <port> /etc/openvpn/proxy.auth basic
- Save your modifications.
5. Run the command below to restart the OpenVPN service.
service openvpn restart
6. Restart the Box.