http URLs under /etc/yum.repos.d to be replaced by https.

Support for security such as Firewalls and securing linux
Post Reply
rb665848
Posts: 3
Joined: 2023/03/06 18:20:54

http URLs under /etc/yum.repos.d to be replaced by https.

Post by rb665848 » 2023/03/06 19:17:36

CentOS 7:
The yum repo files under /etc/yum.repos.d have the below http URLs, but we have a requirement wherein we need to use only the https URLs.

http://vault.centos.org
http://debuginfo.centos.org
http://mirror.centos.org
http://mirrorlist.centos.org

Can you please let me know what are the equivalent https URLs for the above ones?

Thank you,
Ramakrishna Battula.

Whoever
Posts: 1357
Joined: 2013/09/06 03:12:10

Re: http URLs under /etc/yum.repos.d to be replaced by https.

Post by Whoever » 2023/03/07 17:53:18

Did you try simply replacing the "http" with "https"? Those URLs appear to redirect to https anyway!

Code: Select all

wget  http://vault.centos.org
--2023-03-07 09:52:35--  http://vault.centos.org/
Resolving vault.centos.org... 13.227.74.77, 13.227.74.121, 13.227.74.56, ...
Connecting to vault.centos.org|13.227.74.77|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://vault.centos.org/ [following]
--2023-03-07 09:52:35--  https://vault.centos.org/
Connecting to vault.centos.org|13.227.74.77|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’

index.html              [ <=>                ]  27.29K  --.-KB/s    in 0.004s  

2023-03-07 09:52:35 (6.69 MB/s) - ‘index.html’ saved [27947]

rb665848
Posts: 3
Joined: 2023/03/06 18:20:54

Re: http URLs under /etc/yum.repos.d to be replaced by https.

Post by rb665848 » 2023/03/08 07:06:10

Hi,
Thanks for your reply.
Sorry, the first URL is mistakenly given, but the rest don't redirect to https. I need the equivalent https URLs for them(given below).

http://debuginfo.centos.org
http://mirror.centos.org
http://mirrorlist.centos.org

Thanks in advance.

Whoever
Posts: 1357
Joined: 2013/09/06 03:12:10

Re: http URLs under /etc/yum.repos.d to be replaced by https.

Post by Whoever » 2023/03/09 17:42:51

I think you are going to have to find a specific mirror that supports https and use that URL in your repo files. For example:
https://ftp.dimensiondata.com/mirror/centos/7/

Why are you doing this? The packages are signed and the signatures are checked before the packages are used.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: http URLs under /etc/yum.repos.d to be replaced by https.

Post by TrevorH » 2023/03/09 18:11:47

The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

rb665848
Posts: 3
Joined: 2023/03/06 18:20:54

Re: http URLs under /etc/yum.repos.d to be replaced by https.

Post by rb665848 » 2023/03/10 09:10:33

The reason for replacing http with https is that port 80 is blocked in our organization due to security issues.

Thank you.

Post Reply