diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index f81cfe787c..52c9ac9686 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -99,6 +99,12 @@ transfer_mode tentacle # Proxy timeout (by default 1s) # proxy_timeout 1 +# Address the proxy will listen on. +#proxy_address 0.0.0.0 + +# Port the proxy will listen on. +#proxy_port 41121 + # User the agent will run as #pandora_user root diff --git a/pandora_agents/unix/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf index f0f43f80e0..74b2a8f974 100644 --- a/pandora_agents/unix/Darwin/pandora_agent.conf +++ b/pandora_agents/unix/Darwin/pandora_agent.conf @@ -129,6 +129,12 @@ transfer_mode tentacle # Proxy timeout (by default 1s) # proxy_timeout 1 +# Address the proxy will listen on. +#proxy_address 0.0.0.0 + +# Port the proxy will listen on. +#proxy_port 41121 + # Number of threads to execute modules in parallel #agent_threads 1 diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index 33b2fe1271..db63f1f73e 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -142,6 +142,12 @@ remote_config 0 # Proxy timeout (by default 1s) #proxy_timeout 1 +# Address the proxy will listen on. +#proxy_address 0.0.0.0 + +# Port the proxy will listen on. +#proxy_port 41121 + # Number of threads to execute modules in parallel #agent_threads 1 diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf index 717a1e6e2a..9223a5a1de 100644 --- a/pandora_agents/unix/HP-UX/pandora_agent.conf +++ b/pandora_agents/unix/HP-UX/pandora_agent.conf @@ -101,6 +101,12 @@ transfer_mode tentacle # Proxy timeout (by default 1s) # proxy_timeout 1 +# Address the proxy will listen on. +#proxy_address 0.0.0.0 + +# Port the proxy will listen on. +#proxy_port 41121 + # User the agent will run as #pandora_user root diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index 36ea7c62de..12ca32271b 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -148,6 +148,12 @@ remote_config 0 # Proxy timeout (by default 1s) # proxy_timeout 1 +# Address the proxy will listen on. +#proxy_address 0.0.0.0 + +# Port the proxy will listen on. +#proxy_port 41121 + # Number of threads to execute modules in parallel #agent_threads 1 diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf index fafa8485f6..e05fe8f5ab 100644 --- a/pandora_agents/unix/NetBSD/pandora_agent.conf +++ b/pandora_agents/unix/NetBSD/pandora_agent.conf @@ -110,6 +110,12 @@ transfer_mode tentacle # Proxy timeout (by default 1s) #proxy_timeout 1 +# Address the proxy will listen on. +#proxy_address 0.0.0.0 + +# Port the proxy will listen on. +#proxy_port 41121 + # Number of threads to execute modules in parallel #agent_threads 1 diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf index a533c29424..e34cd04dc9 100644 --- a/pandora_agents/unix/SunOS/pandora_agent.conf +++ b/pandora_agents/unix/SunOS/pandora_agent.conf @@ -104,6 +104,12 @@ transfer_mode tentacle # Proxy timeout (by default 1s) #proxy_timeout 1 +# Address the proxy will listen on. +#proxy_address 0.0.0.0 + +# Port the proxy will listen on. +#proxy_port 41121 + # User the agent will run as #pandora_user root diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 392ec0326d..b929319ce4 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -192,6 +192,8 @@ my %DefaultConf = ( 'udp_server_port' => 41122, 'udp_server_auth_address' => '0.0.0.0', 'udp_server' => 0, + 'proxy_address' => '0.0.0.0', + 'proxy_port' => 41121, 'proxy_mode' => 0, 'proxy_max_connection' => 10, 'proxy_timeout' => 1, @@ -1383,7 +1385,7 @@ sub launch_tentacle_proxy () { if ($tentacle_pid == 0) { #Execute tentacle server as a daemon - my $new_process = "tentacle_server -b ".$Conf{'server_ip'}." -g ".$Conf{'server_port'}." -c ".$Conf{'proxy_max_connection'}." -t ".$Conf{'proxy_timeout'}; + my $new_process = "tentacle_server -a ".$Conf{'proxy_address'}." -p ".$Conf{'proxy_port'}." -b ".$Conf{'server_ip'}." -g ".$Conf{'server_port'}." -c ".$Conf{'proxy_max_connection'}." -t ".$Conf{'proxy_timeout'}; $new_process .= ' -C' if ($Conf{'server_ssl'} eq '1'); diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index 91aee94a6f..ab6133694c 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -99,6 +99,12 @@ server_port 41121 # Proxy timeout (by default 1s) # proxy_timeout 1 +# Address the proxy will listen on. +#proxy_address 0.0.0.0 + +# Port the proxy will listen on. +#proxy_port 41121 + # Enable or disable XML buffer. xml_buffer 1 diff --git a/pandora_agents/win32/pandora_windows_service.cc b/pandora_agents/win32/pandora_windows_service.cc index 4f14f2b7c5..3dd80d2a15 100644 --- a/pandora_agents/win32/pandora_windows_service.cc +++ b/pandora_agents/win32/pandora_windows_service.cc @@ -424,7 +424,7 @@ Pandora_Windows_Service::killTentacleProxy() { int Pandora_Windows_Service::launchTentacleProxy() { string server_ip, server_port, proxy_max_connections, proxy_timeout, server_ssl; - string proxy_cmd; + string proxy_cmd, proxy_address, proxy_port; PROCESS_INFORMATION pi; STARTUPINFO si; @@ -460,7 +460,19 @@ Pandora_Windows_Service::launchTentacleProxy() { proxy_cmd = "tentacle_server.exe"; } - proxy_cmd += " -b " + server_ip + " -g " + server_port + " -c " + proxy_max_connections + " -t " + proxy_timeout; + // Proxy address. + proxy_address = conf->getValue("proxy_address"); + if (proxy_address == "") { + proxy_address = "0.0.0.0"; + } + + // Proxy port. + proxy_port = conf->getValue("proxy_port"); + if (proxy_port == "") { + proxy_port = "41121"; + } + + proxy_cmd += " -b " + server_ip + " -g " + server_port + " -c " + proxy_max_connections + " -t " + proxy_timeout + " -a " + proxy_address + " -p " + proxy_port; ZeroMemory (&si, sizeof (si)); ZeroMemory (&pi, sizeof (pi));