Skip to content

Instantly share code, notes, and snippets.

@chadgeary
Last active February 10, 2021 15:43
Show Gist options
  • Select an option

  • Save chadgeary/19c4ff13a28792caa584a53e43c27ab8 to your computer and use it in GitHub Desktop.

Select an option

Save chadgeary/19c4ff13a28792caa584a53e43c27ab8 to your computer and use it in GitHub Desktop.
open5335
tee ~/open5335.yml << EOM
---
- name: open 5335
hosts: localhost
gather_facts: true
become: true
tasks:
- name: iptables accept unbound 5335 TCP
iptables:
chain: INPUT
protocol: tcp
destination_port: '5335'
ctstate: 'NEW'
jump: ACCEPT
action: insert
rule_num: '8'
- name: iptables accept unbound 5335 udp
iptables:
chain: INPUT
protocol: udp
destination_port: '5335'
ctstate: 'NEW'
jump: ACCEPT
action: insert
rule_num: '7'
- name: iptables Persistent
shell: |
iptables-save
EOM
ansible-playbook open5335.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment