Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Firewall command for removing all sources and services?

    Posted on

    I have a firewalld zone set up like so:

    # firewall-cmd --info-zone internal
    internal (active)
      [...]
      sources: 1.1.1.1/24 1.2.1.1/24
      services: ssh custom_service
      [...]
    

    Is there a command that will remove all sources and all services from this zone without specifying them?

    I'm trying to write a script that cleans out the zone entirely, then writes out the sources / services correctly for a new zone.

    I am looking for something like:

    # firewall-cmd --zone internal --remove-source=*
    # firewall-cmd --zone internal --remove-service=*
    

    Is there any wildcard I can use in this way?

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat