Skip to content

Commit

Permalink
Add fail2ban and firewall
Browse files Browse the repository at this point in the history
  • Loading branch information
DO1JLR committed Dec 31, 2020
1 parent 1505e8b commit 5d87247
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@
[submodule "roles/goaccess"]
path = roles/goaccess
url = https://github.com/roles-ansible/ansible_role_goaccess.git
[submodule "roles/geerlingguy.firewall"]
path = roles/geerlingguy.firewall
url = https://github.com/geerlingguy/ansible-role-firewall.git
[submodule "roles/robertdebock.fail2ban"]
path = roles/robertdebock.fail2ban
url = https://github.com/robertdebock/ansible-role-fail2ban.git
9 changes: 8 additions & 1 deletion host_vars/web01.l3d.space.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,12 @@ nginx_sites:
- name: 'c3woc.cn'
- name: 'www.c3woc.cn'


acme_notification_email: "acme_{{ inventory_hostname }}@l3d.yt"

# firewall
firewall_allowed_tcp_ports:
- "22"
- "25"
- "80"
- "443"
fail2ban_destemail: "fail2ban_notify_{{ inventory_hostname }}@l3d.yt"
1 change: 1 addition & 0 deletions roles/geerlingguy.firewall
Submodule geerlingguy.firewall added at adb052
1 change: 1 addition & 0 deletions roles/robertdebock.fail2ban
Submodule robertdebock.fail2ban added at a354bc
2 changes: 2 additions & 0 deletions site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
- { role: dotfiles, tags: [default,dotfiles]}
- { role: ssh_auth, tags: [default,users]}
- { role: sshd, tags: [default,users]}
- { role: geerlingguy.firewall, tags: [default,firewall], become: true}
- { role: robertdebock.fail2ban, tags: [default,fail2ban], become: true}

- name: deploy web config
hosts: web
Expand Down

0 comments on commit 5d87247

Please sign in to comment.