Skip to content

Commit

Permalink
improve documentation
Browse files Browse the repository at this point in the history
we have elected to define networks in IT-Handbook
added clearer examples that use this #5559

Our previous values matched a format that is no longer true

Co-authored-by: Vickie Karasic <[email protected]>
  • Loading branch information
kayiwa and VickieKarasic committed Dec 20, 2024
1 parent 7ee0f8d commit db67906
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
2 changes: 1 addition & 1 deletion group_vars/all/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ ufw_campus_and_vpn:
- 172.20.95.0/24 # Princeton VPN Subnet 1
- 172.20.192.0/19 # Princeton VPN Subnet 2
ufw_libnet:
- 128.112.0.0/16 # Princeton Wired
- 128.112.0.0/16 # Princeton Wired (Historically Forrestal Network)
- 128.112.200.0/21 # PU Subnet - LibNet
# Disallow
# - 10.8.0.0/15 #Princeton Eduroam Secure Servicenet
Expand Down
23 changes: 5 additions & 18 deletions roles/ufw_firewall/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# UFW Firewall Role

This Ansible role configures the Uncomplicated Firewall (UFW) on our Linux systems. It allows you to define allowed and denied networks and ports, making it easy to manage your firewall rules.
This Ansible role configures the Uncomplicated Firewall (UFW) on our Linux systems. It allows you to define allowed and denied networks and ports, making it easy to manage your firewall rules. Further descriptions of the networks will be on [IT-Handbook](https://github.com/pulibrary/pul-it-handbook)

## Requirements

Expand All @@ -16,24 +16,11 @@ the examples below allow ssh, http, and redis to those CIDR subnets. For ssh mak
```yaml
ufw_firewall_rules:
- protocol: tcp
source: 10.249.64.0/18
port: 22
action: ACCEPT
- protocol: tcp
source: 128.112.200.0/21
protocol: tcp
allowed_cidrs:
- 128.112.200.0/21
- service: http
protocol: tcp
allowed_cidrs: "{{ ufw_campus_and_vpn }}"
- service: http
source: "{{ ufw_campus_and_vpn }}"
port: 80
action: ACCEPT
- protocol: tcp
source: 128.112.200.0/21
protocol: tcp
allowed_cidrs:
- 128.112.200.0/21
- 128.112.0.0/16
source: "{{ ufw_libnet }}"
port: 22
action: ACCEPT
```
2 changes: 1 addition & 1 deletion roles/ufw_firewall/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ufw_firewall_rules:
- service: ssh
port: 22
protocol: tcp
allowed_cidrs: "{{ ufw_campus_and_vpn }}"
allowed_cidrs: "{{ ufw_campus_and_vpn }}"
# example of http in your group_vars/project
# - service: http
# port: 80
Expand Down

0 comments on commit db67906

Please sign in to comment.