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

Add option to allow from specific source #5

Open
rohankrishnadev opened this issue Oct 9, 2020 · 1 comment
Open

Add option to allow from specific source #5

rohankrishnadev opened this issue Oct 9, 2020 · 1 comment

Comments

@rohankrishnadev
Copy link

Proposed feature

Add option for users to be able to configure source IP for a particular rule.

Rationale

As of now the firewall rules allow access from 0.0.0.0/0 but it would be useful to restrict the source to a certain IPs. For example, when I run a web server I'd like to allow access only from cloudflare IPs.

Additional context

If source IP isn't specified, then 0.0.0.0 can be used as default. Both firewall-cmd and ufw are able to support this.

Please consider sponsoring me.

@dgibbs64
Copy link

dgibbs64 commented Jul 5, 2022

ufw example here

- name: Allow all access from RFC1918 networks to this host
  community.general.ufw:
    rule: allow
    src: '{{ item }}'
  loop:
    - 10.0.0.0/8
    - 172.16.0.0/12
    - 192.168.0.0/16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants