yum firewall demo - michaelmworthington/codesamples GitHub Wiki

Introduction

This page walks through the steps to set up NXRM and a CentOS Docker container to test YUM Firewall using http://mirror.pnl.gov/epel/7Server/x86_64/

See the official docs at  https://help.sonatype.com/repomanager3/formats/yum-repositories

Table of Contents

Prerequisites

  • IQ Server installed and running
  • NXRM 3 installed and running and configured with the IQ Server
  • Docker for Mac installed and running

Step 1. Create a new Proxy Repository in NXRM

Use http://mirror.pnl.gov/epel/7Server/x86_64/ as the Remote URL. Accept default values for the remainder of the settings.

Step 2. Enable Firewall for the New Proxy Repo

Step 3. Run the Docker Image in Interactive Mode

docker run -it --rm centos

Step 4. Set up the repo sources

/etc/yum.repos.d/nexus.repo

[nexus]
name=Nexus Repository
baseurl=http://host.docker.internal:8083/nexus/repository/yum-epel/
enabled=1
gpgcheck=0
metadata_expire=30s
autorefresh=1
priority=1

Step 5. Use yum to Install a package

yum install nginx

Step 6. Browse the Proxy Repo

Step 7. Go to the Firewall Report

Repo List

IQ Server Report

Step 8. Test Quarantine

Nagios 4.3 has CVE-2017-14312 with CVSS 7.8, so you'll need to have Quarantine enabled in the capability you created in step 2 and Proxy=Fail in your Security-High policy in IQ Server

yum install nagios

Console Output

Repo List

IQ Server Report

Step 9. Notes

The NXRM Tree View shows the Quarantined component:

You can reproduce the 403 - Quarantined error by clicking on the "Path" link: http://host.docker.internal:8083/nexus/repository/yum-epel/Packages/n/nagios-4.3.4-3.el7.x86_64.rpm

You can view the component information panel (CIP) right in NXRM

⚠️ **GitHub.com Fallback** ⚠️