IPTABLES installation


Debian

This is the way you can install a Debian firewall rule in Debian Lenny.

  • Create your iptables configuration.
  • Save it to a file:
    iptables-save > /etc/iptables.up.rules
  • Create a startup file here:
    vi /etc/network/if-pre-up.d/iptables
  • Insert this to the iptables file you have just created:
    #!/bin/bash
    /sbin/iptables-restore < /etc/iptables.up.rules
  • Make the file executable:
    chmod +x /etc/network/if-pre-up.d/iptables