...
In the interest of security, you should always employ a firewall on your CAS server.
...
Option 1(Recommended): Configure UFW
UFW, or Uncomplicated Firewall, is a simplified firewall management interface. It controls “iptables” without the college degree. UFW is included (by default) with Ubuntu. These instructions will restrict access solely to your terminals and those people with whom you deliberately share access to CAS.
...