Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
    • Security
Google Cloud Platform icon
Labs

Port Forwarding with the Firewall

In this learning activity, you will need to configure port forwarding that will selectively forward web requests from one host to another.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Advanced
Last updated
Sep 17, 2025
Duration
1h 0m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Verify port 80 is open on `Server1` and `Server2`

    You will want to verify that content is being served over port 80 on both Server1 and Server2.

    From Client1:

    Once logged into Client1, you can verify web content availability from Server1 and Server2 with these commands:

    curl 10.0.1.10

    curl 10.0.1.20

  2. Challenge

    Create a Zone named `testing` to Handle the Subnet Requests

    On Server1:

    Create a new firewall zone:

    firewall-cmd --permanent --new-zone=testing

    Reload the configuration, to pick up the new zone:

    firewall-cmd --reload

    Add the subnet as the source :

    firewall-cmd --permanent --zone=testing --add-source=10.0.1.0/24

    Make sure http as a service is added:

    firewall-cmd --permanent --zone=testing --add-service=http

    Reload the configuration to pick up these changes:

    firewall-cmd --reload

  3. Challenge

    Enable Masquerading for the Zone

    You will need to enable masquerading for the zone, in order to permit forwarding:

    firewall-cmd --permanent --zone=testing --add-masquerade

    Reload to pick up the new configuration:

    firewall-cmd --reload

  4. Challenge

    Add the Forwarding Rule to the Zone

    You will need to add the rule to forward the traffic coming in to the zone on port 80 out to 10.0.1.20:80:

    firewall-cmd --permanent --zone=testing --add-forward-port=port=80:proto=tcp:toport=80:toaddr=10.0.1.20

    Reload the configuration:

    firewall-cmd --reload

  5. Challenge

    Confirm the Port is Forwarded

    Confirm the port forward by running curl on the site from Client1:

    curl 10.0.1.10

About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight