firewall

Powered by Drupal

Kodi server part 7: Firewall Rules

Submitted by Sam Hobbs on

This is the seventh and final part of a multi-part tutorial describing how to configure the "perfect" Kodi media centre running on top of ubuntu server. Other parts of the tutorial may be found here:

This section deals with firewall configuration. Here you will find Uncomplicated Fire Wall (UFW) and iptables rules to prevent transmission from sending traffic using your normal wifi interface, as well as a few extra rules to secure the server against traffic from the VPN side.

Introduction to Fail2ban

Submitted by Sam Hobbs on

Fail2ban is a great little tool for system administration. In a nutshell, it watches your log files for pre-defined patterns and then executes actions if it sees them. Ususally, this is of the form "if there are more than X failed authentication attempts in Y minutes from a single IP address, update the firewall to block the offending IP for Z minutes". The actions are not restricted to updating the firewall with iptables - you can also configure fail2ban to send notification emails, for example. This is useful for protecting against brute force attacks against services like:

  • SSH (you should be using Publickey authentication if possible which will stop them ever guessing a password, but allowing them to try is still a waste of resources)
  • SASL authentication attempts (Postfix and Dovecot)
  • Login forms for web based services like Roundcube webmail.