Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firewalld module should support creation of port forwards #28349

Closed
seafoodbuffet opened this issue Aug 17, 2017 · 6 comments
Closed

firewalld module should support creation of port forwards #28349

seafoodbuffet opened this issue Aug 17, 2017 · 6 comments

Comments

@seafoodbuffet
Copy link

@seafoodbuffet seafoodbuffet commented Aug 17, 2017

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.

@ansibot
Copy link
Contributor

@ansibot ansibot commented Aug 17, 2017

@geoffreywiseman
Copy link

@geoffreywiseman geoffreywiseman commented Jan 25, 2018

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

@ansibot ansibot added feature and removed feature_idea labels Mar 2, 2018
@mikehardenize
Copy link

@mikehardenize mikehardenize commented Apr 30, 2018

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
@maxamillion
Copy link
Contributor

@maxamillion maxamillion commented Apr 30, 2018

@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.

@maxamillion
Copy link
Contributor

@maxamillion maxamillion commented Apr 30, 2018

@ansibot
Copy link
Contributor

@ansibot ansibot commented Aug 12, 2020

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

@ansibot ansibot added the bot_closed label Aug 12, 2020
@ansibot ansibot closed this Aug 12, 2020
@ansible ansible locked and limited conversation to collaborators Sep 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.