You need a quick internal HTTP proxy so isolated hosts can download packages. What would you set up?
IntermediateScenarioNetworking, SSH and remote access
Answer
Situation read → Forward proxy with an allowlist.
What I'd do →
- Install Squid on a host with internet; in
squid.conf:
acl internal src 10.0.0.0/8
acl repos dstdomain .ubuntu.com .rockylinux.org .docker.io
http_access allow internal repos
http_access deny all
http_port 3128
- On clients:
proxy=http://proxy.internal:3128in/etc/dnf/dnf.conforAcquire::http::Proxy "http://proxy.internal:3128";in apt config.
Why → You control and log egress without giving hosts full internet.
Interview tip → For scale, a local mirror or Artifactory/Nexus proxy repo is better than a generic proxy.
More on Networking, SSH and remote access
A key belonging to a departed engineer may be in `authorized_keys` on 300 servers. How do you rotate SSH keys across the fleet?IntermediateYou need to reach a database on a private subnet from your laptop through a bastion. How?BeginnerYour security team wants SSH hardened on all servers. What changes do you make?BeginnerA new server needs a static IP, gateway and DNS on RHEL 9. How do you configure it persistently?BeginnerYou're changing the network config of a remote server over SSH and could lose access. How do you protect yourself?IntermediateA web server should accept HTTP/HTTPS from anywhere but SSH only from the office. Configure the firewall.Beginner