Skip to content

Instantly share code, notes, and snippets.

@linux-modder
Last active May 14, 2018 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linux-modder/0c4a3b2cb78c02007711db889001e30e to your computer and use it in GitHub Desktop.
Save linux-modder/0c4a3b2cb78c02007711db889001e30e to your computer and use it in GitHub Desktop.
- name: Set defaults for firewall # (For security purposes,reject anything not started by an internal connection, only allow via service/port)
firewalld:
enabled: true
become: true
command: firewall-cmd --set-default-zone=drop --permanent
command: firewall-cmd --add-interface={eth0,lo,docker0} --permanent
command: firewall-cmd --add-services={ssh,cockpit,mosh,git,jenkins,kerberos,ldaps,squid,rsyncd} --permanent
command: firewall-cmd --add-port={14623/tcp,1829/tcp,1829/udp,2620/tcp,2620/udp} --permanent
command: firewall-cmd --service=ssh --set-source-port=14623/tcp --set-destination-port=111/tcp --permanent
command: firewall-cmd --zone=dmz --set-source-port=111/tcp --set-destination-port=1829/tcp --permanent
command: firewall-cmd --complete-reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment