First off, sorry for the continued trouble. We've been playing whack-a-mole here and need to get this properly fixed with our CDN provider.
@MBConsultingUK, is there a public list of DO's IP ranges? I could only find a statement that there is no such list.
If anyone is blocked, you could try the following. Just note that this is a hack and only one possible approach:
I'm on Ubuntu 18.04 and let's assume I have added the Elastic DEB repository:
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
Now fetching the binary fails with the 451 response code. But I have uploaded the binary to my DO Spaces.
Then I just install the DEB manually and ideally compare the hash, start Elasticsearch, and check that it's working as expected:
wget https://xeraa-artifacts.ams3.digitaloceanspaces.com/elasticsearch-7.7.1-amd64.deb
shasum -a 512 elasticsearch-7.7.1-amd64.deb
sudo dpkg -i elasticsearch-7.7.1-amd64.deb
sudo service elasticsearch start
curl localhost:9200
Output:
{
"name" : "ubuntu-s-1vcpu-2gb-ams3-01",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "7arXpqcdSMSRLglhqJ6JAw",
"version" : {
"number" : "7.7.1",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "ad56dce891c901a492bb1ee393f12dfff473a423",
"build_date" : "2020-05-28T16:30:01.040088Z",
"build_snapshot" : false,
"lucene_version" : "8.5.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
Now let's assume we have fixed the 451 problem and you want to install the current version. This will just work, so the manual installation of the DEB shouldn't block you further down the road (including the full output here for clarity):
sudo apt-get update && sudo apt-get upgrade
Hit:1 https://artifacts.elastic.co/packages/7.x/apt stable InRelease
Get:2 http://mirrors.digitalocean.com/ubuntu bionic InRelease [242 kB]
Hit:3 http://mirrors.digitalocean.com/ubuntu bionic-updates InRelease
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:5 http://mirrors.digitalocean.com/ubuntu bionic-backports InRelease
Fetched 242 kB in 0s (501 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
grub-pc-bin libdumbnet1
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
linux-headers-generic linux-headers-virtual linux-image-virtual linux-virtual netplan.io
The following packages will be upgraded:
elasticsearch
1 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 319 MB of archives.
After this operation, 5225 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 https://artifacts.elastic.co/packages/7.x/apt stable/main amd64 elasticsearch amd64 7.8.0 [319 MB]
Fetched 319 MB in 5s (65.1 MB/s)
(Reading database ... 61082 files and directories currently installed.)
Preparing to unpack .../elasticsearch_7.8.0_amd64.deb ...
Unpacking elasticsearch (7.8.0) over (7.7.1) ...
Setting up elasticsearch (7.8.0) ...
Created elasticsearch keystore in /etc/elasticsearch/elasticsearch.keystore
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.41) ...
sudo service elasticsearch restart
curl localhost:9200
{
"name" : "ubuntu-s-1vcpu-2gb-ams3-01",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "7arXpqcdSMSRLglhqJ6JAw",
"version" : {
"number" : "7.8.0",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "757314695644ea9a1dc2fecd26d1a43856725e65",
"build_date" : "2020-06-14T19:35:50.234439Z",
"build_snapshot" : false,
"lucene_version" : "8.5.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
Hope that helps you move forward if you are really stuck; it should also be less invasive than setting up a VPN just for this and relatively simple.