Skip to content

firewalld module should support creation of port forwards #28349

Closed

Description

@seafoodbuffet
ISSUE TYPE
  • Feature Idea
COMPONENT NAME

firewalld module

ANSIBLE VERSION
ansible 2.3.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.5 (default, Nov  6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
SUMMARY

The firewalld module doesn't seem to allow creation of port forwards (--add-forward-port). This would be a useful capability to add to the module.

Activity

  1. ansibot commented on Aug 17, 2017

    @ansibot
    Contributor
  2. removed
    needs_triageNeeds a first human triage before being processed.
    on Aug 17, 2017
  3. geoffreywiseman commented on Jan 25, 2018

    @geoffreywiseman

    And if it is supported already, better documentation -- since I also am inclined to believe the firewalld module doesn't support this.

  4. added
    featureThis issue/PR relates to a feature request.
    and removed on Mar 2, 2018
  5. mikehardenize commented on Apr 30, 2018

    @mikehardenize

    Although I agree that the module needs updating to support this functionality explictly and/or include documentation, I thought it was worth me posting my solution to the problem in case others have the same issue:

    - name: Redirect port 443 to 8443
      firewalld:
        rich_rule: rule family={{ item }} forward-port port=443 protocol=tcp to-port=8443
        zone:      public
        permanent: true
        immediate: true
        state:     enabled
      with_items:
        - ipv4
        - ipv6
    
  6. maxamillion commented on Apr 30, 2018

    @maxamillion
    Contributor

    @mikehardenize thanks for sharing, I'll update the examples in the firewalld module to include this.

    I would like to add the port forward directive, but it's just a matter of finding the free time. I've recently pushed in a large refactor of the module up (#37603) and once that is merged, I'll add the port forward.

  7. maxamillion commented on Apr 30, 2018

    @maxamillion
    Contributor
  8. ansibot commented on Aug 12, 2020

    @ansibot
    Contributor

    Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.

    For further information, please see:
    https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md

  9. locked and limited conversation to collaborators on Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects_2.3This issue/PR affects Ansible v2.3bot_closedfeatureThis issue/PR relates to a feature request.moduleThis issue/PR relates to a module.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions