How can I connect to a tentacle through Squid Proxy?

I have a number of virtual machines running Listening Tentacles that I want to connect to. They are on a private network accessible only through the VM host.

Can I connect to them via Squid Proxy?

Configuring Squid Proxy

Note: I am not a Squid Proxy expert. This solution is an example and may require more configuration before it is ready for a production environment.

Starting configuration:

  • Squid is running on hostname octavius.lan
  • The tentacles have IP address private to the VM host.
  • Octopus is running on a server on the same network as the VM host and has an IP address in the 192.168.1.0/24 range.

Here is a configuration that allows the VM host and the local network to make requests to the tentacles through Squid.

http_port 3128

acl localhost src 127.0.0.1/255.255.255.255
acl localnet src 192.168.1.0/24
acl SSL_ports port 10933
acl Safe_ports port 10933
acl CONNECT method CONNECT

# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports

http_access allow localhost
http_access allow localnet
http_access deny all

Configuring Octopus

The first item to configure in Octopus is the Machine Proxy. This is found at Infrastructure > Machine Proxies.

After configuring the proxy, we can register our tentacle with the IP address that isn’t normally accessible from the Octopus server, but can be via Squid. The key here is to choose the Squid Proxy in the Proxy setting of the Tentacle settings.